# 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::DataMigration::Mgmt::V2018_07_15_preview
  module Models
    #
    # Describes how a MongoDB data migration should be performed
    #
    class MongoDbMigrationSettings

      include MsRestAzure

      # @return [Integer] The RU limit on a CosmosDB target that collections
      # will be temporarily increased to (if lower) during the initial copy of
      # a migration, from 10,000 to 1,000,000, or 0 to use the default boost
      # (which is generally the maximum), or null to not boost the RUs. This
      # setting has no effect on non-CosmosDB targets.
      attr_accessor :boost_rus

      # @return [Hash{String => MongoDbDatabaseSettings}] The databases on the
      # source cluster to migrate to the target. The keys are the names of the
      # databases.
      attr_accessor :databases

      # @return [MongoDbReplication] Describes how changes will be replicated
      # from the source to the target. The default is OneTime. Possible values
      # include: 'Disabled', 'OneTime', 'Continuous'
      attr_accessor :replication

      # @return [MongoDbConnectionInfo] Settings used to connect to the source
      # cluster
      attr_accessor :source

      # @return [MongoDbConnectionInfo] Settings used to connect to the target
      # cluster
      attr_accessor :target

      # @return [MongoDbThrottlingSettings] Settings used to limit the resource
      # usage of the migration
      attr_accessor :throttling


      #
      # Mapper for MongoDbMigrationSettings class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'MongoDbMigrationSettings',
          type: {
            name: 'Composite',
            class_name: 'MongoDbMigrationSettings',
            model_properties: {
              boost_rus: {
                client_side_validation: true,
                required: false,
                serialized_name: 'boostRUs',
                type: {
                  name: 'Number'
                }
              },
              databases: {
                client_side_validation: true,
                required: true,
                serialized_name: 'databases',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'MongoDbDatabaseSettingsElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'MongoDbDatabaseSettings'
                      }
                  }
                }
              },
              replication: {
                client_side_validation: true,
                required: false,
                serialized_name: 'replication',
                type: {
                  name: 'String'
                }
              },
              source: {
                client_side_validation: true,
                required: true,
                serialized_name: 'source',
                type: {
                  name: 'Composite',
                  class_name: 'MongoDbConnectionInfo'
                }
              },
              target: {
                client_side_validation: true,
                required: true,
                serialized_name: 'target',
                type: {
                  name: 'Composite',
                  class_name: 'MongoDbConnectionInfo'
                }
              },
              throttling: {
                client_side_validation: true,
                required: false,
                serialized_name: 'throttling',
                type: {
                  name: 'Composite',
                  class_name: 'MongoDbThrottlingSettings'
                }
              }
            }
          }
        }
      end
    end
  end
end
