# 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
    #
    # A WebLinkedService that uses basic authentication to communicate with an
    # HTTP endpoint.
    #
    class WebBasicAuthentication < WebLinkedServiceTypeProperties

      include MsRestAzure


      def initialize
        @authenticationType = "Basic"
      end

      attr_accessor :authenticationType

      # @return User name for Basic authentication. Type: string (or Expression
      # with resultType string).
      attr_accessor :username

      # @return [SecretBase] The password for Basic authentication.
      attr_accessor :password


      #
      # Mapper for WebBasicAuthentication class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Basic',
          type: {
            name: 'Composite',
            class_name: 'WebBasicAuthentication',
            model_properties: {
              url: {
                client_side_validation: true,
                required: true,
                serialized_name: 'url',
                type: {
                  name: 'Object'
                }
              },
              authenticationType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'authenticationType',
                type: {
                  name: 'String'
                }
              },
              username: {
                client_side_validation: true,
                required: true,
                serialized_name: 'username',
                type: {
                  name: 'Object'
                }
              },
              password: {
                client_side_validation: true,
                required: true,
                serialized_name: 'password',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              }
            }
          }
        }
      end
    end
  end
end
