-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 (#4219)
Resolve comments.
- Loading branch information
1 parent
7105cb6
commit 3b98e82
Showing
16 changed files
with
1,152 additions
and
1 deletion.
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
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
45 changes: 45 additions & 0 deletions
45
...services-vision-face/azure/cognitiveservices/vision/face/models/apply_snapshot_request.py
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,45 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# 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. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ApplySnapshotRequest(Model): | ||
"""Request body for applying snapshot operation. | ||
All required parameters must be populated in order to send to Azure. | ||
:param object_id: Required. User specified target object id to be created | ||
from the snapshot. | ||
:type object_id: str | ||
:param mode: 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'. Default value: | ||
"CreateNew" . | ||
:type mode: str or | ||
~azure.cognitiveservices.vision.face.models.SnapshotApplyMode | ||
""" | ||
|
||
_validation = { | ||
'object_id': {'required': True, 'max_length': 64, 'pattern': r'^[a-z0-9-_]+$'}, | ||
} | ||
|
||
_attribute_map = { | ||
'object_id': {'key': 'objectId', 'type': 'str'}, | ||
'mode': {'key': 'mode', 'type': 'SnapshotApplyMode'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ApplySnapshotRequest, self).__init__(**kwargs) | ||
self.object_id = kwargs.get('object_id', None) | ||
self.mode = kwargs.get('mode', "CreateNew") |
45 changes: 45 additions & 0 deletions
45
...ices-vision-face/azure/cognitiveservices/vision/face/models/apply_snapshot_request_py3.py
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,45 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# 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. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ApplySnapshotRequest(Model): | ||
"""Request body for applying snapshot operation. | ||
All required parameters must be populated in order to send to Azure. | ||
:param object_id: Required. User specified target object id to be created | ||
from the snapshot. | ||
:type object_id: str | ||
:param mode: 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'. Default value: | ||
"CreateNew" . | ||
:type mode: str or | ||
~azure.cognitiveservices.vision.face.models.SnapshotApplyMode | ||
""" | ||
|
||
_validation = { | ||
'object_id': {'required': True, 'max_length': 64, 'pattern': r'^[a-z0-9-_]+$'}, | ||
} | ||
|
||
_attribute_map = { | ||
'object_id': {'key': 'objectId', 'type': 'str'}, | ||
'mode': {'key': 'mode', 'type': 'SnapshotApplyMode'}, | ||
} | ||
|
||
def __init__(self, *, object_id: str, mode="CreateNew", **kwargs) -> None: | ||
super(ApplySnapshotRequest, self).__init__(**kwargs) | ||
self.object_id = object_id | ||
self.mode = mode |
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
73 changes: 73 additions & 0 deletions
73
...nitiveservices-vision-face/azure/cognitiveservices/vision/face/models/operation_status.py
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 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# 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. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class OperationStatus(Model): | ||
"""Operation status object. Operation refers to the asynchronous backend task | ||
including taking a snapshot and applying a snapshot. | ||
All required parameters must be populated in order to send to Azure. | ||
:param status: Required. 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' | ||
:type status: str or | ||
~azure.cognitiveservices.vision.face.models.OperationStatusType | ||
:param created_time: Required. 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. | ||
:type created_time: datetime | ||
:param last_action_time: 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. | ||
:type last_action_time: datetime | ||
:param resource_location: 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. | ||
:type resource_location: str | ||
:param message: Show failure message when operation fails (omitted when | ||
operation succeeds). | ||
:type message: str | ||
""" | ||
|
||
_validation = { | ||
'status': {'required': True}, | ||
'created_time': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'status': {'key': 'status', 'type': 'OperationStatusType'}, | ||
'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, | ||
'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, | ||
'resource_location': {'key': 'resourceLocation', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(OperationStatus, self).__init__(**kwargs) | ||
self.status = kwargs.get('status', None) | ||
self.created_time = kwargs.get('created_time', None) | ||
self.last_action_time = kwargs.get('last_action_time', None) | ||
self.resource_location = kwargs.get('resource_location', None) | ||
self.message = kwargs.get('message', None) |
73 changes: 73 additions & 0 deletions
73
...veservices-vision-face/azure/cognitiveservices/vision/face/models/operation_status_py3.py
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 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# 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. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class OperationStatus(Model): | ||
"""Operation status object. Operation refers to the asynchronous backend task | ||
including taking a snapshot and applying a snapshot. | ||
All required parameters must be populated in order to send to Azure. | ||
:param status: Required. 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' | ||
:type status: str or | ||
~azure.cognitiveservices.vision.face.models.OperationStatusType | ||
:param created_time: Required. 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. | ||
:type created_time: datetime | ||
:param last_action_time: 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. | ||
:type last_action_time: datetime | ||
:param resource_location: 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. | ||
:type resource_location: str | ||
:param message: Show failure message when operation fails (omitted when | ||
operation succeeds). | ||
:type message: str | ||
""" | ||
|
||
_validation = { | ||
'status': {'required': True}, | ||
'created_time': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'status': {'key': 'status', 'type': 'OperationStatusType'}, | ||
'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, | ||
'last_action_time': {'key': 'lastActionTime', 'type': 'iso-8601'}, | ||
'resource_location': {'key': 'resourceLocation', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, *, status, created_time, last_action_time=None, resource_location: str=None, message: str=None, **kwargs) -> None: | ||
super(OperationStatus, self).__init__(**kwargs) | ||
self.status = status | ||
self.created_time = created_time | ||
self.last_action_time = last_action_time | ||
self.resource_location = resource_location | ||
self.message = message |
Oops, something went wrong.