-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
458 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# pylint: disable=too-many-lines | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
from io import IOBase | ||
|
@@ -34,8 +34,11 @@ | |
build_auth_revoke_refresh_token_request, | ||
build_auth_userinfo_request, | ||
build_config_serve_config_request, | ||
build_jobs_assign_sandbox_request, | ||
build_jobs_delete_bulk_jobs_request, | ||
build_jobs_delete_single_job_request, | ||
build_jobs_get_job_sandbox_request, | ||
build_jobs_get_job_sandboxes_request, | ||
build_jobs_get_job_status_bulk_request, | ||
build_jobs_get_job_status_history_bulk_request, | ||
build_jobs_get_sandbox_file_request, | ||
|
@@ -1072,6 +1075,184 @@ async def initiate_sandbox_upload( | |
|
||
return deserialized | ||
|
||
@distributed_trace_async | ||
async def get_job_sandboxes( | ||
self, job_id: int, **kwargs: Any | ||
) -> Dict[str, List[Any]]: | ||
"""Get Job Sandboxes. | ||
Get input and output sandboxes of given job id at the same time. | ||
:param job_id: Required. | ||
:type job_id: int | ||
:return: dict mapping str to list of any | ||
:rtype: dict[str, list[any]] | ||
:raises ~azure.core.exceptions.HttpResponseError: | ||
""" | ||
error_map = { | ||
401: ClientAuthenticationError, | ||
404: ResourceNotFoundError, | ||
409: ResourceExistsError, | ||
304: ResourceNotModifiedError, | ||
} | ||
error_map.update(kwargs.pop("error_map", {}) or {}) | ||
|
||
_headers = kwargs.pop("headers", {}) or {} | ||
_params = kwargs.pop("params", {}) or {} | ||
|
||
cls: ClsType[Dict[str, List[Any]]] = kwargs.pop("cls", None) | ||
|
||
request = build_jobs_get_job_sandboxes_request( | ||
job_id=job_id, | ||
headers=_headers, | ||
params=_params, | ||
) | ||
request.url = self._client.format_url(request.url) | ||
|
||
_stream = False | ||
pipeline_response: PipelineResponse = ( | ||
await self._client._pipeline.run( # pylint: disable=protected-access | ||
request, stream=_stream, **kwargs | ||
) | ||
) | ||
|
||
response = pipeline_response.http_response | ||
|
||
if response.status_code not in [200]: | ||
map_error( | ||
status_code=response.status_code, response=response, error_map=error_map | ||
) | ||
raise HttpResponseError(response=response) | ||
|
||
deserialized = self._deserialize("{[object]}", pipeline_response) | ||
|
||
if cls: | ||
return cls(pipeline_response, deserialized, {}) | ||
|
||
return deserialized | ||
|
||
@distributed_trace_async | ||
async def get_job_sandbox( | ||
self, job_id: int, sandbox_type: Union[str, _models.SandboxType], **kwargs: Any | ||
) -> List[Any]: | ||
"""Get Job Sandbox. | ||
Get input or output sandbox from given job. | ||
:param job_id: Required. | ||
:type job_id: int | ||
:param sandbox_type: Known values are: "input" and "output". Required. | ||
:type sandbox_type: str or ~client.models.SandboxType | ||
:return: list of any | ||
:rtype: list[any] | ||
:raises ~azure.core.exceptions.HttpResponseError: | ||
""" | ||
error_map = { | ||
401: ClientAuthenticationError, | ||
404: ResourceNotFoundError, | ||
409: ResourceExistsError, | ||
304: ResourceNotModifiedError, | ||
} | ||
error_map.update(kwargs.pop("error_map", {}) or {}) | ||
|
||
_headers = kwargs.pop("headers", {}) or {} | ||
_params = kwargs.pop("params", {}) or {} | ||
|
||
cls: ClsType[List[Any]] = kwargs.pop("cls", None) | ||
|
||
request = build_jobs_get_job_sandbox_request( | ||
job_id=job_id, | ||
sandbox_type=sandbox_type, | ||
headers=_headers, | ||
params=_params, | ||
) | ||
request.url = self._client.format_url(request.url) | ||
|
||
_stream = False | ||
pipeline_response: PipelineResponse = ( | ||
await self._client._pipeline.run( # pylint: disable=protected-access | ||
request, stream=_stream, **kwargs | ||
) | ||
) | ||
|
||
response = pipeline_response.http_response | ||
|
||
if response.status_code not in [200]: | ||
map_error( | ||
status_code=response.status_code, response=response, error_map=error_map | ||
) | ||
raise HttpResponseError(response=response) | ||
|
||
deserialized = self._deserialize("[object]", pipeline_response) | ||
|
||
if cls: | ||
return cls(pipeline_response, deserialized, {}) | ||
|
||
return deserialized | ||
|
||
@distributed_trace_async | ||
async def assign_sandbox(self, job_id: int, body: str, **kwargs: Any) -> Any: | ||
"""Assign Sandbox. | ||
Assign Sandbox. | ||
:param job_id: Required. | ||
:type job_id: int | ||
:param body: Required. | ||
:type body: str | ||
:return: any | ||
:rtype: any | ||
:raises ~azure.core.exceptions.HttpResponseError: | ||
""" | ||
error_map = { | ||
401: ClientAuthenticationError, | ||
404: ResourceNotFoundError, | ||
409: ResourceExistsError, | ||
304: ResourceNotModifiedError, | ||
} | ||
error_map.update(kwargs.pop("error_map", {}) or {}) | ||
|
||
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) | ||
_params = kwargs.pop("params", {}) or {} | ||
|
||
content_type: str = kwargs.pop( | ||
"content_type", _headers.pop("Content-Type", "application/json") | ||
) | ||
cls: ClsType[Any] = kwargs.pop("cls", None) | ||
|
||
_content = self._serialize.body(body, "str") | ||
|
||
request = build_jobs_assign_sandbox_request( | ||
job_id=job_id, | ||
content_type=content_type, | ||
content=_content, | ||
headers=_headers, | ||
params=_params, | ||
) | ||
request.url = self._client.format_url(request.url) | ||
|
||
_stream = False | ||
pipeline_response: PipelineResponse = ( | ||
await self._client._pipeline.run( # pylint: disable=protected-access | ||
request, stream=_stream, **kwargs | ||
) | ||
) | ||
|
||
response = pipeline_response.http_response | ||
|
||
if response.status_code not in [200]: | ||
map_error( | ||
status_code=response.status_code, response=response, error_map=error_map | ||
) | ||
raise HttpResponseError(response=response) | ||
|
||
deserialized = self._deserialize("object", pipeline_response) | ||
|
||
if cls: | ||
return cls(pipeline_response, deserialized, {}) | ||
|
||
return deserialized | ||
|
||
@overload | ||
async def submit_bulk_jobs( | ||
self, body: List[str], *, content_type: str = "application/json", **kwargs: Any | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
@@ -38,13 +38,14 @@ | |
from ._enums import ChecksumAlgorithm | ||
from ._enums import Enum0 | ||
from ._enums import Enum1 | ||
from ._enums import Enum10 | ||
from ._enums import Enum11 | ||
from ._enums import Enum12 | ||
from ._enums import Enum2 | ||
from ._enums import Enum3 | ||
from ._enums import Enum4 | ||
from ._enums import JobStatus | ||
from ._enums import SandboxFormat | ||
from ._enums import SandboxType | ||
from ._enums import ScalarSearchOperator | ||
from ._enums import VectorSearchOperator | ||
from ._patch import __all__ as _patch_all | ||
|
@@ -85,13 +86,14 @@ | |
"ChecksumAlgorithm", | ||
"Enum0", | ||
"Enum1", | ||
"Enum10", | ||
"Enum11", | ||
"Enum12", | ||
"Enum2", | ||
"Enum3", | ||
"Enum4", | ||
"JobStatus", | ||
"SandboxFormat", | ||
"SandboxType", | ||
"ScalarSearchOperator", | ||
"VectorSearchOperator", | ||
] | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
@@ -28,14 +28,14 @@ class Enum1(str, Enum, metaclass=CaseInsensitiveEnumMeta): | |
) | ||
|
||
|
||
class Enum10(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""Enum10.""" | ||
class Enum11(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""Enum11.""" | ||
|
||
ASC = "asc" | ||
|
||
|
||
class Enum11(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""Enum11.""" | ||
class Enum12(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""Enum12.""" | ||
|
||
DSC = "dsc" | ||
|
||
|
@@ -84,6 +84,13 @@ class SandboxFormat(str, Enum, metaclass=CaseInsensitiveEnumMeta): | |
TAR_BZ2 = "tar.bz2" | ||
|
||
|
||
class SandboxType(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""Sandbox Type.""" | ||
|
||
INPUT = "input" | ||
OUTPUT = "output" | ||
|
||
|
||
class ScalarSearchOperator(str, Enum, metaclass=CaseInsensitiveEnumMeta): | ||
"""An enumeration.""" | ||
|
||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# coding=utf-8 | ||
# pylint: disable=too-many-lines | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.1, generator: @autorest/[email protected]) | ||
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.0, generator: @autorest/[email protected]) | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
Oops, something went wrong.