Partager via


CreateLivenessSessionContent Class

Definition

Request model for creating liveness session.

public class CreateLivenessSessionContent : System.ClientModel.Primitives.IJsonModel<Azure.AI.Vision.Face.CreateLivenessSessionContent>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Vision.Face.CreateLivenessSessionContent>
type CreateLivenessSessionContent = class
    interface IJsonModel<CreateLivenessSessionContent>
    interface IPersistableModel<CreateLivenessSessionContent>
Public Class CreateLivenessSessionContent
Implements IJsonModel(Of CreateLivenessSessionContent), IPersistableModel(Of CreateLivenessSessionContent)
Inheritance
CreateLivenessSessionContent
Implements

Constructors

CreateLivenessSessionContent(LivenessOperationMode)

Initializes a new instance of CreateLivenessSessionContent.

Properties

AuthTokenTimeToLiveInSeconds

Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600.

DeviceCorrelationId

Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null.

DeviceCorrelationIdSetInClient

Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body.

EnableSessionImage

Whether or not store the session image.

LivenessOperationMode

Type of liveness mode the client should follow.

LivenessSingleModalModel

The model version used for liveness classification. This is an optional parameter, and if this is not specified, then the latest supported model version will be chosen.

SendResultsToClient

Whether or not to allow a '200 - Success' response body to be sent to the client, which may be undesirable for security reasons. Default is false, clients will receive a '204 - NoContent' empty body response. Regardless of selection, calling Session GetResult will always contain a response body enabling business logic to be implemented.

Explicit Interface Implementations

IJsonModel<CreateLivenessSessionContent>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<CreateLivenessSessionContent>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<CreateLivenessSessionContent>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<CreateLivenessSessionContent>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<CreateLivenessSessionContent>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to