forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AutoRelease] t2-edgeorder-2021-12-13-85711 (Azure#22138)
* CodeGen from PR 16902 in Azure/azure-rest-api-specs Track2 modify readme.go.md 4 (Azure#16902) * Track2 modify readme.go.md 4 * devops * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto <[email protected]> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]>
- Loading branch information
1 parent
92a77a4
commit bf3c7c0
Showing
45 changed files
with
16,733 additions
and
466 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,5 +1,24 @@ | ||
# Release History | ||
|
||
## 1.0.0 (2021-12-23) | ||
|
||
**Features** | ||
|
||
- Model OrderItemDetails has a new parameter management_rp_details_list | ||
- Model ReturnOrderItemDetails has a new parameter shipping_box_required | ||
- Model ReturnOrderItemDetails has a new parameter service_tag | ||
- Model AddressResource has a new parameter address_validation_status | ||
- Model DeviceDetails has a new parameter management_resource_tenant_id | ||
- Model ProductFamily has a new parameter resource_provider_details | ||
- Model ProductFamilyProperties has a new parameter resource_provider_details | ||
- Model ProductFamiliesMetadataDetails has a new parameter resource_provider_details | ||
- Model ProductDetails has a new parameter product_double_encryption_status | ||
- Model AddressProperties has a new parameter address_validation_status | ||
|
||
**Breaking changes** | ||
|
||
- Operation EdgeOrderManagementClientOperationsMixin.list_order_items_at_subscription_level has a new signature | ||
|
||
## 1.0.0b1 (2021-07-27) | ||
|
||
* Initial Release |
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,11 +1,11 @@ | ||
{ | ||
"autorest": "3.4.2", | ||
"autorest": "3.4.5", | ||
"use": [ | ||
"@autorest/[email protected].1", | ||
"@autorest/[email protected].4", | ||
"@autorest/[email protected]" | ||
], | ||
"commit": "f985f05e68b7720cd5cd4c55bd89ce8463f7e554", | ||
"commit": "cea6492a1e41b3f3b4f8b4f69bdcc10431e79c0e", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs", | ||
"autorest_command": "autorest specification/edgeorder/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].1 --use=@autorest/[email protected] --version=3.4.2", | ||
"autorest_command": "autorest specification/edgeorder/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected].4 --use=@autorest/[email protected] --version=3.4.5", | ||
"readme": "specification/edgeorder/resource-manager/readme.md" | ||
} |
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
95 changes: 61 additions & 34 deletions
95
sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.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 |
---|---|---|
@@ -1,85 +1,112 @@ | ||
# 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. | ||
# 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. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from azure.mgmt.core import ARMPipelineClient | ||
from azure.profiles import KnownProfiles, ProfileDefinition | ||
from azure.profiles.multiapiclient import MultiApiClientMixin | ||
from msrest import Deserializer, Serializer | ||
|
||
from ._configuration import EdgeOrderManagementClientConfiguration | ||
from ._operations_mixin import EdgeOrderManagementClientOperationsMixin | ||
|
||
if TYPE_CHECKING: | ||
# pylint: disable=unused-import,ungrouped-imports | ||
from typing import Any, Optional | ||
|
||
from azure.core.credentials import TokenCredential | ||
from azure.core.pipeline.transport import HttpRequest, HttpResponse | ||
|
||
from ._configuration import EdgeOrderManagementClientConfiguration | ||
from .operations import EdgeOrderManagementClientOperationsMixin | ||
from . import models | ||
class _SDKClient(object): | ||
def __init__(self, *args, **kwargs): | ||
"""This is a fake class to support current implemetation of MultiApiClientMixin." | ||
Will be removed in final version of multiapi azure-core based client | ||
""" | ||
pass | ||
|
||
class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): | ||
"""The EdgeOrder Client. | ||
class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): | ||
"""Edge Order API's. | ||
This ready contains multiple API versions, to help you deal with all of the Azure clouds | ||
(Azure Stack, Azure Government, Azure China, etc.). | ||
By default, it uses the latest API version available on public Azure. | ||
For production, you should stick to a particular api-version and/or profile. | ||
The profile sets a mapping between an operation group and its API version. | ||
The api-version parameter sets the default API version if the operation | ||
group is not described in the profile. | ||
:param credential: Credential needed for the client to connect to Azure. | ||
:type credential: ~azure.core.credentials.TokenCredential | ||
:param subscription_id: The ID of the target subscription. | ||
:type subscription_id: str | ||
:param str base_url: Service URL | ||
:param api_version: API version to use if no profile is provided, or if missing in profile. | ||
:type api_version: str | ||
:param base_url: Service URL | ||
:type base_url: str | ||
:param profile: A profile definition, from KnownProfiles to dict. | ||
:type profile: azure.profiles.KnownProfiles | ||
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. | ||
""" | ||
|
||
DEFAULT_API_VERSION = '2021-12-01' | ||
_PROFILE_TAG = "azure.mgmt.edgeorder.EdgeOrderManagementClient" | ||
LATEST_PROFILE = ProfileDefinition({ | ||
_PROFILE_TAG: { | ||
None: DEFAULT_API_VERSION, | ||
}}, | ||
_PROFILE_TAG + " latest" | ||
) | ||
|
||
def __init__( | ||
self, | ||
credential, # type: "TokenCredential" | ||
subscription_id, # type: str | ||
api_version=None, # type: Optional[str] | ||
base_url=None, # type: Optional[str] | ||
profile=KnownProfiles.default, # type: KnownProfiles | ||
**kwargs # type: Any | ||
): | ||
# type: (...) -> None | ||
if not base_url: | ||
base_url = 'https://management.azure.com' | ||
self._config = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) | ||
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) | ||
super(EdgeOrderManagementClient, self).__init__( | ||
api_version=api_version, | ||
profile=profile | ||
) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self._serialize = Serializer(client_models) | ||
self._serialize.client_side_validation = False | ||
self._deserialize = Deserializer(client_models) | ||
|
||
@classmethod | ||
def _models_dict(cls, api_version): | ||
return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} | ||
|
||
def _send_request(self, http_request, **kwargs): | ||
# type: (HttpRequest, Any) -> HttpResponse | ||
"""Runs the network request through the client's chained policies. | ||
@classmethod | ||
def models(cls, api_version=DEFAULT_API_VERSION): | ||
"""Module depends on the API version: | ||
:param http_request: The network request you want to make. Required. | ||
:type http_request: ~azure.core.pipeline.transport.HttpRequest | ||
:keyword bool stream: Whether the response payload will be streamed. Defaults to True. | ||
:return: The response of your network call. Does not do error handling on your response. | ||
:rtype: ~azure.core.pipeline.transport.HttpResponse | ||
* 2020-12-01-preview: :mod:`v2020_12_01_preview.models<azure.mgmt.edgeorder.v2020_12_01_preview.models>` | ||
* 2021-12-01: :mod:`v2021_12_01.models<azure.mgmt.edgeorder.v2021_12_01.models>` | ||
""" | ||
path_format_arguments = { | ||
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), | ||
} | ||
http_request.url = self._client.format_url(http_request.url, **path_format_arguments) | ||
stream = kwargs.pop("stream", True) | ||
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) | ||
return pipeline_response.http_response | ||
if api_version == '2020-12-01-preview': | ||
from .v2020_12_01_preview import models | ||
return models | ||
elif api_version == '2021-12-01': | ||
from .v2021_12_01 import models | ||
return models | ||
raise ValueError("API version {} is not available".format(api_version)) | ||
|
||
def close(self): | ||
# type: () -> None | ||
self._client.close() | ||
|
||
def __enter__(self): | ||
# type: () -> EdgeOrderManagementClient | ||
self._client.__enter__() | ||
return self | ||
|
||
def __exit__(self, *exc_details): | ||
# type: (Any) -> None | ||
self._client.__exit__(*exc_details) |
Oops, something went wrong.