# 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::DeploymentManager::Mgmt::V2019_11_01_preview
  module Models
    #
    # ApiKey authentication gives a name and a value that can be included in
    # either the request header or query parameters.
    #
    class ApiKeyAuthentication < RestRequestAuthentication

      include MsRestAzure


      def initialize
        @type = "ApiKey"
      end

      attr_accessor :type

      # @return [String] The key name of the authentication key/value pair.
      attr_accessor :name

      # @return [RestAuthLocation] The location of the authentication key/value
      # pair in the request. Possible values include: 'Query', 'Header'
      attr_accessor :in_property

      # @return [String] The value of the authentication key/value pair.
      attr_accessor :value


      #
      # Mapper for ApiKeyAuthentication class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApiKey',
          type: {
            name: 'Composite',
            class_name: 'ApiKeyAuthentication',
            model_properties: {
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              in_property: {
                client_side_validation: true,
                required: true,
                serialized_name: 'in',
                type: {
                  name: 'Enum',
                  module: 'RestAuthLocation'
                }
              },
              value: {
                client_side_validation: true,
                required: true,
                serialized_name: 'value',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
