# 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 source for a CosmosDB (MongoDB API) database.
    #
    class CosmosDbMongoDbApiSource < CopySource

      include MsRestAzure


      def initialize
        @type = "CosmosDbMongoDbApiSource"
      end

      attr_accessor :type

      # @return Specifies selection filter using query operators. To return all
      # documents in a collection, omit this parameter or pass an empty
      # document ({}). Type: string (or Expression with resultType string).
      attr_accessor :filter

      # @return [MongoDbCursorMethodsProperties] Cursor methods for Mongodb
      # query.
      attr_accessor :cursor_methods

      # @return Specifies the number of documents to return in each batch of
      # the response from MongoDB instance. In most cases, modifying the batch
      # size will not affect the user or the application. This property's main
      # purpose is to avoid hit the limitation of response size. Type: integer
      # (or Expression with resultType integer).
      attr_accessor :batch_size

      # @return Query timeout. Type: string (or Expression with resultType
      # string), pattern: ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
      attr_accessor :query_timeout

      # @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 CosmosDbMongoDbApiSource class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CosmosDbMongoDbApiSource',
          type: {
            name: 'Composite',
            class_name: 'CosmosDbMongoDbApiSource',
            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'
                }
              },
              filter: {
                client_side_validation: true,
                required: false,
                serialized_name: 'filter',
                type: {
                  name: 'Object'
                }
              },
              cursor_methods: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cursorMethods',
                type: {
                  name: 'Composite',
                  class_name: 'MongoDbCursorMethodsProperties'
                }
              },
              batch_size: {
                client_side_validation: true,
                required: false,
                serialized_name: 'batchSize',
                type: {
                  name: 'Object'
                }
              },
              query_timeout: {
                client_side_validation: true,
                required: false,
                serialized_name: 'queryTimeout',
                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
