Skip to content

Commit 2947da4

Browse files
author
SDKAuto
committed
CodeGen from PR 18692 in Azure/azure-rest-api-specs
Merge 3801f46f2cc816c70d813f13423891a59cedd523 into f20b48325931fd0f2a42dc6d7545f13bb586f206
1 parent 60f878a commit 2947da4

File tree

76 files changed

+4265
-168
lines changed

Some content is hidden

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

76 files changed

+4265
-168
lines changed

sdk/resources/azure-mgmt-resource/_meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"@autorest/[email protected]",
55
"@autorest/[email protected]"
66
],
7-
"commit": "7541a993a77afbb3ef49f9b0b93b537af093e8da",
7+
"commit": "d96cc3b17a5c9867b072dc737bf0a388fc445d13",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
9+
"autorest_command": "autorest specification/resources/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
1010
"readme": "specification/resources/resource-manager/readme.md"
1111
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_changes_client.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,29 +96,16 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9696
raise ValueError("API version {} is not available".format(api_version))
9797

9898
@property
99-
def change_resource(self):
99+
def changes(self):
100100
"""Instance depends on the API version:
101101
102-
* 2022-03-01-preview: :class:`ChangeResourceOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourceOperations>`
102+
* 2022-03-01-preview: :class:`ChangesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangesOperations>`
103103
"""
104-
api_version = self._get_api_version('change_resource')
104+
api_version = self._get_api_version('changes')
105105
if api_version == '2022-03-01-preview':
106-
from .v2022_03_01_preview.operations import ChangeResourceOperations as OperationClass
106+
from .v2022_03_01_preview.operations import ChangesOperations as OperationClass
107107
else:
108-
raise ValueError("API version {} does not have operation group 'change_resource'".format(api_version))
109-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
110-
111-
@property
112-
def change_resources(self):
113-
"""Instance depends on the API version:
114-
115-
* 2022-03-01-preview: :class:`ChangeResourcesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourcesOperations>`
116-
"""
117-
api_version = self._get_api_version('change_resources')
118-
if api_version == '2022-03-01-preview':
119-
from .v2022_03_01_preview.operations import ChangeResourcesOperations as OperationClass
120-
else:
121-
raise ValueError("API version {} does not have operation group 'change_resources'".format(api_version))
108+
raise ValueError("API version {} does not have operation group 'changes'".format(api_version))
122109
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
123110

124111
def close(self):

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/aio/_changes_client.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -95,29 +95,16 @@ def models(cls, api_version=DEFAULT_API_VERSION):
9595
raise ValueError("API version {} is not available".format(api_version))
9696

9797
@property
98-
def change_resource(self):
98+
def changes(self):
9999
"""Instance depends on the API version:
100100
101-
* 2022-03-01-preview: :class:`ChangeResourceOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourceOperations>`
101+
* 2022-03-01-preview: :class:`ChangesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangesOperations>`
102102
"""
103-
api_version = self._get_api_version('change_resource')
103+
api_version = self._get_api_version('changes')
104104
if api_version == '2022-03-01-preview':
105-
from ..v2022_03_01_preview.aio.operations import ChangeResourceOperations as OperationClass
105+
from ..v2022_03_01_preview.aio.operations import ChangesOperations as OperationClass
106106
else:
107-
raise ValueError("API version {} does not have operation group 'change_resource'".format(api_version))
108-
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
109-
110-
@property
111-
def change_resources(self):
112-
"""Instance depends on the API version:
113-
114-
* 2022-03-01-preview: :class:`ChangeResourcesOperations<azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourcesOperations>`
115-
"""
116-
api_version = self._get_api_version('change_resources')
117-
if api_version == '2022-03-01-preview':
118-
from ..v2022_03_01_preview.aio.operations import ChangeResourcesOperations as OperationClass
119-
else:
120-
raise ValueError("API version {} does not have operation group 'change_resources'".format(api_version))
107+
raise ValueError("API version {} does not have operation group 'changes'".format(api_version))
121108
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
122109

123110
async def close(self):

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/_changes_client.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from . import models
1818
from ._configuration import ChangesClientConfiguration
19-
from .operations import ChangeResourceOperations, ChangeResourcesOperations
19+
from .operations import ChangesOperations
2020

