Skip to content

Commit c330b9f

Browse files
author
SDKAuto
committed
CodeGen from PR 23767 in Azure/azure-rest-api-specs
Merge c5b159251f662084accd38611b44f2b0bfaf5c7e into dbd7b63abbe71ee6d21093d41ca145a15fb046c9
1 parent d31433d commit c330b9f

File tree

153 files changed

+8447
-1390
lines changed

Some content is hidden

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

153 files changed

+8447
-1390
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": "ebf03f09c4907335a16bcda1e2bd1e6dde27e910",
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].8",
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].8 --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: 3 additions & 9 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
@@ -35,14 +29,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
3529
:type credential: ~azure.core.credentials.TokenCredential
3630
:param subscription_id: The ID of the target subscription. Required.
3731
: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.
32+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
39+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
ContainerAppsRevisionsOperations,
3131
ContainerAppsSourceControlsOperations,
3232
DaprComponentsOperations,
33+
JobsExecutionsOperations,
34+
JobsOperations,
35+
ManagedCertificatesOperations,
3336
ManagedEnvironmentDiagnosticsOperations,
3437
ManagedEnvironmentsDiagnosticsOperations,
3538
ManagedEnvironmentsOperations,
@@ -87,11 +90,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
8790
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
8891
:ivar operations: Operations operations
8992
:vartype operations: azure.mgmt.appcontainers.operations.Operations
93+
:ivar jobs: JobsOperations operations
94+
:vartype jobs: azure.mgmt.appcontainers.operations.JobsOperations
95+
:ivar jobs_executions: JobsExecutionsOperations operations
96+
:vartype jobs_executions: azure.mgmt.appcontainers.operations.JobsExecutionsOperations
9097
:ivar managed_environments: ManagedEnvironmentsOperations operations
9198
:vartype managed_environments:
9299
azure.mgmt.appcontainers.operations.ManagedEnvironmentsOperations
93100
:ivar certificates: CertificatesOperations operations
94101
:vartype certificates: azure.mgmt.appcontainers.operations.CertificatesOperations
102+
:ivar managed_certificates: ManagedCertificatesOperations operations
103+
:vartype managed_certificates:
104+
azure.mgmt.appcontainers.operations.ManagedCertificatesOperations
95105
:ivar namespaces: NamespacesOperations operations
96106
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
97107
:ivar dapr_components: DaprComponentsOperations operations
@@ -108,8 +118,8 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
108118
:type subscription_id: str
109119
:param base_url: Service URL. Default value is "https://management.azure.com".
110120
: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.
121+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
122+
this default value may result in unsupported behavior.
113123
:paramtype api_version: str
114124
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
115125
Retry-After header is present.
@@ -125,7 +135,7 @@ def __init__(
125135
self._config = ContainerAppsAPIClientConfiguration(
126136
credential=credential, subscription_id=subscription_id, **kwargs
127137
)
128-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
138+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
129139

130140
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
131141
self._serialize = Serializer(client_models)
@@ -167,10 +177,15 @@ def __init__(
167177
self._client, self._config, self._serialize, self._deserialize
168178
)
169179
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
180+
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
181+
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
170182
self.managed_environments = ManagedEnvironmentsOperations(
171183
self._client, self._config, self._serialize, self._deserialize
172184
)
173185
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
186+
self.managed_certificates = ManagedCertificatesOperations(
187+
self._client, self._config, self._serialize, self._deserialize
188+
)
174189
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
175190
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
176191
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/_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: 3 additions & 9 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
@@ -35,14 +29,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
3529
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3630
:param subscription_id: The ID of the target subscription. Required.
3731
: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.
32+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
39+
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
ContainerAppsRevisionsOperations,
3131
ContainerAppsSourceControlsOperations,
3232
DaprComponentsOperations,
33+
JobsExecutionsOperations,
34+
JobsOperations,
35+
ManagedCertificatesOperations,
3336
ManagedEnvironmentDiagnosticsOperations,
3437
ManagedEnvironmentsDiagnosticsOperations,
3538
ManagedEnvironmentsOperations,
@@ -87,11 +90,18 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
8790
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsDiagnosticsOperations
8891
:ivar operations: Operations operations
8992
:vartype operations: azure.mgmt.appcontainers.aio.operations.Operations
93+
:ivar jobs: JobsOperations operations
94+
:vartype jobs: azure.mgmt.appcontainers.aio.operations.JobsOperations
95+
:ivar jobs_executions: JobsExecutionsOperations operations
96+
:vartype jobs_executions: azure.mgmt.appcontainers.aio.operations.JobsExecutionsOperations
9097
:ivar managed_environments: ManagedEnvironmentsOperations operations
9198
:vartype managed_environments:
9299
azure.mgmt.appcontainers.aio.operations.ManagedEnvironmentsOperations
93100
:ivar certificates: CertificatesOperations operations
94101
:vartype certificates: azure.mgmt.appcontainers.aio.operations.CertificatesOperations
102+
:ivar managed_certificates: ManagedCertificatesOperations operations
103+
:vartype managed_certificates:
104+
azure.mgmt.appcontainers.aio.operations.ManagedCertificatesOperations
95105
:ivar namespaces: NamespacesOperations operations
96106
:vartype namespaces: azure.mgmt.appcontainers.aio.operations.NamespacesOperations
97107
:ivar dapr_components: DaprComponentsOperations operations
@@ -108,8 +118,8 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
108118
:type subscription_id: str
109119
:param base_url: Service URL. Default value is "https://management.azure.com".
110120
: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.
121+
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
122+
this default value may result in unsupported behavior.
113123
:paramtype api_version: str
114124
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
115125
Retry-After header is present.
@@ -125,7 +135,7 @@ def __init__(
125135
self._config = ContainerAppsAPIClientConfiguration(
126136
credential=credential, subscription_id=subscription_id, **kwargs
127137
)
128-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
138+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
129139

130140
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
131141
self._serialize = Serializer(client_models)
@@ -167,10 +177,15 @@ def __init__(
167177
self._client, self._config, self._serialize, self._deserialize
168178
)
169179
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
180+
self.jobs = JobsOperations(self._client, self._config, self._serialize, self._deserialize)
181+
self.jobs_executions = JobsExecutionsOperations(self._client, self._config, self._serialize, self._deserialize)
170182
self.managed_environments = ManagedEnvironmentsOperations(
171183
self._client, self._config, self._serialize, self._deserialize
172184
)
173185
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
186+
self.managed_certificates = ManagedCertificatesOperations(
187+
self._client, self._config, self._serialize, self._deserialize
188+
)
174189
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
175190
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
176191
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
from ._managed_environment_diagnostics_operations import ManagedEnvironmentDiagnosticsOperations
2121
from ._managed_environments_diagnostics_operations import ManagedEnvironmentsDiagnosticsOperations
2222
from ._operations import Operations
23+
from ._jobs_operations import JobsOperations
24+
from ._jobs_executions_operations import JobsExecutionsOperations
2325
from ._managed_environments_operations import ManagedEnvironmentsOperations
2426
from ._certificates_operations import CertificatesOperations
27+
from ._managed_certificates_operations import ManagedCertificatesOperations
2528
from ._namespaces_operations import NamespacesOperations
2629
from ._dapr_components_operations import DaprComponentsOperations
2730
from ._managed_environments_storages_operations import ManagedEnvironmentsStoragesOperations
@@ -46,8 +49,11 @@
4649
"ManagedEnvironmentDiagnosticsOperations",
4750
"ManagedEnvironmentsDiagnosticsOperations",
4851
"Operations",
52+
"JobsOperations",
53+
"JobsExecutionsOperations",
4954
"ManagedEnvironmentsOperations",
5055
"CertificatesOperations",
56+
"ManagedCertificatesOperations",
5157
"NamespacesOperations",
5258
"DaprComponentsOperations",
5359
"ManagedEnvironmentsStoragesOperations",

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_available_workload_profiles_operations.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
1110
import urllib.parse
1211

@@ -30,10 +29,6 @@
3029
from ..._vendor import _convert_request
3130
from ...operations._available_workload_profiles_operations import build_get_request
3231

33-
if sys.version_info >= (3, 8):
34-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
35-
else:
36-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3732
T = TypeVar("T")
3833
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3934

@@ -75,9 +70,7 @@ def get(self, location: str, **kwargs: Any) -> AsyncIterable["_models.AvailableW
7570
_headers = kwargs.pop("headers", {}) or {}
7671
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
7772

78-
api_version: Literal["2022-10-01"] = kwargs.pop(
79-
"api_version", _params.pop("api-version", self._config.api_version)
80-
)
73+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
8174
cls: ClsType[_models.AvailableWorkloadProfilesCollection] = kwargs.pop("cls", None)
8275

8376
error_map = {
@@ -130,8 +123,9 @@ async def extract_data(pipeline_response):
130123
async def get_next(next_link=None):
131124
request = prepare_request(next_link)
132125

126+
_stream = False
133127
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
134-
request, stream=False, **kwargs
128+
request, stream=_stream, **kwargs
135129
)
136130
response = pipeline_response.http_response
137131

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/aio/operations/_billing_meters_operations.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, Callable, Dict, Optional, TypeVar
1110

1211
from azure.core.exceptions import (
@@ -28,10 +27,6 @@
2827
from ..._vendor import _convert_request
2928
from ...operations._billing_meters_operations import build_get_request
3029

31-
if sys.version_info >= (3, 8):
32-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
33-
else:
34-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3530
T = TypeVar("T")
3631
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3732

@@ -79,9 +74,7 @@ async def get(self, location: str, **kwargs: Any) -> _models.BillingMeterCollect
7974
_headers = kwargs.pop("headers", {}) or {}
8075
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
8176

82-
api_version: Literal["2022-10-01"] = kwargs.pop(
83-
"api_version", _params.pop("api-version", self._config.api_version)
84-
)
77+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
8578
cls: ClsType[_models.BillingMeterCollection] = kwargs.pop("cls", None)
8679

8780
request = build_get_request(
@@ -95,8 +88,9 @@ async def get(self, location: str, **kwargs: Any) -> _models.BillingMeterCollect
9588
request = _convert_request(request)
9689
request.url = self._client.format_url(request.url)
9790

91+
_stream = False
9892
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
99-
request, stream=False, **kwargs
93+
request, stream=_stream, **kwargs
10094
)
10195

10296
response = pipeline_response.http_response

0 commit comments

Comments
 (0)