# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Resources::Mgmt::V2019_07_01
  module Models
    #
    # Result of the What-If operation. Contains a list of predicted changes and
    # a URL link to get to the next set of results.
    #
    class WhatIfOperationResult

      include MsRestAzure

      # @return [String] Status of the What-If operation.
      attr_accessor :status

      # @return [Array<WhatIfChange>] List of resource changes predicted by
      # What-If operation.
      attr_accessor :changes

      # @return [ErrorResponse] Error when What-If operation fails.
      attr_accessor :error


      #
      # Mapper for WhatIfOperationResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'WhatIfOperationResult',
          type: {
            name: 'Composite',
            class_name: 'WhatIfOperationResult',
            model_properties: {
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'status',
                type: {
                  name: 'String'
                }
              },
              changes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.changes',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'WhatIfChangeElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'WhatIfChange'
                      }
                  }
                }
              },
              error: {
                client_side_validation: true,
                required: false,
                serialized_name: 'error',
                type: {
                  name: 'Composite',
                  class_name: 'ErrorResponse'
                }
              }
            }
          }
        }
      end
    end
  end
end
