Skip to content

Commit 2d34bc2

Browse files
author
SDKAuto
committed
CodeGen from PR 32790 in Azure/azure-rest-api-specs
Merge bdde0675d729f9bfa6a65f18f0cde33350cbb053 into fcd1c4977ad31417ab298205e87727c4cc8474f1
1 parent a6f978c commit 2d34bc2

File tree

155 files changed

+29298
-26207
lines changed

Some content is hidden

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

155 files changed

+29298
-26207
lines changed
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
{
2-
"commit": "93a8154cfee7eb198397e256357fa60dce671763",
2+
"commit": "ff801419b36322cb39418898abf5869848d17f13",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/[email protected]",
7-
"@autorest/[email protected]"
8-
],
9-
"autorest_command": "autorest specification/servicefabricmanagedclusters/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/servicefabricmanagedclusters/resource-manager/readme.md"
4+
"typespec_src": "specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management",
5+
"@azure-tools/typespec-python": "0.38.4"
116
}

sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters/apiview-properties.json

Lines changed: 219 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._service_fabric_managed_clusters_management_client import ServiceFabricManagedClustersManagementClient # type: ignore
15+
from ._client import ServiceFabricClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION
@@ -25,7 +25,7 @@
2525
from ._patch import patch_sdk as _patch_sdk
2626

2727
__all__ = [
28-
"ServiceFabricManagedClustersManagementClient",
28+
"ServiceFabricClient",
2929
]
3030
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
3131

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -15,20 +15,18 @@
1515
from azure.mgmt.core import ARMPipelineClient
1616
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1717

