# 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
    #
    # Linked service for an HTTP source.
    #
    class HttpLinkedService < LinkedService

      include MsRestAzure


      def initialize
        @type = "HttpServer"
      end

      attr_accessor :type

      # @return The base URL of the HTTP endpoint, e.g.
      # http://www.microsoft.com. Type: string (or Expression with resultType
      # string).
      attr_accessor :url

      # @return [HttpAuthenticationType] The authentication type to be used to
      # connect to the HTTP server. Possible values include: 'Basic',
      # 'Anonymous', 'Digest', 'Windows', 'ClientCertificate'
      attr_accessor :authentication_type

      # @return User name for Basic, Digest, or Windows authentication. Type:
      # string (or Expression with resultType string).
      attr_accessor :user_name

      # @return [SecretBase] Password for Basic, Digest, Windows, or
      # ClientCertificate with EmbeddedCertData authentication.
      attr_accessor :password

      # @return Base64 encoded certificate data for ClientCertificate
      # authentication. For on-premises copy with ClientCertificate
      # authentication, either CertThumbprint or EmbeddedCertData/Password
      # should be specified. Type: string (or Expression with resultType
      # string).
      attr_accessor :embedded_cert_data

      # @return Thumbprint of certificate for ClientCertificate authentication.
      # Only valid for on-premises copy. For on-premises copy with
      # ClientCertificate authentication, either CertThumbprint or
      # EmbeddedCertData/Password should be specified. Type: string (or
      # Expression with resultType string).
      attr_accessor :cert_thumbprint

      # @return The encrypted credential used for authentication. Credentials
      # are encrypted using the integration runtime credential manager. Type:
      # string (or Expression with resultType string).
      attr_accessor :encrypted_credential

      # @return If true, validate the HTTPS server SSL certificate. Default
      # value is true. Type: boolean (or Expression with resultType boolean).
      attr_accessor :enable_server_certificate_validation


      #
      # Mapper for HttpLinkedService class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'HttpServer',
          type: {
            name: 'Composite',
            class_name: 'HttpLinkedService',
            model_properties: {
              additional_properties: {
                client_side_validation: true,
                required: false,
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              connect_via: {
                client_side_validation: true,
                required: false,
                serialized_name: 'connectVia',
                type: {
                  name: 'Composite',
                  class_name: 'IntegrationRuntimeReference'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'description',
                type: {
                  name: 'String'
                }
              },
              parameters: {
                client_side_validation: true,
                required: false,
                serialized_name: 'parameters',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ParameterSpecificationElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ParameterSpecification'
                      }
                  }
                }
              },
              annotations: {
                client_side_validation: true,
                required: false,
                serialized_name: 'annotations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              url: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.url',
                type: {
                  name: 'Object'
                }
              },
              authentication_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.authenticationType',
                type: {
                  name: 'String'
                }
              },
              user_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.userName',
                type: {
                  name: 'Object'
                }
              },
              password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.password',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              embedded_cert_data: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.embeddedCertData',
                type: {
                  name: 'Object'
                }
              },
              cert_thumbprint: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.certThumbprint',
                type: {
                  name: 'Object'
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              },
              enable_server_certificate_validation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.enableServerCertificateValidation',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
