Skip to content

Commit 2d61895

Browse files
author
SDKAuto
committed
CodeGen from PR 23932 in Azure/azure-rest-api-specs
Merge 1453d69d15773934118b96382cb37a0e9d0902c1 into 45991aaacd9edb148e68a21c0bdc3e7f3e7265c8
1 parent 38ef11a commit 2d61895

File tree

160 files changed

+9622
-1495
lines changed

Some content is hidden

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

160 files changed

+9622
-1495
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "d1b57073903fc64486bf53a37f061e5c7ab9ca31",
2+
"commit": "fa7aaed8e57d2da4873accab1aa4952f84647e52",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].0",
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].0 --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: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -33,23 +27,35 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
3327
3428
:param credential: Credential needed for the client to connect to Azure. Required.
3529
: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
3634
:param subscription_id: The ID of the target subscription. Required.
3735
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
39-
default value may result in unsupported behavior.
36+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
37+
this default value may result in unsupported behavior.
4038
:paramtype api_version: str
4139
"""
4240

43-
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:
4444
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
45+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4646

4747
if credential is None:
4848
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.")
4953
if subscription_id is None:
5054
raise ValueError("Parameter 'subscription_id' must not be None.")
5155

5256
self.credential = credential
57+
self.job_name = job_name
58+
self.job_execution_name = job_execution_name
5359
self.subscription_id = subscription_id
5460
self.api_version = api_version
5561
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: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@
2323
ConnectedEnvironmentsDaprComponentsOperations,
2424
ConnectedEnvironmentsOperations,
2525
ConnectedEnvironmentsStoragesOperations,
26+
ContainerAppsAPIClientOperationsMixin,
2627
ContainerAppsAuthConfigsOperations,
2728
ContainerAppsDiagnosticsOperations,
2829
ContainerAppsOperations,
2930
ContainerAppsRevisionReplicasOperations,
3031
ContainerAppsRevisionsOperations,
3132
ContainerAppsSourceControlsOperations,
3233
DaprComponentsOperations,
34+
JobsExecutionsOperations,
35+
JobsOperations,
36+
ManagedCertificatesOperations,
3337
ManagedEnvironmentDiagnosticsOperations,
3438
ManagedEnvironmentsDiagnosticsOperations,
3539
ManagedEnvironmentsOperations,
@@ -43,7 +47,9 @@
4347
from azure.core.credentials import TokenCredential
4448

4549

46-
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
4753
"""ContainerAppsAPIClient.
4854
4955
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
@@ -87,11 +93,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
8793
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
8894
:ivar operations: Operations operations
8995
: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
90100
:ivar managed_environments: ManagedEnvironmentsOperations operations
91101
:vartype managed_environments:
92102
azure.mgmt.appcontainers.operations.ManagedEnvironmentsOperations
93103
:ivar certificates: CertificatesOperations operations
94104
:vartype certificates: azure.mgmt.appcontainers.operations.CertificatesOperations
105+
:ivar managed_certificates: ManagedCertificatesOperations operations
106+
:vartype managed_certificates:
107+
azure.mgmt.appcontainers.operations.ManagedCertificatesOperations
95108
:ivar namespaces: NamespacesOperations operations
96109
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
97110
:ivar dapr_components: DaprComponentsOperations operations
@@ -104,12 +117,16 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
104117
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
105118
:param credential: Credential needed for the client to connect to Azure. Required.
106119
: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
107124
:param subscription_id: The ID of the target subscription. Required.
108125
:type subscription_id: str
109126
:param base_url: Service URL. Default value is "https://management.azure.com".
110127
:type base_url: str
111-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
112-
default value may result in unsupported behavior.
128+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
129+
this default value may result in unsupported behavior.
113130
:paramtype api_version: str
114131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
115132
Retry-After header is present.
@@ -118,14 +135,20 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
118135
def __init__(
119136
self,
120137
credential: "TokenCredential",
138+
job_name: str,
139+
job_execution_name: str,
121140
subscription_id: str,
122141
base_url: str = "https://management.azure.com",
123142
**kwargs: Any
124143
) -> None:
125144
self._config = ContainerAppsAPIClientConfiguration(
126-
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
127150
)
128-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
151+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
129152

130153
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
131154
self._serialize = Serializer(client_models)
@@ -167,10 +190,15 @@ def __init__(
167190
self._client, self._config, self._serialize, self._deserialize
168191
)
169192
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)
170195
self.managed_environments = ManagedEnvironmentsOperations(
171196
self._client, self._config, self._serialize, self._deserialize
172197
)
173198
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
199+
self.managed_certificates = ManagedCertificatesOperations(
200+
self._client, self._config, self._serialize, self._deserialize
201+
)
174202
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
175203
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
176204
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
629629
if xml_desc.get("attr", False):
630630
if xml_ns:
631631
ET.register_namespace(xml_prefix, xml_ns)
632-
xml_name = "{}{}".format(xml_ns, xml_name)
632+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
633633
serialized.set(xml_name, new_attr) # type: ignore
634634
continue
635635
if xml_desc.get("text", False):
@@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
12711271
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12721272
xml_ns = internal_type_xml_map.get("ns", None)
12731273
if xml_ns:
1274-
xml_name = "{}{}".format(xml_ns, xml_name)
1274+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12751275
return xml_name
12761276

12771277

@@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
12951295
# Integrate namespace if necessary
12961296
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12971297
if xml_ns:
1298-
xml_name = "{}{}".format(xml_ns, xml_name)
1298+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12991299

13001300
# If it's an attribute, that's simple
13011301
if xml_desc.get("attr", False):

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 = "2.0.0"
9+
VERSION = "1.0.0b1"

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

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

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from .._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials_async import AsyncTokenCredential
@@ -33,23 +27,40 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
3327
3428
:param credential: Credential needed for the client to connect to Azure. Required.
3529
: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
3634
:param subscription_id: The ID of the target subscription. Required.
3735
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
39-
default value may result in unsupported behavior.
36+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
37+
this default value may result in unsupported behavior.
4038
:paramtype api_version: str
4139
"""
4240

43-
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:
4449
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
50+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4651

4752
if credential is None:
4853
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.")
4958
if subscription_id is None:
5059
raise ValueError("Parameter 'subscription_id' must not be None.")
5160

5261
self.credential = credential
62+
self.job_name = job_name
63+
self.job_execution_name = job_execution_name
5364
self.subscription_id = subscription_id
5465
self.api_version = api_version
5566
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

0 commit comments

Comments
 (0)