Skip to content

Commit

Permalink
CodeGen from PR 24998 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 525161ddefe2fa216feccff457306dfa2996e6b3 into 266dcae521f4050fecd04e77d649dfa73ff502a3
  • Loading branch information
SDKAuto committed Jul 26, 2023
1 parent 674698c commit aa1d07a
Show file tree
Hide file tree
Showing 121 changed files with 8,176 additions and 16,880 deletions.
10 changes: 5 additions & 5 deletions sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "85ea3e489c45e80383801d4f3a1278f1e687a7b8",
"commit": "e5d51eb92aa680c99f023f32eab20c9e9880a28e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.6",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/azurestackhci/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 --tag=package-preview-2021-09 --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/azurestackhci/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/python@6.6.0 --use=@autorest/modelerfour@4.26.2 --version=3.9.6 --version-tolerant=False",
"readme": "specification/azurestackhci/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,16 @@
from ._configuration import AzureStackHCIClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
ArcSettingsOperations,
ClustersOperations,
ExtensionsOperations,
GalleryimagesOperations,
GalleryImagesOperations,
GuestAgentOperations,
GuestAgentsOperations,
HybridIdentityMetadataOperations,
MachineExtensionsOperations,
MarketplacegalleryimagesOperations,
NetworkinterfacesOperations,
Operations,
StoragecontainersOperations,
VirtualharddisksOperations,
VirtualmachinesOperations,
VirtualnetworksOperations,
MarketplaceGalleryImagesOperations,
NetworkInterfacesOperations,
StorageContainersOperations,
VirtualHardDisksOperations,
VirtualMachineInstancesOperations,
VirtualNetworksOperations,
)

if TYPE_CHECKING:
Expand All @@ -41,45 +36,36 @@
class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Azure Stack HCI management service.
:ivar arc_settings: ArcSettingsOperations operations
:vartype arc_settings: azure.mgmt.azurestackhci.operations.ArcSettingsOperations
:ivar clusters: ClustersOperations operations
:vartype clusters: azure.mgmt.azurestackhci.operations.ClustersOperations
:ivar extensions: ExtensionsOperations operations
:vartype extensions: azure.mgmt.azurestackhci.operations.ExtensionsOperations
:ivar galleryimages: GalleryimagesOperations operations
:vartype galleryimages: azure.mgmt.azurestackhci.operations.GalleryimagesOperations
:ivar marketplacegalleryimages: MarketplacegalleryimagesOperations operations
:vartype marketplacegalleryimages:
azure.mgmt.azurestackhci.operations.MarketplacegalleryimagesOperations
:ivar networkinterfaces: NetworkinterfacesOperations operations
:vartype networkinterfaces: azure.mgmt.azurestackhci.operations.NetworkinterfacesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.azurestackhci.operations.Operations
:ivar storagecontainers: StoragecontainersOperations operations
:vartype storagecontainers: azure.mgmt.azurestackhci.operations.StoragecontainersOperations
:ivar virtualharddisks: VirtualharddisksOperations operations
:vartype virtualharddisks: azure.mgmt.azurestackhci.operations.VirtualharddisksOperations
:ivar virtualmachines: VirtualmachinesOperations operations
:vartype virtualmachines: azure.mgmt.azurestackhci.operations.VirtualmachinesOperations
:ivar gallery_images: GalleryImagesOperations operations
:vartype gallery_images: azure.mgmt.azurestackhci.operations.GalleryImagesOperations
:ivar marketplace_gallery_images: MarketplaceGalleryImagesOperations operations
:vartype marketplace_gallery_images:
azure.mgmt.azurestackhci.operations.MarketplaceGalleryImagesOperations
:ivar network_interfaces: NetworkInterfacesOperations operations
:vartype network_interfaces: azure.mgmt.azurestackhci.operations.NetworkInterfacesOperations
:ivar storage_containers: StorageContainersOperations operations
:vartype storage_containers: azure.mgmt.azurestackhci.operations.StorageContainersOperations
:ivar virtual_hard_disks: VirtualHardDisksOperations operations
:vartype virtual_hard_disks: azure.mgmt.azurestackhci.operations.VirtualHardDisksOperations
:ivar virtual_machine_instances: VirtualMachineInstancesOperations operations
:vartype virtual_machine_instances:
azure.mgmt.azurestackhci.operations.VirtualMachineInstancesOperations
:ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
:vartype hybrid_identity_metadata:
azure.mgmt.azurestackhci.operations.HybridIdentityMetadataOperations
:ivar machine_extensions: MachineExtensionsOperations operations
:vartype machine_extensions: azure.mgmt.azurestackhci.operations.MachineExtensionsOperations
:ivar guest_agent: GuestAgentOperations operations
:vartype guest_agent: azure.mgmt.azurestackhci.operations.GuestAgentOperations
:ivar guest_agents: GuestAgentsOperations operations
:vartype guest_agents: azure.mgmt.azurestackhci.operations.GuestAgentsOperations
:ivar virtualnetworks: VirtualnetworksOperations operations
:vartype virtualnetworks: azure.mgmt.azurestackhci.operations.VirtualnetworksOperations
:ivar virtual_networks: VirtualNetworksOperations operations
:vartype virtual_networks: azure.mgmt.azurestackhci.operations.VirtualNetworksOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
: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 "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-07-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 All @@ -96,39 +82,36 @@ def __init__(
self._config = AzureStackHCIClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.arc_settings = ArcSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.galleryimages = GalleryimagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.marketplacegalleryimages = MarketplacegalleryimagesOperations(
self.gallery_images = GalleryImagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.marketplace_gallery_images = MarketplaceGalleryImagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.networkinterfaces = NetworkinterfacesOperations(
self.network_interfaces = NetworkInterfacesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.storagecontainers = StoragecontainersOperations(
self.storage_containers = StorageContainersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.virtualharddisks = VirtualharddisksOperations(
self.virtual_hard_disks = VirtualHardDisksOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.virtualmachines = VirtualmachinesOperations(self._client, self._config, self._serialize, self._deserialize)
self.hybrid_identity_metadata = HybridIdentityMetadataOperations(
self.virtual_machine_instances = VirtualMachineInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.machine_extensions = MachineExtensionsOperations(
self.hybrid_identity_metadata = HybridIdentityMetadataOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.guest_agent = GuestAgentOperations(self._client, self._config, self._serialize, self._deserialize)
self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtualnetworks = VirtualnetworksOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtual_networks = VirtualNetworksOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down Expand Up @@ -159,5 +142,5 @@ def __enter__(self) -> "AzureStackHCIClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -35,14 +29,14 @@ class AzureStackHCIClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-07-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:
super(AzureStackHCIClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview")
api_version: str = kwargs.pop("api_version", "2023-07-01-preview")

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

0 comments on commit aa1d07a

Please sign in to comment.