# 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::DataFactory::Mgmt::V2017_09_01_preview
  module Models
    #
    # The object that defines the structure of an Azure Data Factory response.
    #
    class ErrorResponse

      include MsRestAzure

      # @return [String] Error code.
      attr_accessor :code

      # @return [String] Error message.
      attr_accessor :message

      # @return [String] Property name/path in request associated with error.
      attr_accessor :target

      # @return [Array<ErrorResponse>] Array with additional error details.
      attr_accessor :details


      #
      # Mapper for ErrorResponse class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ErrorResponse',
          type: {
            name: 'Composite',
            class_name: 'ErrorResponse',
            model_properties: {
              code: {
                client_side_validation: true,
                required: true,
                serialized_name: 'code',
                type: {
                  name: 'String'
                }
              },
              message: {
                client_side_validation: true,
                required: true,
                serialized_name: 'message',
                type: {
                  name: 'String'
                }
              },
              target: {
                client_side_validation: true,
                required: false,
                serialized_name: 'target',
                type: {
                  name: 'String'
                }
              },
              details: {
                client_side_validation: true,
                required: false,
                serialized_name: 'details',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ErrorResponseElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ErrorResponse'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
