# 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
    #
    # Dynamics AX linked service.
    #
    class DynamicsAXLinkedService < LinkedService

      include MsRestAzure


      def initialize
        @type = "DynamicsAX"
      end

      attr_accessor :type

      # @return The Dynamics AX (or Dynamics 365 Finance and Operations)
      # instance OData endpoint.
      attr_accessor :url

      # @return Specify the application's client ID. Type: string (or
      # Expression with resultType string).
      attr_accessor :service_principal_id

      # @return [SecretBase] Specify the application's key. Mark this field as
      # a SecureString to store it securely in Data Factory, or reference a
      # secret stored in Azure Key Vault. Type: string (or Expression with
      # resultType string).
      attr_accessor :service_principal_key

      # @return Specify the tenant information (domain name or tenant ID) under
      # which your application resides. Retrieve it by hovering the mouse in
      # the top-right corner of the Azure portal. Type: string (or Expression
      # with resultType string).
      attr_accessor :tenant

      # @return Specify the resource you are requesting authorization. Type:
      # string (or Expression with resultType string).
      attr_accessor :aad_resource_id

      # @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 DynamicsAXLinkedService class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DynamicsAX',
          type: {
            name: 'Composite',
            class_name: 'DynamicsAXLinkedService',
            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'
                }
              },
              service_principal_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.servicePrincipalId',
                type: {
                  name: 'Object'
                }
              },
              service_principal_key: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.servicePrincipalKey',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'type',
                  uber_parent: 'SecretBase',
                  class_name: 'SecretBase'
                }
              },
              tenant: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.tenant',
                type: {
                  name: 'Object'
                }
              },
              aad_resource_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'typeProperties.aadResourceId',
                type: {
                  name: 'Object'
                }
              },
              encrypted_credential: {
                client_side_validation: true,
                required: false,
                serialized_name: 'typeProperties.encryptedCredential',
                type: {
                  name: 'Object'
                }
              }
            }
          }
        }
      end
    end
  end
end
