Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public enum FaceServiceVersion implements ServiceVersion {
/**
* Enum value v1.2-preview.1.
*/
V1_2_PREVIEW_1("v1.2-preview.1");
V1_2_PREVIEW_1("v1.2-preview.1"),

/**
* Enum value v1.2.
*/
V1_2("v1.2");

private final String version;

Expand All @@ -40,6 +45,6 @@ public String getVersion() {
* @return The latest {@link FaceServiceVersion}.
*/
public static FaceServiceVersion getLatest() {
return V1_2_PREVIEW_1;
return V1_2;
}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ public final class CreateLivenessSessionContent implements JsonSerializable<Crea
@Generated
private final LivenessOperationMode livenessOperationMode;

/*
* 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.
*/
@Generated
private Boolean sendResultsToClient;

/*
* 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.
Expand Down Expand Up @@ -72,34 +63,6 @@ public LivenessOperationMode getLivenessOperationMode() {
return this.livenessOperationMode;
}

/**
* Get the sendResultsToClient property: 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.
*
* @return the sendResultsToClient value.
*/
@Generated
public Boolean isSendResultsToClient() {
return this.sendResultsToClient;
}

/**
* Set the sendResultsToClient property: 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.
*
* @param sendResultsToClient the sendResultsToClient value to set.
* @return the CreateLivenessSessionContent object itself.
*/
@Generated
public CreateLivenessSessionContent setSendResultsToClient(Boolean sendResultsToClient) {
this.sendResultsToClient = sendResultsToClient;
return this;
}

/**
* Get the deviceCorrelationIdSetInClient property: 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
Expand Down Expand Up @@ -185,11 +148,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("livenessOperationMode",
this.livenessOperationMode == null ? null : this.livenessOperationMode.toString());
jsonWriter.writeBooleanField("sendResultsToClient", this.sendResultsToClient);
jsonWriter.writeBooleanField("deviceCorrelationIdSetInClient", this.deviceCorrelationIdSetInClient);
jsonWriter.writeBooleanField("enableSessionImage", this.enableSessionImage);
jsonWriter.writeStringField("livenessSingleModalModel",
this.livenessSingleModalModel == null ? null : this.livenessSingleModalModel.toString());
jsonWriter.writeStringField("livenessModelVersion",
this.livenessModelVersion == null ? null : this.livenessModelVersion.toString());
jsonWriter.writeStringField("deviceCorrelationId", this.deviceCorrelationId);
jsonWriter.writeNumberField("authTokenTimeToLiveInSeconds", this.authTokenTimeToLiveInSeconds);
return jsonWriter.writeEndObject();
Expand All @@ -208,25 +170,22 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
LivenessOperationMode livenessOperationMode = null;
Boolean sendResultsToClient = null;
Boolean deviceCorrelationIdSetInClient = null;
Boolean enableSessionImage = null;
LivenessModel livenessSingleModalModel = null;
LivenessModel livenessModelVersion = null;
String deviceCorrelationId = null;
Integer authTokenTimeToLiveInSeconds = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("livenessOperationMode".equals(fieldName)) {
livenessOperationMode = LivenessOperationMode.fromString(reader.getString());
} else if ("sendResultsToClient".equals(fieldName)) {
sendResultsToClient = reader.getNullable(JsonReader::getBoolean);
} else if ("deviceCorrelationIdSetInClient".equals(fieldName)) {
deviceCorrelationIdSetInClient = reader.getNullable(JsonReader::getBoolean);
} else if ("enableSessionImage".equals(fieldName)) {
enableSessionImage = reader.getNullable(JsonReader::getBoolean);
} else if ("livenessSingleModalModel".equals(fieldName)) {
livenessSingleModalModel = LivenessModel.fromString(reader.getString());
} else if ("livenessModelVersion".equals(fieldName)) {
livenessModelVersion = LivenessModel.fromString(reader.getString());
} else if ("deviceCorrelationId".equals(fieldName)) {
deviceCorrelationId = reader.getString();
} else if ("authTokenTimeToLiveInSeconds".equals(fieldName)) {
Expand All @@ -237,10 +196,9 @@ public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throw
}
CreateLivenessSessionContent deserializedCreateLivenessSessionContent
= new CreateLivenessSessionContent(livenessOperationMode);
deserializedCreateLivenessSessionContent.sendResultsToClient = sendResultsToClient;
deserializedCreateLivenessSessionContent.deviceCorrelationIdSetInClient = deviceCorrelationIdSetInClient;
deserializedCreateLivenessSessionContent.enableSessionImage = enableSessionImage;
deserializedCreateLivenessSessionContent.livenessSingleModalModel = livenessSingleModalModel;
deserializedCreateLivenessSessionContent.livenessModelVersion = livenessModelVersion;
deserializedCreateLivenessSessionContent.deviceCorrelationId = deviceCorrelationId;
deserializedCreateLivenessSessionContent.authTokenTimeToLiveInSeconds = authTokenTimeToLiveInSeconds;
return deserializedCreateLivenessSessionContent;
Expand All @@ -253,13 +211,6 @@ public static CreateLivenessSessionContent fromJson(JsonReader jsonReader) throw
@Generated
private Boolean enableSessionImage;

/*
* 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
*/
@Generated
private LivenessModel livenessSingleModalModel;

/**
* Get the enableSessionImage property: Whether or not store the session image.
*
Expand All @@ -282,27 +233,34 @@ public CreateLivenessSessionContent setEnableSessionImage(Boolean enableSessionI
return this;
}

/*
* 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
*/
@Generated
private LivenessModel livenessModelVersion;

/**
* Get the livenessSingleModalModel property: 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.
* Get the livenessModelVersion property: 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.
*
* @return the livenessSingleModalModel value.
* @return the livenessModelVersion value.
*/
@Generated
public LivenessModel getLivenessSingleModalModel() {
return this.livenessSingleModalModel;
public LivenessModel getLivenessModelVersion() {
return this.livenessModelVersion;
}

/**
* Set the livenessSingleModalModel property: 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.
* Set the livenessModelVersion property: 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.
*
* @param livenessSingleModalModel the livenessSingleModalModel value to set.
* @param livenessModelVersion the livenessModelVersion value to set.
* @return the CreateLivenessSessionContent object itself.
*/
@Generated
public CreateLivenessSessionContent setLivenessSingleModalModel(LivenessModel livenessSingleModalModel) {
this.livenessSingleModalModel = livenessSingleModalModel;
public CreateLivenessSessionContent setLivenessModelVersion(LivenessModel livenessModelVersion) {
this.livenessModelVersion = livenessModelVersion;
return this;
}
}
Loading