# 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::CognitiveServices::Face::V1_0
  module Models
    #
    # Request body for applying snapshot operation.
    #
    class ApplySnapshotRequest

      include MsRestAzure

      # @return [String] User specified target object id to be created from the
      # snapshot.
      attr_accessor :object_id

      # @return [SnapshotApplyMode] Snapshot applying mode. Currently only
      # CreateNew is supported, which means the apply operation will fail if
      # target subscription already contains an object of same type and using
      # the same objectId. Users can specify the "objectId" in request body to
      # avoid such conflicts. Possible values include: 'CreateNew'. Default
      # value: 'CreateNew' .
      attr_accessor :mode


      #
      # Mapper for ApplySnapshotRequest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApplySnapshotRequest',
          type: {
            name: 'Composite',
            class_name: 'ApplySnapshotRequest',
            model_properties: {
              object_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'objectId',
                constraints: {
                  MaxLength: 64,
                  Pattern: '^[a-z0-9-_]+$'
                },
                type: {
                  name: 'String'
                }
              },
              mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'mode',
                default_value: 'CreateNew',
                type: {
                  name: 'Enum',
                  module: 'SnapshotApplyMode'
                }
              }
            }
          }
        }
      end
    end
  end
end
