1616 from typing import Any , Optional
1717
1818 from azure .core .credentials import TokenCredential
19+ from azure .core .pipeline .transport import HttpRequest , HttpResponse
1920
20- from ._configuration import ManagedLabsClientConfiguration
21- from .operations import ProviderOperationsOperations
22- from .operations import GlobalUsersOperations
23- from .operations import LabAccountsOperations
21+ from ._configuration import LabServicesClientConfiguration
2422from .operations import Operations
25- from .operations import GalleryImagesOperations
23+ from .operations import OperationResultsOperations
24+ from .operations import LabPlansOperations
25+ from .operations import ImagesOperations
2626from .operations import LabsOperations
27- from .operations import EnvironmentSettingsOperations
28- from .operations import EnvironmentsOperations
2927from .operations import UsersOperations
28+ from .operations import VirtualMachinesOperations
29+ from .operations import SchedulesOperations
3030from . import models
3131
3232
33- class ManagedLabsClient (object ):
34- """The Managed Labs Client .
33+ class LabServicesClient (object ):
34+ """Azure Lab Services REST API .
3535
36- :ivar provider_operations: ProviderOperationsOperations operations
37- :vartype provider_operations: azure.mgmt.labservices.operations.ProviderOperationsOperations
38- :ivar global_users: GlobalUsersOperations operations
39- :vartype global_users: azure.mgmt.labservices.operations.GlobalUsersOperations
40- :ivar lab_accounts: LabAccountsOperations operations
41- :vartype lab_accounts: azure.mgmt.labservices.operations.LabAccountsOperations
4236 :ivar operations: Operations operations
4337 :vartype operations: azure.mgmt.labservices.operations.Operations
44- :ivar gallery_images: GalleryImagesOperations operations
45- :vartype gallery_images: azure.mgmt.labservices.operations.GalleryImagesOperations
38+ :ivar operation_results: OperationResultsOperations operations
39+ :vartype operation_results: azure.mgmt.labservices.operations.OperationResultsOperations
40+ :ivar lab_plans: LabPlansOperations operations
41+ :vartype lab_plans: azure.mgmt.labservices.operations.LabPlansOperations
42+ :ivar images: ImagesOperations operations
43+ :vartype images: azure.mgmt.labservices.operations.ImagesOperations
4644 :ivar labs: LabsOperations operations
4745 :vartype labs: azure.mgmt.labservices.operations.LabsOperations
48- :ivar environment_settings: EnvironmentSettingsOperations operations
49- :vartype environment_settings: azure.mgmt.labservices.operations.EnvironmentSettingsOperations
50- :ivar environments: EnvironmentsOperations operations
51- :vartype environments: azure.mgmt.labservices.operations.EnvironmentsOperations
5246 :ivar users: UsersOperations operations
5347 :vartype users: azure.mgmt.labservices.operations.UsersOperations
48+ :ivar virtual_machines: VirtualMachinesOperations operations
49+ :vartype virtual_machines: azure.mgmt.labservices.operations.VirtualMachinesOperations
50+ :ivar schedules: SchedulesOperations operations
51+ :vartype schedules: azure.mgmt.labservices.operations.SchedulesOperations
5452 :param credential: Credential needed for the client to connect to Azure.
5553 :type credential: ~azure.core.credentials.TokenCredential
56- :param subscription_id: The subscription ID .
54+ :param subscription_id: The ID of the target subscription .
5755 :type subscription_id: str
5856 :param str base_url: Service URL
5957 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
@@ -69,39 +67,55 @@ def __init__(
6967 # type: (...) -> None
7068 if not base_url :
7169 base_url = 'https://management.azure.com'
72- self ._config = ManagedLabsClientConfiguration (credential , subscription_id , ** kwargs )
70+ self ._config = LabServicesClientConfiguration (credential , subscription_id , ** kwargs )
7371 self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
7472
7573 client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
7674 self ._serialize = Serializer (client_models )
7775 self ._serialize .client_side_validation = False
7876 self ._deserialize = Deserializer (client_models )
7977
80- self .provider_operations = ProviderOperationsOperations (
81- self ._client , self ._config , self ._serialize , self ._deserialize )
82- self .global_users = GlobalUsersOperations (
78+ self .operations = Operations (
8379 self ._client , self ._config , self ._serialize , self ._deserialize )
84- self .lab_accounts = LabAccountsOperations (
80+ self .operation_results = OperationResultsOperations (
8581 self ._client , self ._config , self ._serialize , self ._deserialize )
86- self .operations = Operations (
82+ self .lab_plans = LabPlansOperations (
8783 self ._client , self ._config , self ._serialize , self ._deserialize )
88- self .gallery_images = GalleryImagesOperations (
84+ self .images = ImagesOperations (
8985 self ._client , self ._config , self ._serialize , self ._deserialize )
9086 self .labs = LabsOperations (
9187 self ._client , self ._config , self ._serialize , self ._deserialize )
92- self .environment_settings = EnvironmentSettingsOperations (
88+ self .users = UsersOperations (
9389 self ._client , self ._config , self ._serialize , self ._deserialize )
94- self .environments = EnvironmentsOperations (
90+ self .virtual_machines = VirtualMachinesOperations (
9591 self ._client , self ._config , self ._serialize , self ._deserialize )
96- self .users = UsersOperations (
92+ self .schedules = SchedulesOperations (
9793 self ._client , self ._config , self ._serialize , self ._deserialize )
9894
95+ def _send_request (self , http_request , ** kwargs ):
96+ # type: (HttpRequest, Any) -> HttpResponse
97+ """Runs the network request through the client's chained policies.
98+
99+ :param http_request: The network request you want to make. Required.
100+ :type http_request: ~azure.core.pipeline.transport.HttpRequest
101+ :keyword bool stream: Whether the response payload will be streamed. Defaults to True.
102+ :return: The response of your network call. Does not do error handling on your response.
103+ :rtype: ~azure.core.pipeline.transport.HttpResponse
104+ """
105+ path_format_arguments = {
106+ 'subscriptionId' : self ._serialize .url ("self._config.subscription_id" , self ._config .subscription_id , 'str' , min_length = 1 ),
107+ }
108+ http_request .url = self ._client .format_url (http_request .url , ** path_format_arguments )
109+ stream = kwargs .pop ("stream" , True )
110+ pipeline_response = self ._client ._pipeline .run (http_request , stream = stream , ** kwargs )
111+ return pipeline_response .http_response
112+
99113 def close (self ):
100114 # type: () -> None
101115 self ._client .close ()
102116
103117 def __enter__ (self ):
104- # type: () -> ManagedLabsClient
118+ # type: () -> LabServicesClient
105119 self ._client .__enter__ ()
106120 return self
107121
0 commit comments