Skip to content

Commit 6d96e1d

Browse files
azclibotSDKAutomsyyc
authored
[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]>
1 parent dda0bb9 commit 6d96e1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+16733
-466
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Release History
22

3+
## 1.0.0 (2021-12-23)
4+
5+
**Features**
6+
7+
- Model OrderItemDetails has a new parameter management_rp_details_list
8+
- Model ReturnOrderItemDetails has a new parameter shipping_box_required
9+
- Model ReturnOrderItemDetails has a new parameter service_tag
10+
- Model AddressResource has a new parameter address_validation_status
11+
- Model DeviceDetails has a new parameter management_resource_tenant_id
12+
- Model ProductFamily has a new parameter resource_provider_details
13+
- Model ProductFamilyProperties has a new parameter resource_provider_details
14+
- Model ProductFamiliesMetadataDetails has a new parameter resource_provider_details
15+
- Model ProductDetails has a new parameter product_double_encryption_status
16+
- Model AddressProperties has a new parameter address_validation_status
17+
18+
**Breaking changes**
19+
20+
- Operation EdgeOrderManagementClientOperationsMixin.list_order_items_at_subscription_level has a new signature
21+
322
## 1.0.0b1 (2021-07-27)
423

524
* Initial Release
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.2",
2+
"autorest": "3.4.5",
33
"use": [
4-
"@autorest/[email protected].1",
4+
"@autorest/[email protected].4",
55
"@autorest/[email protected]"
66
],
7-
"commit": "f985f05e68b7720cd5cd4c55bd89ce8463f7e554",
7+
"commit": "cea6492a1e41b3f3b4f8b4f69bdcc10431e79c0e",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"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",
9+
"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",
1010
"readme": "specification/edgeorder/resource-manager/readme.md"
1111
}

sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# --------------------------------------------------------------------------
88

99
from ._edge_order_management_client import EdgeOrderManagementClient
10-
from ._version import VERSION
11-
12-
__version__ = VERSION
1310
__all__ = ['EdgeOrderManagementClient']
1411

1512
try:

sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
57
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
710
# --------------------------------------------------------------------------
8-
911
from typing import TYPE_CHECKING
1012

1113
from azure.core.configuration import Configuration
@@ -20,7 +22,6 @@
2022

2123
from azure.core.credentials import TokenCredential
2224

23-
2425
class EdgeOrderManagementClientConfiguration(Configuration):
2526
"""Configuration for EdgeOrderManagementClient.
2627
@@ -48,9 +49,8 @@ def __init__(
4849

4950
self.credential = credential
5051
self.subscription_id = subscription_id
51-
self.api_version = "2020-12-01-preview"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
53-
kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION))
53+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-edgeorder/{}'.format(VERSION))
5454
self._configure(**kwargs)
5555

5656
def _configure(
Lines changed: 61 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,112 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
57
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
710
# --------------------------------------------------------------------------
811

912
from typing import TYPE_CHECKING
1013

1114
from azure.mgmt.core import ARMPipelineClient
15+
from azure.profiles import KnownProfiles, ProfileDefinition
16+
from azure.profiles.multiapiclient import MultiApiClientMixin
1217
from msrest import Deserializer, Serializer
1318

19+
from ._configuration import EdgeOrderManagementClientConfiguration
20+
from ._operations_mixin import EdgeOrderManagementClientOperationsMixin
21+
1422
if TYPE_CHECKING:
1523
# pylint: disable=unused-import,ungrouped-imports
1624
from typing import Any, Optional
1725

1826
from azure.core.credentials import TokenCredential
1927
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2028

21-
from ._configuration import EdgeOrderManagementClientConfiguration
22-
from .operations import EdgeOrderManagementClientOperationsMixin
23-
from . import models
29+
class _SDKClient(object):
30+
def __init__(self, *args, **kwargs):
31+
"""This is a fake class to support current implemetation of MultiApiClientMixin."
32+
Will be removed in final version of multiapi azure-core based client
33+
"""
34+
pass
2435

36+
class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient):
37+
"""The EdgeOrder Client.
2538
26-
class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin):
27-
"""Edge Order API's.
39+
This ready contains multiple API versions, to help you deal with all of the Azure clouds
40+
(Azure Stack, Azure Government, Azure China, etc.).
41+
By default, it uses the latest API version available on public Azure.
42+
For production, you should stick to a particular api-version and/or profile.
43+
The profile sets a mapping between an operation group and its API version.
44+
The api-version parameter sets the default API version if the operation
45+
group is not described in the profile.
2846
2947
:param credential: Credential needed for the client to connect to Azure.
3048
:type credential: ~azure.core.credentials.TokenCredential
3149
:param subscription_id: The ID of the target subscription.
3250
:type subscription_id: str
33-
:param str base_url: Service URL
51+
:param api_version: API version to use if no profile is provided, or if missing in profile.
52+
:type api_version: str
53+
:param base_url: Service URL
54+
:type base_url: str
55+
:param profile: A profile definition, from KnownProfiles to dict.
56+
:type profile: azure.profiles.KnownProfiles
3457
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
3558
"""
3659

