Skip to content

Commit

Permalink
CodeGen from PR 32790 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8a5c9004bc5aa953d94c08abbaa374966536cdee into f3721c713f9e44b59be3338ee4f4358a5fabe60c
  • Loading branch information
SDKAuto committed Feb 25, 2025
1 parent 45170c9 commit 4b958df
Show file tree
Hide file tree
Showing 139 changed files with 7,807 additions and 2,282 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "93a8154cfee7eb198397e256357fa60dce671763",
"commit": "80e1b1c80125fad23883db488d6205b827110002",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.26.4",
"@autorest/python@6.27.4",
"@autorest/[email protected]"
],
"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/python@6.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"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/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/servicefabricmanagedclusters/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class ServiceFabricManagedClustersManagementClientConfiguration: # pylint: disa
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The customer subscription identifier. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
api_version: str = kwargs.pop("api_version", "2024-11-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
return ET.Element(tag)


class Model(object):
class Model:
"""Mixin for all client request body/response body models to support
serialization and deserialization.
"""
Expand Down Expand Up @@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
return key.replace("\\.", ".")


class Serializer(object): # pylint: disable=too-many-public-methods
class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""

basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
Expand Down Expand Up @@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
return children[0]


class Deserializer(object):
class Deserializer:
"""Response object model deserializer.
:param dict classes: Class type dictionary for deserializing complex types.
Expand Down Expand Up @@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
subtype = getattr(response, "_subtype_map", {})
try:
readonly = [
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("readonly")
]
const = [
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("constant")
]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
response_obj.additional_properties = additional_properties
response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,43 +43,43 @@
class ServiceFabricManagedClustersManagementClient: # pylint: disable=too-many-instance-attributes,name-too-long
"""Service Fabric Managed Clusters Management Client.
:ivar applications: ApplicationsOperations operations
:vartype applications:
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
:ivar application_types: ApplicationTypesOperations operations
:vartype application_types:
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypesOperations
:ivar application_type_versions: ApplicationTypeVersionsOperations operations
:vartype application_type_versions:
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationTypeVersionsOperations
:ivar applications: ApplicationsOperations operations
:vartype applications:
azure.mgmt.servicefabricmanagedclusters.operations.ApplicationsOperations
:ivar services: ServicesOperations operations
:vartype services: azure.mgmt.servicefabricmanagedclusters.operations.ServicesOperations
:ivar managed_clusters: ManagedClustersOperations operations
:vartype managed_clusters:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
:ivar managed_az_resiliency_status: ManagedAzResiliencyStatusOperations operations
:vartype managed_az_resiliency_status:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedAzResiliencyStatusOperations
:ivar managed_maintenance_window_status: ManagedMaintenanceWindowStatusOperations operations
:vartype managed_maintenance_window_status:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedMaintenanceWindowStatusOperations
:ivar managed_apply_maintenance_window: ManagedApplyMaintenanceWindowOperations operations
:vartype managed_apply_maintenance_window:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedApplyMaintenanceWindowOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
:ivar managed_cluster_version: ManagedClusterVersionOperations operations
:vartype managed_cluster_version:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClusterVersionOperations
:ivar managed_unsupported_vm_sizes: ManagedUnsupportedVMSizesOperations operations
:vartype managed_unsupported_vm_sizes:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedUnsupportedVMSizesOperations
:ivar operation_status: OperationStatusOperations operations
:vartype operation_status:
azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
:ivar operation_results: OperationResultsOperations operations
:vartype operation_results:
azure.mgmt.servicefabricmanagedclusters.operations.OperationResultsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.servicefabricmanagedclusters.operations.Operations
:ivar operation_status: OperationStatusOperations operations
:vartype operation_status:
azure.mgmt.servicefabricmanagedclusters.operations.OperationStatusOperations
:ivar managed_unsupported_vm_sizes: ManagedUnsupportedVMSizesOperations operations
:vartype managed_unsupported_vm_sizes:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedUnsupportedVMSizesOperations
:ivar managed_clusters: ManagedClustersOperations operations
:vartype managed_clusters:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedClustersOperations
:ivar managed_apply_maintenance_window: ManagedApplyMaintenanceWindowOperations operations
:vartype managed_apply_maintenance_window:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedApplyMaintenanceWindowOperations
:ivar managed_maintenance_window_status: ManagedMaintenanceWindowStatusOperations operations
:vartype managed_maintenance_window_status:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedMaintenanceWindowStatusOperations
:ivar managed_az_resiliency_status: ManagedAzResiliencyStatusOperations operations
:vartype managed_az_resiliency_status:
azure.mgmt.servicefabricmanagedclusters.operations.ManagedAzResiliencyStatusOperations
:ivar node_types: NodeTypesOperations operations
:vartype node_types: azure.mgmt.servicefabricmanagedclusters.operations.NodeTypesOperations
:ivar node_type_skus: NodeTypeSkusOperations operations
Expand All @@ -91,7 +91,7 @@ class ServiceFabricManagedClustersManagementClient: # pylint: disable=too-many-
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -132,39 +132,39 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.application_types = ApplicationTypesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.application_type_versions = ApplicationTypeVersionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.applications = ApplicationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.managed_clusters = ManagedClustersOperations(
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.managed_cluster_version = ManagedClusterVersionOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.managed_az_resiliency_status = ManagedAzResiliencyStatusOperations(
self.operation_results = OperationResultsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.managed_maintenance_window_status = ManagedMaintenanceWindowStatusOperations(
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.managed_apply_maintenance_window = ManagedApplyMaintenanceWindowOperations(
self.managed_unsupported_vm_sizes = ManagedUnsupportedVMSizesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.managed_cluster_version = ManagedClusterVersionOperations(
self.managed_clusters = ManagedClustersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.managed_unsupported_vm_sizes = ManagedUnsupportedVMSizesOperations(
self.managed_apply_maintenance_window = ManagedApplyMaintenanceWindowOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operation_status = OperationStatusOperations(
self.managed_maintenance_window_status = ManagedMaintenanceWindowStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operation_results = OperationResultsOperations(
self.managed_az_resiliency_status = ManagedAzResiliencyStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.node_types = NodeTypesOperations(self._client, self._config, self._serialize, self._deserialize)
self.node_type_skus = NodeTypeSkusOperations(self._client, self._config, self._serialize, self._deserialize)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.1.0b2"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class ServiceFabricManagedClustersManagementClientConfiguration: # pylint: disa
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The customer subscription identifier. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
api_version: str = kwargs.pop("api_version", "2024-11-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading

0 comments on commit 4b958df

Please sign in to comment.