2121
if TYPE_CHECKING:
2222
# pylint: disable=unused-import,ungrouped-imports
@@ -25,12 +25,8 @@
2525
class ChangesClient:
2626
"""The Resource Changes Client.
2727
28-
:ivar change_resources: ChangeResourcesOperations operations
29-
:vartype change_resources:
30-
azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourcesOperations
31-
:ivar change_resource: ChangeResourceOperations operations
32-
:vartype change_resource:
33-
azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangeResourceOperations
28+
:ivar changes: ChangesOperations operations
29+
:vartype changes: azure.mgmt.resource.changes.v2022_03_01_preview.operations.ChangesOperations
3430
:param credential: Credential needed for the client to connect to Azure.
3531
:type credential: ~azure.core.credentials.TokenCredential
3632
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
@@ -57,8 +53,7 @@ def __init__(
5753
self._serialize = Serializer(client_models)
5854
self._deserialize = Deserializer(client_models)
5955
self._serialize.client_side_validation = False
60-
self.change_resources = ChangeResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
61-
self.change_resource = ChangeResourceOperations(self._client, self._config, self._serialize, self._deserialize)
56+
self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize)
6257

6358

6459
def _send_request(

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/_metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
9898
},
9999
"operation_groups": {
100-
"change_resources": "ChangeResourcesOperations",
101-
"change_resource": "ChangeResourceOperations"
100+
"changes": "ChangesOperations"
102101
}
103102
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "21.1.0b1"
9+
VERSION = "1.0.0b1"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/aio/_changes_client.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from .. import models
1818
from ._configuration import ChangesClientConfiguration
19-
from .operations import ChangeResourceOperations, ChangeResourcesOperations
19+
from .operations import ChangesOperations
2020

2121
if TYPE_CHECKING:
2222
# pylint: disable=unused-import,ungrouped-imports
@@ -25,12 +25,9 @@
2525
class ChangesClient:
2626
"""The Resource Changes Client.
2727
28-
:ivar change_resources: ChangeResourcesOperations operations
29-
:vartype change_resources:
30-
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourcesOperations
31-
:ivar change_resource: ChangeResourceOperations operations
32-
:vartype change_resource:
33-
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangeResourceOperations
28+
:ivar changes: ChangesOperations operations
29+
:vartype changes:
30+
azure.mgmt.resource.changes.v2022_03_01_preview.aio.operations.ChangesOperations
3431
:param credential: Credential needed for the client to connect to Azure.
3532
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3633
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
@@ -57,8 +54,7 @@ def __init__(
5754
self._serialize = Serializer(client_models)
5855
self._deserialize = Deserializer(client_models)
5956
self._serialize.client_side_validation = False
60-
self.change_resources = ChangeResourcesOperations(self._client, self._config, self._serialize, self._deserialize)
61-
self.change_resource = ChangeResourceOperations(self._client, self._config, self._serialize, self._deserialize)
57+
self.changes = ChangesOperations(self._client, self._config, self._serialize, self._deserialize)
6258

6359

6460
def _send_request(

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/aio/operations/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._operations import ChangeResourcesOperations
10-
from ._operations import ChangeResourceOperations
9+
from ._operations import ChangesOperations
1110

1211
__all__ = [
13-
'ChangeResourcesOperations',
14-
'ChangeResourceOperations',
12+
'ChangesOperations',
1513
]

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/aio/operations/_operations.py

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
from ... import models as _models
2121
from ..._vendor import _convert_request
22-
from ...operations._operations import build_change_resource_get_request, build_change_resources_list_request
22+
from ...operations._operations import build_changes_get_request, build_changes_list_request
2323
T = TypeVar('T')
2424
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
2525

26-
class ChangeResourcesOperations:
27-
"""ChangeResourcesOperations async operations.
26+
class ChangesOperations:
27+
"""ChangesOperations async operations.
2828
2929
You should not instantiate this class directly. Instead, you should create a Client instance that
3030
instantiates it for you and attaches it as an attribute.
@@ -87,7 +87,7 @@ def list(
8787
def prepare_request(next_link=None):
8888
if not next_link:
8989

90-
request = build_change_resources_list_request(
90+
request = build_changes_list_request(
9191
subscription_id=self._config.subscription_id,
9292
resource_group_name=resource_group_name,
9393
resource_provider_namespace=resource_provider_namespace,
@@ -103,7 +103,7 @@ def prepare_request(next_link=None):
103103

104104
else:
105105

106-
request = build_change_resources_list_request(
106+
request = build_changes_list_request(
107107
subscription_id=self._config.subscription_id,
108108
resource_group_name=resource_group_name,
109109
resource_provider_namespace=resource_provider_namespace,
@@ -145,27 +145,6 @@ async def get_next(next_link=None):
145145
get_next, extract_data
146146
)
147147
list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}/providers/Microsoft.Resources/changes"} # type: ignore
148-
class ChangeResourceOperations:
149-
"""ChangeResourceOperations async operations.
150-
151-
You should not instantiate this class directly. Instead, you should create a Client instance that
152-
instantiates it for you and attaches it as an attribute.
153-
154-
:ivar models: Alias to model classes used in this operation group.
155-
:type models: ~azure.mgmt.resource.changes.v2022_03_01_preview.models
156-
:param client: Client for service requests.
157-
:param config: Configuration of service client.
158-
:param serializer: An object model serializer.
159-
:param deserializer: An object model deserializer.
160-
"""
161-
162-
models = _models
163-
164-
def __init__(self, client, config, serializer, deserializer) -> None:
165-
self._client = client
166-
self._serialize = serializer
167-
self._deserialize = deserializer
168-
self._config = config
169148

170149
@distributed_trace_async
171150
async def get(
@@ -203,7 +182,7 @@ async def get(
203182
api_version = kwargs.pop('api_version', "2022-03-01-preview") # type: str
204183

205184

206-
request = build_change_resource_get_request(
185+
request = build_changes_get_request(
207186
subscription_id=self._config.subscription_id,
208187
resource_group_name=resource_group_name,
209188
resource_provider_namespace=resource_provider_namespace,

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/v2022_03_01_preview/operations/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._operations import ChangeResourcesOperations
10-
from ._operations import ChangeResourceOperations
9+
from ._operations import ChangesOperations
1110

1211
__all__ = [
13-
'ChangeResourcesOperations',
14-
'ChangeResourceOperations',
12+
'ChangesOperations',
1513
]

0 commit comments

Comments
 (0)