-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 1b9b098a5d61cbc372acb108a29c29328a4120b2 (#2864)
Resolve comments.
- Loading branch information
1 parent
788d8f1
commit 8f9d339
Showing
14 changed files
with
2,608 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
578 changes: 578 additions & 0 deletions
578
...faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/Snapshots.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,090 changes: 1,090 additions & 0 deletions
1,090
...va/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/SnapshotsImpl.java
Large diffs are not rendered by default.
Oops, something went wrong.
73 changes: 73 additions & 0 deletions
73
...ava/com/microsoft/azure/cognitiveservices/vision/faceapi/models/ApplySnapshotRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
*/ | ||
|
||
package com.microsoft.azure.cognitiveservices.vision.faceapi.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Request body for applying snapshot operation. | ||
*/ | ||
public class ApplySnapshotRequest { | ||
/** | ||
* User specified target object id to be created from the snapshot. | ||
*/ | ||
@JsonProperty(value = "objectId", required = true) | ||
private String objectId; | ||
|
||
/** | ||
* 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'. | ||
*/ | ||
@JsonProperty(value = "mode") | ||
private SnapshotApplyMode mode; | ||
|
||
/** | ||
* Get user specified target object id to be created from the snapshot. | ||
* | ||
* @return the objectId value | ||
*/ | ||
public String objectId() { | ||
return this.objectId; | ||
} | ||
|
||
/** | ||
* Set user specified target object id to be created from the snapshot. | ||
* | ||
* @param objectId the objectId value to set | ||
* @return the ApplySnapshotRequest object itself. | ||
*/ | ||
public ApplySnapshotRequest withObjectId(String objectId) { | ||
this.objectId = objectId; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get 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'. | ||
* | ||
* @return the mode value | ||
*/ | ||
public SnapshotApplyMode mode() { | ||
return this.mode; | ||
} | ||
|
||
/** | ||
* Set 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'. | ||
* | ||
* @param mode the mode value to set | ||
* @return the ApplySnapshotRequest object itself. | ||
*/ | ||
public ApplySnapshotRequest withMode(SnapshotApplyMode mode) { | ||
this.mode = mode; | ||
return this; | ||
} | ||
|
||
} |
169 changes: 169 additions & 0 deletions
169
...ain/java/com/microsoft/azure/cognitiveservices/vision/faceapi/models/OperationStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
*/ | ||
|
||
package com.microsoft.azure.cognitiveservices.vision.faceapi.models; | ||
|
||
import org.joda.time.DateTime; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** | ||
* Operation status object. Operation refers to the asynchronous backend task | ||
* including taking a snapshot and applying a snapshot. | ||
*/ | ||
public class OperationStatus { | ||
/** | ||
* Operation status: notstarted, running, succeeded, failed. If the | ||
* operation is requested and waiting to perform, the status is notstarted. | ||
* If the operation is ongoing in backend, the status is running. Status | ||
* succeeded means the operation is completed successfully, specifically | ||
* for snapshot taking operation, it illustrates the snapshot is well taken | ||
* and ready to apply, and for snapshot applying operation, it presents the | ||
* target object has finished creating by the snapshot and ready to be | ||
* used. Status failed is often caused by editing the source object while | ||
* taking the snapshot or editing the target object while applying the | ||
* snapshot before completion, see the field "message" to check the failure | ||
* reason. Possible values include: 'notstarted', 'running', 'succeeded', | ||
* 'failed'. | ||
*/ | ||
@JsonProperty(value = "status", required = true) | ||
private OperationStatusType status; | ||
|
||
/** | ||
* A combined UTC date and time string that describes the time when the | ||
* operation (take or apply a snapshot) is requested. E.g. | ||
* 2018-12-25T11:41:02.2331413Z. | ||
*/ | ||
@JsonProperty(value = "createdTime", required = true) | ||
private DateTime createdTime; | ||
|
||
/** | ||
* A combined UTC date and time string that describes the last time the | ||
* operation (take or apply a snapshot) is actively migrating data. The | ||
* lastActionTime will keep increasing until the operation finishes. E.g. | ||
* 2018-12-25T11:51:27.8705696Z. | ||
*/ | ||
@JsonProperty(value = "lastActionTime") | ||
private DateTime lastActionTime; | ||
|
||
/** | ||
* When the operation succeeds successfully, for snapshot taking operation | ||
* the snapshot id will be included in this field, and for snapshot | ||
* applying operation, the path to get the target object will be returned | ||
* in this field. | ||
*/ | ||
@JsonProperty(value = "resourceLocation") | ||
private String resourceLocation; | ||
|
||
/** | ||
* Show failure message when operation fails (omitted when operation | ||
* succeeds). | ||
*/ | ||
@JsonProperty(value = "message") | ||
private String message; | ||
|
||
/** | ||
* Get operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason. Possible values include: 'notstarted', 'running', 'succeeded', 'failed'. | ||
* | ||
* @return the status value | ||
*/ | ||
public OperationStatusType status() { | ||
return this.status; | ||
} | ||
|
||
/** | ||
* Set operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field "message" to check the failure reason. Possible values include: 'notstarted', 'running', 'succeeded', 'failed'. | ||
* | ||
* @param status the status value to set | ||
* @return the OperationStatus object itself. | ||
*/ | ||
public OperationStatus withStatus(OperationStatusType status) { | ||
this.status = status; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get a combined UTC date and time string that describes the time when the operation (take or apply a snapshot) is requested. E.g. 2018-12-25T11:41:02.2331413Z. | ||
* | ||
* @return the createdTime value | ||
*/ | ||
public DateTime createdTime() { | ||
return this.createdTime; | ||
} | ||
|
||
/** | ||
* Set a combined UTC date and time string that describes the time when the operation (take or apply a snapshot) is requested. E.g. 2018-12-25T11:41:02.2331413Z. | ||
* | ||
* @param createdTime the createdTime value to set | ||
* @return the OperationStatus object itself. | ||
*/ | ||
public OperationStatus withCreatedTime(DateTime createdTime) { | ||
this.createdTime = createdTime; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get a combined UTC date and time string that describes the last time the operation (take or apply a snapshot) is actively migrating data. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z. | ||
* | ||
* @return the lastActionTime value | ||
*/ | ||
public DateTime lastActionTime() { | ||
return this.lastActionTime; | ||
} | ||
|
||
/** | ||
* Set a combined UTC date and time string that describes the last time the operation (take or apply a snapshot) is actively migrating data. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z. | ||
* | ||
* @param lastActionTime the lastActionTime value to set | ||
* @return the OperationStatus object itself. | ||
*/ | ||
public OperationStatus withLastActionTime(DateTime lastActionTime) { | ||
this.lastActionTime = lastActionTime; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get when the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field. | ||
* | ||
* @return the resourceLocation value | ||
*/ | ||
public String resourceLocation() { | ||
return this.resourceLocation; | ||
} | ||
|
||
/** | ||
* Set when the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field. | ||
* | ||
* @param resourceLocation the resourceLocation value to set | ||
* @return the OperationStatus object itself. | ||
*/ | ||
public OperationStatus withResourceLocation(String resourceLocation) { | ||
this.resourceLocation = resourceLocation; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get show failure message when operation fails (omitted when operation succeeds). | ||
* | ||
* @return the message value | ||
*/ | ||
public String message() { | ||
return this.message; | ||
} | ||
|
||
/** | ||
* Set show failure message when operation fails (omitted when operation succeeds). | ||
* | ||
* @param message the message value to set | ||
* @return the OperationStatus object itself. | ||
*/ | ||
public OperationStatus withMessage(String message) { | ||
this.message = message; | ||
return this; | ||
} | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
...java/com/microsoft/azure/cognitiveservices/vision/faceapi/models/OperationStatusType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
*/ | ||
|
||
package com.microsoft.azure.cognitiveservices.vision.faceapi.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
/** | ||
* Defines values for OperationStatusType. | ||
*/ | ||
public enum OperationStatusType { | ||
/** Enum value notstarted. */ | ||
NOTSTARTED("notstarted"), | ||
|
||
/** Enum value running. */ | ||
RUNNING("running"), | ||
|
||
/** Enum value succeeded. */ | ||
SUCCEEDED("succeeded"), | ||
|
||
/** Enum value failed. */ | ||
FAILED("failed"); | ||
|
||
/** The actual serialized value for a OperationStatusType instance. */ | ||
private String value; | ||
|
||
OperationStatusType(String value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Parses a serialized value to a OperationStatusType instance. | ||
* | ||
* @param value the serialized value to parse. | ||
* @return the parsed OperationStatusType object, or null if unable to parse. | ||
*/ | ||
@JsonCreator | ||
public static OperationStatusType fromString(String value) { | ||
OperationStatusType[] items = OperationStatusType.values(); | ||
for (OperationStatusType item : items) { | ||
if (item.toString().equalsIgnoreCase(value)) { | ||
return item; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
@JsonValue | ||
@Override | ||
public String toString() { | ||
return this.value; | ||
} | ||
} |
Oops, something went wrong.