Skip to content

Commit

Permalink
Generated from 1b9b098a5d61cbc372acb108a29c29328a4120b2 (#2864)
Browse files Browse the repository at this point in the history
Resolve comments.
  • Loading branch information
AutorestCI authored Jan 22, 2019
1 parent 788d8f1 commit 8f9d339
Show file tree
Hide file tree
Showing 14 changed files with 2,608 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,10 @@ public interface FaceClient {
*/
LargeFaceLists largeFaceLists();

/**
* Gets the Snapshots object to access its operations.
* @return the Snapshots object.
*/
Snapshots snapshots();

}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.microsoft.azure.cognitiveservices.vision.faceapi.LargePersonGroups;
import com.microsoft.azure.cognitiveservices.vision.faceapi.PersonGroupPersons;
import com.microsoft.azure.cognitiveservices.vision.faceapi.PersonGroups;
import com.microsoft.azure.cognitiveservices.vision.faceapi.Snapshots;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;

Expand Down Expand Up @@ -219,6 +220,19 @@ public LargeFaceLists largeFaceLists() {
return this.largeFaceLists;
}

/**
* The Snapshots object to access its operations.
*/
private Snapshots snapshots;

/**
* Gets the Snapshots object to access its operations.
* @return the Snapshots object.
*/
public Snapshots snapshots() {
return this.snapshots;
}

/**
* Initializes an instance of FaceClient client.
*
Expand Down Expand Up @@ -260,6 +274,7 @@ protected void initialize() {
this.largePersonGroupPersons = new LargePersonGroupPersonsImpl(restClient().retrofit(), this);
this.largePersonGroups = new LargePersonGroupsImpl(restClient().retrofit(), this);
this.largeFaceLists = new LargeFaceListsImpl(restClient().retrofit(), this);
this.snapshots = new SnapshotsImpl(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}

Expand Down

Large diffs are not rendered by default.

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;
}

}
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;
}

}
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;
}
}
Loading

0 comments on commit 8f9d339

Please sign in to comment.