Skip to content

Commit

Permalink
CodeGen from PR 23230 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 1b6390904e2d68fcbd3fa1ef3dfada9c12a3cd16 into 173bb3b6fd5b1809fdbf347f67fccfa0440ac126
  • Loading branch information
SDKAuto committed May 17, 2023
1 parent 79080d1 commit 2dba5e7
Show file tree
Hide file tree
Showing 128 changed files with 9,522 additions and 21,658 deletions.
6 changes: 3 additions & 3 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": "08195b74615f9745eb40b89e3cb02db8bac2097e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.7",
"@autorest/python@6.4.12",
"@autorest/[email protected]"
],
"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/[email protected] --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.4.12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/azurestackhci/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@
ArcSettingsOperations,
ClustersOperations,
ExtensionsOperations,
GalleryimagesOperations,
GuestAgentOperations,
GuestAgentsOperations,
HybridIdentityMetadataOperations,
MachineExtensionsOperations,
MarketplacegalleryimagesOperations,
NetworkinterfacesOperations,
OffersOperations,
Operations,
StoragecontainersOperations,
VirtualharddisksOperations,
VirtualmachinesOperations,
VirtualnetworksOperations,
PublishersOperations,
SkusOperations,
UpdateRunsOperations,
UpdateSummariesOperations,
UpdatesOperations,
)

if TYPE_CHECKING:
Expand All @@ -47,40 +42,28 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
: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 offers: OffersOperations operations
:vartype offers: azure.mgmt.azurestackhci.operations.OffersOperations
: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 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 publishers: PublishersOperations operations
:vartype publishers: azure.mgmt.azurestackhci.operations.PublishersOperations
:ivar skus: SkusOperations operations
:vartype skus: azure.mgmt.azurestackhci.operations.SkusOperations
:ivar update_runs: UpdateRunsOperations operations
:vartype update_runs: azure.mgmt.azurestackhci.operations.UpdateRunsOperations
:ivar update_summaries: UpdateSummariesOperations operations
:vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
:ivar updates: UpdatesOperations operations
:vartype updates: azure.mgmt.azurestackhci.operations.UpdatesOperations
: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
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-03-01". 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
Retry-After header is present.
Expand All @@ -96,7 +79,7 @@ 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)
Expand All @@ -105,30 +88,15 @@ def __init__(
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._client, self._config, self._serialize, self._deserialize
)
self.networkinterfaces = NetworkinterfacesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.offers = OffersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.storagecontainers = StoragecontainersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.virtualharddisks = 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._client, self._config, self._serialize, self._deserialize
)
self.machine_extensions = MachineExtensionsOperations(
self.publishers = PublishersOperations(self._client, self._config, self._serialize, self._deserialize)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_summaries = UpdateSummariesOperations(
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.updates = UpdatesOperations(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 +127,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
this default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-03-01". 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-03-01")

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

0 comments on commit 2dba5e7

Please sign in to comment.