# 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::V2018_06_01
  module Models
    #
    # Web activity authentication properties.
    #
    class WebActivityAuthentication

      include MsRestAzure

      # @return [String] Web activity authentication
      # (Basic/ClientCertificate/MSI/ServicePrincipal)
      attr_accessor :type

      # @return [SecretBase] Base64-encoded contents of a PFX file or
      # Certificate when used for ServicePrincipal
      attr_accessor :pfx

      # @return Web activity authentication user name for basic authentication
      # or ClientID when used for ServicePrincipal. Type: string (or Expression
      # with resultType string).
      attr_accessor :username

      # @return [SecretBase] Password for the PFX file or basic authentication
      # / Secret when used for ServicePrincipal
      attr_accessor :password

      # @return Resource for which Azure Auth token will be requested when
      # using MSI Authentication. Type: string (or Expression with resultType
      # string).
      attr_accessor :resource

      # @return TenantId for which Azure Auth token will be requested when
      # using ServicePrincipal Authentication. Type: string (or Expression with
      # resultType string).
      attr_accessor :user_tenant


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