# 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::BatchAI::Mgmt::V2018_05_01
  module Models
    #
    # An error response from the Batch AI service.
    #
    class BatchAIError

      include MsRestAzure

      # @return [String] An identifier of the error. Codes are invariant and
      # are intended to be consumed programmatically.
      attr_accessor :code

      # @return [String] A message describing the error, intended to be
      # suitable for display in a user interface.
      attr_accessor :message

      # @return [Array<NameValuePair>] A list of additional details about the
      # error.
      attr_accessor :details


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