Skip to content

Commit dd1265a

Browse files
author
SDKAuto
committed
CodeGen from PR 24107 in Azure/azure-rest-api-specs
Merge 7690350eeab865a9731b4b71c2d9b29e58dbad0b into dad7d3cc55a6309bd5a35327bf24e3fb363f4777
1 parent 74fee8d commit dd1265a

File tree

159 files changed

+2121
-784
lines changed

Some content is hidden

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

159 files changed

+2121
-784
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "3c639105c011765893db51cbb0dda056e34dc994",
2+
"commit": "ab767a0c0c427d79d8558dce5f9cc3d14b6a16e5",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].8",
6+
"@autorest/[email protected].12",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/app/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].8 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/app/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/app/resource-manager/readme.md"
1111
}

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,35 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
2727
2828
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials.TokenCredential
30+
:param job_name: Job Name. Required.
31+
:type job_name: str
32+
:param job_execution_name: Job execution name. Required.
33+
:type job_execution_name: str
3034
:param subscription_id: The ID of the target subscription. Required.
3135
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
36+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
3337
this default value may result in unsupported behavior.
3438
:paramtype api_version: str
3539
"""
3640

37-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
41+
def __init__(
42+
self, credential: "TokenCredential", job_name: str, job_execution_name: str, subscription_id: str, **kwargs: Any
43+
) -> None:
3844
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")
45+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")
49+
if job_name is None:
50+
raise ValueError("Parameter 'job_name' must not be None.")
51+
if job_execution_name is None:
52+
raise ValueError("Parameter 'job_execution_name' must not be None.")
4353
if subscription_id is None:
4454
raise ValueError("Parameter 'subscription_id' must not be None.")
4555

4656
self.credential = credential
57+
self.job_name = job_name
58+
self.job_execution_name = job_execution_name
4759
self.subscription_id = subscription_id
4860
self.api_version = api_version
4961
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
ConnectedEnvironmentsDaprComponentsOperations,
2424
ConnectedEnvironmentsOperations,
2525
ConnectedEnvironmentsStoragesOperations,
26+
ContainerAppsAPIClientOperationsMixin,
2627
ContainerAppsAuthConfigsOperations,
2728
ContainerAppsDiagnosticsOperations,
2829
ContainerAppsOperations,
@@ -46,7 +47,9 @@
4647
from azure.core.credentials import TokenCredential
4748

4849

49-
class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
50+
class ContainerAppsAPIClient(
51+
ContainerAppsAPIClientOperationsMixin
52+
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
5053
"""ContainerAppsAPIClient.
5154
5255
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
@@ -73,10 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
7376
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
7477
:ivar container_apps: ContainerAppsOperations operations
7578
:vartype container_apps: azure.mgmt.appcontainers.operations.ContainerAppsOperations
76-
:ivar jobs: JobsOperations operations
77-
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
78-
:ivar jobs_executions: JobsExecutionsOperations operations
79-
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
8079
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
8180
:vartype container_apps_revisions:
8281
azure.mgmt.appcontainers.operations.ContainerAppsRevisionsOperations
@@ -94,6 +93,10 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
9493
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
9594
:ivar operations: Operations operations
9695
:vartype operations: azure.mgmt.appcontainers.operations.Operations
96+
:ivar jobs: JobsOperations operations
97+
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
98+
:ivar jobs_executions: JobsExecutionsOperations operations
99+
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
97100
:ivar managed_environments: ManagedEnvironmentsOperations operations
98101
:vartype managed_environments:
99102
azure.mgmt.appcontainers.operations.ManagedEnvironmentsOperations
@@ -114,11 +117,15 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
114117
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
115118
:param credential: Credential needed for the client to connect to Azure. Required.
116119
:type credential: ~azure.core.credentials.TokenCredential
120+
:param job_name: Job Name. Required.
121+
:type job_name: str
122+
:param job_execution_name: Job execution name. Required.
123+
:type job_execution_name: str
117124
:param subscription_id: The ID of the target subscription. Required.
118125
:type subscription_id: str
119126
:param base_url: Service URL. Default value is "https://management.azure.com".
120127
:type base_url: str
121-
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
128+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
122129
this default value may result in unsupported behavior.
123130
:paramtype api_version: str
124131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -128,12 +135,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
128135
def __init__(
129136
self,
130137
credential: "TokenCredential",
138+
job_name: str,
139+
job_execution_name: str,
131140
subscription_id: str,
132141
base_url: str = "https://management.azure.com",
133142
**kwargs: Any
134143
) -> None:
135144
self._config = ContainerAppsAPIClientConfiguration(
136-
credential=credential, subscription_id=subscription_id, **kwargs
145+
credential=credential,
146+
job_name=job_name,
147+
job_execution_name=job_execution_name,
148+
subscription_id=subscription_id,
149+
**kwargs
137150
)
138151
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
139152

