# 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 find similar operation.
    #
    class FindSimilarRequest

      include MsRestAzure

      # @return FaceId of the query face. User needs to call Face - Detect
      # first to get a valid faceId. Note that this faceId is not persisted and
      # will expire 24 hours after the detection call
      attr_accessor :face_id

      # @return [String] An existing user-specified unique candidate face list,
      # created in Face List - Create a Face List. Face list contains a set of
      # persistedFaceIds which are persisted and will never expire. Parameter
      # faceListId, largeFaceListId and faceIds should not be provided at the
      # same time.
      attr_accessor :face_list_id

      # @return [String] An existing user-specified unique candidate large face
      # list, created in LargeFaceList - Create. Large face list contains a set
      # of persistedFaceIds which are persisted and will never expire.
      # Parameter faceListId, largeFaceListId and faceIds should not be
      # provided at the same time.
      attr_accessor :large_face_list_id

      # @return An array of candidate faceIds. All of them are created by Face
      # - Detect and the faceIds will expire 24 hours after the detection call.
      # The number of faceIds is limited to 1000. Parameter faceListId,
      # largeFaceListId and faceIds should not be provided at the same time.
      attr_accessor :face_ids

      # @return [Integer] The number of top similar faces returned. The valid
      # range is [1, 1000]. Default value: 20 .
      attr_accessor :max_num_of_candidates_returned

      # @return [FindSimilarMatchMode] Similar face searching mode. It can be
      # "matchPerson" or "matchFace". Possible values include: 'matchPerson',
      # 'matchFace'. Default value: 'matchPerson' .
      attr_accessor :mode


      #
      # Mapper for FindSimilarRequest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'FindSimilarRequest',
          type: {
            name: 'Composite',
            class_name: 'FindSimilarRequest',
            model_properties: {
              face_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'faceId',
                type: {
                  name: 'String'
                }
              },
              face_list_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'faceListId',
                constraints: {
                  MaxLength: 64,
                  Pattern: '^[a-z0-9-_]+$'
                },
                type: {
                  name: 'String'
                }
              },
              large_face_list_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'largeFaceListId',
                constraints: {
                  MaxLength: 64,
                  Pattern: '^[a-z0-9-_]+$'
                },
                type: {
                  name: 'String'
                }
              },
              face_ids: {
                client_side_validation: true,
                required: false,
                serialized_name: 'faceIds',
                constraints: {
                  MaxItems: 1000
                },
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'UuidElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              max_num_of_candidates_returned: {
                client_side_validation: true,
                required: false,
                serialized_name: 'maxNumOfCandidatesReturned',
                default_value: 20,
                constraints: {
                  InclusiveMaximum: 1000,
                  InclusiveMinimum: 1
                },
                type: {
                  name: 'Number'
                }
              },
              mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'mode',
                default_value: 'matchPerson',
                type: {
                  name: 'Enum',
                  module: 'FindSimilarMatchMode'
                }
              }
            }
          }
        }
      end
    end
  end
end