18-
from . import models as _models
19-
from ._configuration import ServiceFabricManagedClustersManagementClientConfiguration
18+
from ._configuration import ServiceFabricClientConfiguration
2019
from ._serialization import Deserializer, Serializer
2120
from .operations import (
2221
ApplicationTypeVersionsOperations,
2322
ApplicationTypesOperations,
2423
ApplicationsOperations,
25-
ManagedApplyMaintenanceWindowOperations,
26-
ManagedAzResiliencyStatusOperations,
24+
ManagedClusterCodeVersionResultOpsOperations,
25+
ManagedClusterCodeVersionResultsOperations,
2726
ManagedClusterVersionOperations,
27+
ManagedClusterVersionOpsOperations,
2828
ManagedClustersOperations,
29-
ManagedMaintenanceWindowStatusOperations,
30-
ManagedUnsupportedVMSizesOperations,
31-
NodeTypeSkusOperations,
29+
ManagedVMSizesOperations,
3230
NodeTypesOperations,
3331
OperationResultsOperations,
3432
OperationStatusOperations,
@@ -40,59 +38,59 @@
4038
from azure.core.credentials import TokenCredential
4139

4240

43-
class ServiceFabricManagedClustersManagementClient: # pylint: disable=too-many-instance-attributes,name-too-long
41+
class ServiceFabricClient: # pylint: disable=too-many-instance-attributes
4442
"""Service Fabric Managed Clusters Management Client.
4543
44+
:ivar operations: Operations operations
45+
:vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
46+
:ivar applications: ApplicationsOperations operations
47+
:vartype applications:
48+
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
4649
:ivar application_types: ApplicationTypesOperations operations
4750
:vartype application_types:
4851
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypesOperations
4952
:ivar application_type_versions: ApplicationTypeVersionsOperations operations
5053
:vartype application_type_versions:
5154
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypeVersionsOperations
52-
:ivar applications: ApplicationsOperations operations
53-
:vartype applications:
54-
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
5555
:ivar services: ServicesOperations operations
5656
:vartype services: azure.mgmt.servicefabricmanagedclusters.operations.ServicesOperations
57-
:ivar managed_clusters: ManagedClustersOperations operations
58-
:vartype managed_clusters:
59-
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
60-
:ivar managed_az_resiliency_status: ManagedAzResiliencyStatusOperations operations
61-
:vartype managed_az_resiliency_status:
62-
azure.mgmt.servicefabricmanagedclusters.operations.ManagedAzResiliencyStatusOperations
63-
:ivar managed_maintenance_window_status: ManagedMaintenanceWindowStatusOperations operations
64-
:vartype managed_maintenance_window_status:
65-
azure.mgmt.servicefabricmanagedclusters.operations.ManagedMaintenanceWindowStatusOperations
66-
:ivar managed_apply_maintenance_window: ManagedApplyMaintenanceWindowOperations operations
67-
:vartype managed_apply_maintenance_window:
68-
azure.mgmt.servicefabricmanagedclusters.operations.ManagedApplyMaintenanceWindowOperations
57+
:ivar managed_cluster_code_version_result_ops: ManagedClusterCodeVersionResultOpsOperations
58+
operations
59+
:vartype managed_cluster_code_version_result_ops:
60+
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterCodeVersionResultOpsOperations
61+
:ivar managed_cluster_code_version_results: ManagedClusterCodeVersionResultsOperations
62+
operations
63+
:vartype managed_cluster_code_version_results:
64+
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterCodeVersionResultsOperations
65+
:ivar managed_cluster_version_ops: ManagedClusterVersionOpsOperations operations
66+
:vartype managed_cluster_version_ops:
67+
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterVersionOpsOperations
6968
:ivar managed_cluster_version: ManagedClusterVersionOperations operations
7069
:vartype managed_cluster_version:
7170
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterVersionOperations
72-
:ivar managed_unsupported_vm_sizes: ManagedUnsupportedVMSizesOperations operations
73-
:vartype managed_unsupported_vm_sizes:
74-
azure.mgmt.servicefabricmanagedclusters.operations.ManagedUnsupportedVMSizesOperations
75-
:ivar operation_status: OperationStatusOperations operations
76-
:vartype operation_status:
77-
azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
71+
:ivar managed_vm_sizes: ManagedVMSizesOperations operations
72+
:vartype managed_vm_sizes:
73+
azure.mgmt.servicefabricmanagedclusters.operations.ManagedVMSizesOperations
74+
:ivar managed_clusters: ManagedClustersOperations operations
75+
:vartype managed_clusters:
76+
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
77+
:ivar node_types: NodeTypesOperations operations
78+
:vartype node_types: azure.mgmt.servicefabricmanagedclusters.operations.NodeTypesOperations
7879
:ivar operation_results: OperationResultsOperations operations
7980
:vartype operation_results:
8081
azure.mgmt.servicefabricmanagedclusters.operations.OperationResultsOperations
81-
:ivar operations: Operations operations
82-
:vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
83-
:ivar node_types: NodeTypesOperations operations
84-
:vartype node_types: azure.mgmt.servicefabricmanagedclusters.operations.NodeTypesOperations
85-
:ivar node_type_skus: NodeTypeSkusOperations operations
86-
:vartype node_type_skus:
87-
azure.mgmt.servicefabricmanagedclusters.operations.NodeTypeSkusOperations
88-
:param credential: Credential needed for the client to connect to Azure. Required.
82+
:ivar operation_status: OperationStatusOperations operations
83+
:vartype operation_status:
84+
azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
85+
:param credential: Credential used to authenticate requests to the service. Required.
8986
:type credential: ~azure.core.credentials.TokenCredential
90-
:param subscription_id: The customer subscription identifier. Required.
87+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
9188
:type subscription_id: str
92-
:param base_url: Service URL. Default value is "https://management.azure.com".
89+
:param base_url: Service host. Default value is "https://management.azure.com".
9390
:type base_url: str
94-
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
95-
this default value may result in unsupported behavior.
91+
:keyword api_version: The API version to use for this operation. Default value is
92+
"2024-11-01-preview". Note that overriding this default value may result in unsupported
93+
behavior.
9694
:paramtype api_version: str
9795
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
9896
Retry-After header is present.
@@ -105,8 +103,9 @@ def __init__(
105103
base_url: str = "https://management.azure.com",
106104
**kwargs: Any
107105
) -> None:
108-
self._config = ServiceFabricManagedClustersManagementClientConfiguration(
109-
credential=credential, subscription_id=subscription_id, **kwargs
106+
_endpoint = "{endpoint}"
107+
self._config = ServiceFabricClientConfiguration(
108+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
110109
)
111110
_policies = kwargs.pop("policies", None)
112111
if _policies is None:
@@ -126,55 +125,51 @@ def __init__(
126125
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
127126
self._config.http_logging_policy,
128127
]
129-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
128+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
130129

131-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
132-
self._serialize = Serializer(client_models)
133-
self._deserialize = Deserializer(client_models)
130+
self._serialize = Serializer()
131+
self._deserialize = Deserializer()
134132
self._serialize.client_side_validation = False
133+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
134+
self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize)
135135
self.application_types = ApplicationTypesOperations(
136136
self._client, self._config, self._serialize, self._deserialize
137137
)
138138
self.application_type_versions = ApplicationTypeVersionsOperations(
139139
self._client, self._config, self._serialize, self._deserialize
140140
)
141-
self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize)
142141
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
143-
self.managed_clusters = ManagedClustersOperations(
144-
self._client, self._config, self._serialize, self._deserialize
145-
)
146-
self.managed_az_resiliency_status = ManagedAzResiliencyStatusOperations(
142+
self.managed_cluster_code_version_result_ops = ManagedClusterCodeVersionResultOpsOperations(
147143
self._client, self._config, self._serialize, self._deserialize
148144
)
149-
self.managed_maintenance_window_status = ManagedMaintenanceWindowStatusOperations(
145+
self.managed_cluster_code_version_results = ManagedClusterCodeVersionResultsOperations(
150146
self._client, self._config, self._serialize, self._deserialize
151147
)
152-
self.managed_apply_maintenance_window = ManagedApplyMaintenanceWindowOperations(
148+
self.managed_cluster_version_ops = ManagedClusterVersionOpsOperations(
153149
self._client, self._config, self._serialize, self._deserialize
154150
)
155151
self.managed_cluster_version = ManagedClusterVersionOperations(
156152
self._client, self._config, self._serialize, self._deserialize
157153
)
158-
self.managed_unsupported_vm_sizes = ManagedUnsupportedVMSizesOperations(
154+
self.managed_vm_sizes = ManagedVMSizesOperations(self._client, self._config, self._serialize, self._deserialize)
155+
self.managed_clusters = ManagedClustersOperations(
159156
self._client, self._config, self._serialize, self._deserialize
160157
)
161-
self.operation_status = OperationStatusOperations(
158+
self.node_types = NodeTypesOperations(self._client, self._config, self._serialize, self._deserialize)
159+
self.operation_results = OperationResultsOperations(
162160
self._client, self._config, self._serialize, self._deserialize
163161
)
164-
self.operation_results = OperationResultsOperations(
162+
self.operation_status = OperationStatusOperations(
165163
self._client, self._config, self._serialize, self._deserialize
166164
)
167-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
168-
self.node_types = NodeTypesOperations(self._client, self._config, self._serialize, self._deserialize)
169-
self.node_type_skus = NodeTypeSkusOperations(self._client, self._config, self._serialize, self._deserialize)
170165

171-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
166+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
172167
"""Runs the network request through the client's chained policies.
173168
174169
>>> from azure.core.rest import HttpRequest
175170
>>> request = HttpRequest("GET", "https://www.example.org/")
176171
<HttpRequest [GET], url: 'https://www.example.org/'>
177-
>>> response = client._send_request(request)
172+
>>> response = client.send_request(request)
178173
<HttpResponse: 200 OK>
179174
180175
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -187,7 +182,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
187182
"""
188183

189184
request_copy = deepcopy(request)
190-
request_copy.url = self._client.format_url(request_copy.url)
185+
path_format_arguments = {
186+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
187+
}
188+
189+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
191190
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
192191

193192
def close(self) -> None:

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

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -17,23 +17,32 @@
1717
from azure.core.credentials import TokenCredential
1818

1919

20-
class ServiceFabricManagedClustersManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
21-
"""Configuration for ServiceFabricManagedClustersManagementClient.
20+
class ServiceFabricClientConfiguration: # pylint: disable=too-many-instance-attributes
21+
"""Configuration for ServiceFabricClient.
2222
2323
Note that all parameters used to create this instance are saved as instance
2424
attributes.
2525
26-
:param credential: Credential needed for the client to connect to Azure. Required.
26+
:param credential: Credential used to authenticate requests to the service. Required.
2727
:type credential: ~azure.core.credentials.TokenCredential
28-
:param subscription_id: The customer subscription identifier. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
2929
:type subscription_id: str
30-
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
31-
this default value may result in unsupported behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is
33+
"2024-11-01-preview". Note that overriding this default value may result in unsupported
34+
behavior.
3235
:paramtype api_version: str
3336
"""
3437

35-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
38+
def __init__(
39+
self,
40+
credential: "TokenCredential",
41+
subscription_id: str,
42+
base_url: str = "https://management.azure.com",
43+
**kwargs: Any
44+
) -> None:
45+
api_version: str = kwargs.pop("api_version", "2024-11-01-preview")
3746

3847
if credential is None:
3948
raise ValueError("Parameter 'credential' must not be None.")
@@ -42,6 +51,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4251

4352
self.credential = credential
4453
self.subscription_id = subscription_id
54+
self.base_url = base_url
4555
self.api_version = api_version
4656
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4757
kwargs.setdefault("sdk_moniker", "mgmt-servicefabricmanagedclusters/{}".format(VERSION))

0 commit comments

Comments
 (0)