60+
DEFAULT_API_VERSION = '2021-12-01'
61+
_PROFILE_TAG = "azure.mgmt.edgeorder.EdgeOrderManagementClient"
62+
LATEST_PROFILE = ProfileDefinition({
63+
_PROFILE_TAG: {
64+
None: DEFAULT_API_VERSION,
65+
}},
66+
_PROFILE_TAG + " latest"
67+
)
68+
3769
def __init__(
3870
self,
3971
credential, # type: "TokenCredential"
4072
subscription_id, # type: str
73+
api_version=None, # type: Optional[str]
4174
base_url=None, # type: Optional[str]
75+
profile=KnownProfiles.default, # type: KnownProfiles
4276
**kwargs # type: Any
4377
):
44-
# type: (...) -> None
4578
if not base_url:
4679
base_url = 'https://management.azure.com'
4780
self._config = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs)
4881
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
82+
super(EdgeOrderManagementClient, self).__init__(
83+
api_version=api_version,
84+
profile=profile
85+
)
4986

50-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
51-
self._serialize = Serializer(client_models)
52-
self._serialize.client_side_validation = False
53-
self._deserialize = Deserializer(client_models)
54-
87+
@classmethod
88+
def _models_dict(cls, api_version):
89+
return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)}
5590

56-
def _send_request(self, http_request, **kwargs):
57-
# type: (HttpRequest, Any) -> HttpResponse
58-
"""Runs the network request through the client's chained policies.
91+
@classmethod
92+
def models(cls, api_version=DEFAULT_API_VERSION):
93+
"""Module depends on the API version:
5994
60-
:param http_request: The network request you want to make. Required.
61-
:type http_request: ~azure.core.pipeline.transport.HttpRequest
62-
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
63-
:return: The response of your network call. Does not do error handling on your response.
64-
:rtype: ~azure.core.pipeline.transport.HttpResponse
95+
* 2020-12-01-preview: :mod:`v2020_12_01_preview.models<azure.mgmt.edgeorder.v2020_12_01_preview.models>`
96+
* 2021-12-01: :mod:`v2021_12_01.models<azure.mgmt.edgeorder.v2021_12_01.models>`
6597
"""
66-
path_format_arguments = {
67-
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
68-
}
69-
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
70-
stream = kwargs.pop("stream", True)
71-
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
72-
return pipeline_response.http_response
98+
if api_version == '2020-12-01-preview':
99+
from .v2020_12_01_preview import models
100+
return models
101+
elif api_version == '2021-12-01':
102+
from .v2021_12_01 import models
103+
return models
104+
raise ValueError("API version {} is not available".format(api_version))
73105

74106
def close(self):
75-
# type: () -> None
76107
self._client.close()
77-
78108
def __enter__(self):
79-
# type: () -> EdgeOrderManagementClient
80109
self._client.__enter__()
81110
return self
82-
83111
def __exit__(self, *exc_details):
84-
# type: (Any) -> None
85112
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)