@@ -161,8 +174,6 @@ def __init__(
161174
self._client, self._config, self._serialize, self._deserialize
162175
)
163176
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
164-
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
165-
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
166177
self.container_apps_revisions = ContainerAppsRevisionsOperations(
167178
self._client, self._config, self._serialize, self._deserialize
168179
)
@@ -179,6 +190,8 @@ def __init__(
179190
self._client, self._config, self._serialize, self._deserialize
180191
)
181192
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
193+
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
194+
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
182195
self.managed_environments = ManagedEnvironmentsOperations(
183196
self._client, self._config, self._serialize, self._deserialize
184197
)

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_vendor.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
66
# --------------------------------------------------------------------------
77

8-
from typing import List, cast
8+
from abc import ABC
9+
from typing import List, TYPE_CHECKING, cast
910

1011
from azure.core.pipeline.transport import HttpRequest
1112

13+
from ._configuration import ContainerAppsAPIClientConfiguration
14+
15+
if TYPE_CHECKING:
16+
# pylint: disable=unused-import,ungrouped-imports
17+
from azure.core import PipelineClient
18+
19+
from ._serialization import Deserializer, Serializer
20+
1221

1322
def _convert_request(request, files=None):
1423
data = request.content if not files else None
@@ -28,3 +37,12 @@ def _format_url_section(template, **kwargs):
2837
formatted_components = cast(List[str], template.split("/"))
2938
components = [c for c in formatted_components if "{}".format(key.args[0]) not in c]
3039
template = "/".join(components)
40+
41+
42+
class ContainerAppsAPIClientMixinABC(ABC):
43+
"""DO NOT use this class. It is for internal typing use only."""
44+
45+
_client: "PipelineClient"
46+
_config: ContainerAppsAPIClientConfiguration
47+
_serialize: "Serializer"
48+
_deserialize: "Deserializer"

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_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 = "3.0.0b1"
9+
VERSION = "1.0.0b1"

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_configuration.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,40 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
2727
2828
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
30+
:param job_name: Job Name. Required.
31+
:type job_name: str
32+
:param job_execution_name: Job execution name. Required.
33+
:type job_execution_name: str
3034
:param subscription_id: The ID of the target subscription. Required.
3135
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
36+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
3337
this default value may result in unsupported behavior.
3438
:paramtype api_version: str
3539
"""
3640

37-
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
41+
def __init__(
42+
self,
43+
credential: "AsyncTokenCredential",
44+
job_name: str,
45+
job_execution_name: str,
46+
subscription_id: str,
47+
**kwargs: Any
48+
) -> None:
3849
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2022-11-01-preview")
50+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4051

4152
if credential is None:
4253
raise ValueError("Parameter 'credential' must not be None.")
54+
if job_name is None:
55+
raise ValueError("Parameter 'job_name' must not be None.")
56+
if job_execution_name is None:
57+
raise ValueError("Parameter 'job_execution_name' must not be None.")
4358
if subscription_id is None:
4459
raise ValueError("Parameter 'subscription_id' must not be None.")
4560

4661
self.credential = credential
62+
self.job_name = job_name
63+
self.job_execution_name = job_execution_name
4764
self.subscription_id = subscription_id
4865
self.api_version = api_version
4966
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/_container_apps_api_client.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
ConnectedEnvironmentsDaprComponentsOperations,
2424
ConnectedEnvironmentsOperations,
2525
ConnectedEnvironmentsStoragesOperations,
26+
ContainerAppsAPIClientOperationsMixin,
2627
ContainerAppsAuthConfigsOperations,
2728
ContainerAppsDiagnosticsOperations,
2829
ContainerAppsOperations,
@@ -46,7 +47,9 @@
4647
from azure.core.credentials_async import AsyncTokenCredential
4748

4849

49-
class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
50+
class ContainerAppsAPIClient(
51+
ContainerAppsAPIClientOperationsMixin
52+
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
5053
"""ContainerAppsAPIClient.
5154
5255
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
@@ -73,10 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
7376
azure.mgmt.appcontainers.aio.operations.ConnectedEnvironmentsStoragesOperations
7477
:ivar container_apps: ContainerAppsOperations operations
7578
:vartype container_apps: azure.mgmt.appcontainers.aio.operations.ContainerAppsOperations
76-
:ivar jobs: JobsOperations operations
77-
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
78-
:ivar jobs_executions: JobsExecutionsOperations operations
79-
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
8079
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
8180
:vartype container_apps_revisions:
8281
azure.mgmt.appcontainers.aio.operations.ContainerAppsRevisionsOperations
@@ -94,6 +93,10 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
9493
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsDiagnosticsOperations
9594
:ivar operations: Operations operations
9695
:vartype operations: azure.mgmt.appcontainers.aio.operations.Operations
96+
:ivar jobs: JobsOperations operations
97+
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
98+
:ivar jobs_executions: JobsExecutionsOperations operations
99+
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
97100
:ivar managed_environments: ManagedEnvironmentsOperations operations
98101
:vartype managed_environments:
99102
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsOperations
@@ -114,11 +117,15 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
114117
azure.mgmt.appcontainers.aio.operations.ContainerAppsSourceControlsOperations
115118
:param credential: Credential needed for the client to connect to Azure. Required.
116119
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
120+
:param job_name: Job Name. Required.
121+
:type job_name: str
122+
:param job_execution_name: Job execution name. Required.
123+
:type job_execution_name: str
117124
:param subscription_id: The ID of the target subscription. Required.
118125
:type subscription_id: str
119126
:param base_url: Service URL. Default value is "https://management.azure.com".
120127
:type base_url: str
121-
:keyword api_version: Api Version. Default value is "2022-11-01-preview". Note that overriding
128+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
122129
this default value may result in unsupported behavior.
123130
:paramtype api_version: str
124131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -128,12 +135,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
128135
def __init__(
129136
self,
130137
credential: "AsyncTokenCredential",
138+
job_name: str,
139+
job_execution_name: str,
131140
subscription_id: str,
132141
base_url: str = "https://management.azure.com",
133142
**kwargs: Any
134143
) -> None:
135144
self._config = ContainerAppsAPIClientConfiguration(
136-
credential=credential, subscription_id=subscription_id, **kwargs
145+
credential=credential,
146+
job_name=job_name,
147+
job_execution_name=job_execution_name,
148+
subscription_id=subscription_id,
149+
**kwargs
137150
)
138151
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
139152

