# 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
    #
    # A copy activity Azure CosmosDB (SQL API) Collection source.
    #
    class CosmosDbSqlApiSource < CopySource

      include MsRestAzure


      def initialize
        @type = "CosmosDbSqlApiSource"
      end

      attr_accessor :type

      # @return SQL API query. Type: string (or Expression with resultType
      # string).
      attr_accessor :query

      # @return Page size of the result. Type: integer (or Expression with
      # resultType integer).
      attr_accessor :page_size

      # @return Preferred regions. Type: array of strings (or Expression with
      # resultType array of strings).
      attr_accessor :preferred_regions

      # @return Whether detect primitive values as datetime values. Type:
      # boolean (or Expression with resultType boolean).
      attr_accessor :detect_datetime

      # @return [Array<AdditionalColumns>] Specifies the additional columns to
      # be added to source data. Type: array of objects (or Expression with
      # resultType array of objects).
      attr_accessor :additional_columns


      #
      # Mapper for CosmosDbSqlApiSource class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CosmosDbSqlApiSource',
          type: {
            name: 'Composite',
            class_name: 'CosmosDbSqlApiSource',
            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'
                      }
                  }
                }
              },
              source_retry_count: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sourceRetryCount',
                type: {
                  name: 'Object'
                }
              },
              source_retry_wait: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sourceRetryWait',
                type: {
                  name: 'Object'
                }
              },
              max_concurrent_connections: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maxConcurrentConnections',
                type: {
                  name: 'Object'
                }
              },
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              query: {
                client_side_validation: true,
                required: false,
                serialized_name: 'query',
                type: {
                  name: 'Object'
                }
              },
              page_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'pageSize',
                type: {
                  name: 'Object'
                }
              },
              preferred_regions: {
                client_side_validation: true,
                required: false,
                serialized_name: 'preferredRegions',
                type: {
                  name: 'Object'
                }
              },
              detect_datetime: {
                client_side_validation: true,
                required: false,
                serialized_name: 'detectDatetime',
                type: {
                  name: 'Object'
                }
              },
              additional_columns: {
                client_side_validation: true,
                required: false,
                serialized_name: 'additionalColumns',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'AdditionalColumnsElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'AdditionalColumns'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
