# 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
    #
    # Hive Server linked service.
    #
    class HiveLinkedService < LinkedService

      include MsRestAzure


      def initialize
        @type = "Hive"
      end

      attr_accessor :type

      # @return IP address or host name of the Hive server, separated by ';'
      # for multiple hosts (only when serviceDiscoveryMode is enable).
      attr_accessor :host

      # @return The TCP port that the Hive server uses to listen for client
      # connections.
      attr_accessor :port

      # @return [HiveServerType] The type of Hive server. Possible values
      # include: 'HiveServer1', 'HiveServer2', 'HiveThriftServer'
      attr_accessor :server_type

      # @return [HiveThriftTransportProtocol] The transport protocol to use in
      # the Thrift layer. Possible values include: 'Binary', 'SASL', 'HTTP '
      attr_accessor :thrift_transport_protocol

      # @return [HiveAuthenticationType] The authentication method used to
      # access the Hive server. Possible values include: 'Anonymous',
      # 'Username', 'UsernameAndPassword', 'WindowsAzureHDInsightService'
      attr_accessor :authentication_type

      # @return true to indicate using the ZooKeeper service, false not.
      attr_accessor :service_discovery_mode

      # @return The namespace on ZooKeeper under which Hive Server 2 nodes are
      # added.
      attr_accessor :zoo_keeper_name_space

      # @return Specifies whether the driver uses native HiveQL queries,or
      # converts them into an equivalent form in HiveQL.
      attr_accessor :use_native_query

      # @return The user name that you use to access Hive Server.
      attr_accessor :username

      # @return [SecretBase] The password corresponding to the user name that
      # you provided in the Username field
      attr_accessor :password

      # @return The partial URL corresponding to the Hive server.
      attr_accessor :http_path

      # @return Specifies whether the connections to the server are encrypted
      # using SSL. The default value is false.
      attr_accessor :enable_ssl

      # @return The full path of the .pem file containing trusted CA
      # certificates for verifying the server when connecting over SSL. This
      # property can only be set when using SSL on self-hosted IR. The default
      # value is the cacerts.pem file installed with the IR.
      attr_accessor :trusted_cert_path

      # @return Specifies whether to use a CA certificate from the system trust
      # store or from a specified PEM file. The default value is false.
      attr_accessor :use_system_trust_store

      # @return Specifies whether to require a CA-issued SSL certificate name
      # to match the host name of the server when connecting over SSL. The
      # default value is false.
      attr_accessor :allow_host_name_cnmismatch

      # @return Specifies whether to allow self-signed certificates from the
      # server. The default value is false.
      attr_accessor :allow_self_signed_server_cert

      # @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


      #
      # Mapper for HiveLinkedService class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Hive',
          type: {
            name: 'Composite',
            class_name: 'HiveLinkedService',
            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'
                }
              },
              host: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.host',
                type: {
                  name: 'Object'
                }
              },
              port: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.port',
                type: {
                  name: 'Object'
                }
              },
              server_type: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.serverType',
                type: {
                  name: 'String'
                }
              },
              thrift_transport_protocol: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.thriftTransportProtocol',
                type: {
                  name: 'String'
                }
              },
              authentication_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.authenticationType',
                type: {
                  name: 'String'
                }
              },
              service_discovery_mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.serviceDiscoveryMode',
                type: {
                  name: 'Object'
                }
              },
              zoo_keeper_name_space: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.zooKeeperNameSpace',
                type: {
                  name: 'Object'
                }
              },
              use_native_query: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.useNativeQuery',
                type: {
                  name: 'Object'
                }
              },
              username: {
                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'
                }
              },
              http_path: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.httpPath',
                type: {
                  name: 'Object'
                }
              },
              enable_ssl: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.enableSsl',
                type: {
                  name: 'Object'
                }
              },
              trusted_cert_path: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.trustedCertPath',
                type: {
                  name: 'Object'
                }
              },
              use_system_trust_store: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.useSystemTrustStore',
                type: {
                  name: 'Object'
                }
              },
              allow_host_name_cnmismatch: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.allowHostNameCNMismatch',
                type: {
                  name: 'Object'
                }
              },
              allow_self_signed_server_cert: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.allowSelfSignedServerCert',
                type: {
                  name: 'Object'
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