@@ -161,8 +174,6 @@ def __init__(
161174
self._client, self._config, self._serialize, self._deserialize
162175
)
163176
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
164-
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
165-
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
166177
self.container_apps_revisions = ContainerAppsRevisionsOperations(
167178
self._client, self._config, self._serialize, self._deserialize
168179
)
@@ -179,6 +190,8 @@ def __init__(
179190
self._client, self._config, self._serialize, self._deserialize
180191
)
181192
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
193+
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
194+
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
182195
self.managed_environments = ManagedEnvironmentsOperations(
183196
self._client, self._config, self._serialize, self._deserialize
184197
)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------
7+
8+
from abc import ABC
9+
from typing import TYPE_CHECKING
10+
11+
from azure.core.pipeline.transport import HttpRequest
12+
13+
from ._configuration import ContainerAppsAPIClientConfiguration
14+
15+
if TYPE_CHECKING:
16+
# pylint: disable=unused-import,ungrouped-imports
17+
from azure.core import AsyncPipelineClient
18+
19+
from .._serialization import Deserializer, Serializer
20+
21+
22+
class ContainerAppsAPIClientMixinABC(ABC):
23+
"""DO NOT use this class. It is for internal typing use only."""
24+
25+
_client: "AsyncPipelineClient"
26+
_config: ContainerAppsAPIClientConfiguration
27+
_serialize: "Serializer"
28+
_deserialize: "Deserializer"

0 commit comments

Comments
 (0)