Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "894645e485d2f01e83999480d440e1bace3fec9b",
"commit": "f5cc64dff0ec000ad19a8db598fa737c65209129",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].1",
"@autorest/[email protected].7",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/desktopvirtualization/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].1 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/desktopvirtualization/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].7 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/desktopvirtualization/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ class DesktopVirtualizationMgmtClientConfiguration(Configuration): # pylint: di
: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 "2022-09-09". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2022-10-14-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(DesktopVirtualizationMgmtClientConfiguration, self).__init__(**kwargs)
api_version = kwargs.pop("api_version", "2022-09-09") # type: Literal["2022-09-09"]
api_version: Literal["2022-10-14-preview"] = kwargs.pop("api_version", "2022-10-14-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -56,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
kwargs.setdefault("sdk_moniker", "mgmt-desktopvirtualization/{}".format(VERSION))
self._configure(**kwargs)

def _configure(
self, **kwargs # type: Any
):
# type: (...) -> None
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient

from . import models
from . import models as _models
from ._configuration import DesktopVirtualizationMgmtClientConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
Expand All @@ -23,6 +23,8 @@
MSIXPackagesOperations,
MsixImagesOperations,
Operations,
PrivateEndpointConnectionsOperations,
PrivateLinkResourcesOperations,
ScalingPlanPooledSchedulesOperations,
ScalingPlansOperations,
SessionHostsOperations,
Expand All @@ -43,6 +45,12 @@ class DesktopVirtualizationMgmtClient: # pylint: disable=client-accepts-api-ver
:vartype operations: azure.mgmt.desktopvirtualization.operations.Operations
:ivar workspaces: WorkspacesOperations operations
:vartype workspaces: azure.mgmt.desktopvirtualization.operations.WorkspacesOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
:vartype private_endpoint_connections:
azure.mgmt.desktopvirtualization.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources:
azure.mgmt.desktopvirtualization.operations.PrivateLinkResourcesOperations
:ivar scaling_plans: ScalingPlansOperations operations
:vartype scaling_plans: azure.mgmt.desktopvirtualization.operations.ScalingPlansOperations
:ivar scaling_plan_pooled_schedules: ScalingPlanPooledSchedulesOperations operations
Expand Down Expand Up @@ -73,8 +81,8 @@ class DesktopVirtualizationMgmtClient: # pylint: disable=client-accepts-api-ver
: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 "2022-09-09". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2022-10-14-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -90,12 +98,18 @@ def __init__(
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
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.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.workspaces = WorkspacesOperations(self._client, self._config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.scaling_plans = ScalingPlansOperations(self._client, self._config, self._serialize, self._deserialize)
self.scaling_plan_pooled_schedules = ScalingPlanPooledSchedulesOperations(
self._client, self._config, self._serialize, self._deserialize
Expand Down Expand Up @@ -134,15 +148,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

def close(self):
# type: () -> None
def close(self) -> None:
self._client.close()

def __enter__(self):
# type: () -> DesktopVirtualizationMgmtClient
def __enter__(self) -> "DesktopVirtualizationMgmtClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
def __exit__(self, *exc_details) -> None:
self._client.__exit__(*exc_details)
Loading