9
9
from copy import deepcopy
10
10
from typing import Any , TYPE_CHECKING
11
11
12
- from msrest import Deserializer , Serializer
13
-
14
12
from azure .core .rest import HttpRequest , HttpResponse
15
13
from azure .mgmt .core import ARMPipelineClient
16
14
17
15
from . import models
18
16
from ._configuration import ChaosManagementClientConfiguration
19
- from .operations import CapabilitiesOperations , CapabilityTypesOperations , ExperimentsOperations , Operations , TargetTypesOperations , TargetsOperations
17
+ from ._serialization import Deserializer , Serializer
18
+ from .operations import (
19
+ CapabilitiesOperations ,
20
+ CapabilityTypesOperations ,
21
+ ExperimentsOperations ,
22
+ Operations ,
23
+ TargetTypesOperations ,
24
+ TargetsOperations ,
25
+ )
20
26
21
27
if TYPE_CHECKING :
22
28
# pylint: disable=unused-import,ungrouped-imports
23
29
from azure .core .credentials import TokenCredential
24
30
25
- class ChaosManagementClient :
31
+
32
+ class ChaosManagementClient : # pylint: disable=client-accepts-api-version-keyword
26
33
"""Chaos Management Client.
27
34
28
35
:ivar capabilities: CapabilitiesOperations operations
29
36
:vartype capabilities: azure.mgmt.chaos.operations.CapabilitiesOperations
37
+ :ivar capability_types: CapabilityTypesOperations operations
38
+ :vartype capability_types: azure.mgmt.chaos.operations.CapabilityTypesOperations
30
39
:ivar experiments: ExperimentsOperations operations
31
40
:vartype experiments: azure.mgmt.chaos.operations.ExperimentsOperations
32
41
:ivar operations: Operations operations
33
42
:vartype operations: azure.mgmt.chaos.operations.Operations
34
- :ivar targets: TargetsOperations operations
35
- :vartype targets: azure.mgmt.chaos.operations.TargetsOperations
36
43
:ivar target_types: TargetTypesOperations operations
37
44
:vartype target_types: azure.mgmt.chaos.operations.TargetTypesOperations
38
- :ivar capability_types: CapabilityTypesOperations operations
39
- :vartype capability_types : azure.mgmt.chaos.operations.CapabilityTypesOperations
40
- :param credential: Credential needed for the client to connect to Azure.
45
+ :ivar targets: TargetsOperations operations
46
+ :vartype targets : azure.mgmt.chaos.operations.TargetsOperations
47
+ :param credential: Credential needed for the client to connect to Azure. Required.
41
48
:type credential: ~azure.core.credentials.TokenCredential
42
- :param subscription_id: GUID that represents an Azure subscription ID.
49
+ :param subscription_id: GUID that represents an Azure subscription ID. Required.
43
50
:type subscription_id: str
44
51
:param base_url: Service URL. Default value is "https://management.azure.com".
45
52
:type base_url: str
46
- :keyword api_version: Api Version. Default value is "2022-07 -01-preview". Note that overriding
53
+ :keyword api_version: Api Version. Default value is "2022-10 -01-preview". Note that overriding
47
54
this default value may result in unsupported behavior.
48
55
:paramtype api_version: str
49
56
"""
@@ -55,38 +62,25 @@ def __init__(
55
62
base_url : str = "https://management.azure.com" ,
56
63
** kwargs : Any
57
64
) -> None :
58
- self ._config = ChaosManagementClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
65
+ self ._config = ChaosManagementClientConfiguration (
66
+ credential = credential , subscription_id = subscription_id , ** kwargs
67
+ )
59
68
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
60
69
61
70
client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
62
71
self ._serialize = Serializer (client_models )
63
72
self ._deserialize = Deserializer (client_models )
64
73
self ._serialize .client_side_validation = False
65
- self .capabilities = CapabilitiesOperations (
66
- self ._client , self ._config , self ._serialize , self ._deserialize
67
- )
68
- self .experiments = ExperimentsOperations (
69
- self ._client , self ._config , self ._serialize , self ._deserialize
70
- )
71
- self .operations = Operations (
72
- self ._client , self ._config , self ._serialize , self ._deserialize
73
- )
74
- self .targets = TargetsOperations (
75
- self ._client , self ._config , self ._serialize , self ._deserialize
76
- )
77
- self .target_types = TargetTypesOperations (
78
- self ._client , self ._config , self ._serialize , self ._deserialize
79
- )
74
+ self .capabilities = CapabilitiesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
80
75
self .capability_types = CapabilityTypesOperations (
81
76
self ._client , self ._config , self ._serialize , self ._deserialize
82
77
)
78
+ self .experiments = ExperimentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
79
+ self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
80
+ self .target_types = TargetTypesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
81
+ self .targets = TargetsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
83
82
84
-
85
- def _send_request (
86
- self ,
87
- request : HttpRequest ,
88
- ** kwargs : Any
89
- ) -> HttpResponse :
83
+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
90
84
"""Runs the network request through the client's chained policies.
91
85
92
86
>>> from azure.core.rest import HttpRequest
@@ -95,7 +89,7 @@ def _send_request(
95
89
>>> response = client._send_request(request)
96
90
<HttpResponse: 200 OK>
97
91
98
- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
92
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
99
93
100
94
:param request: The network request you want to make. Required.
101
95
:type request: ~azure.core.rest.HttpRequest
0 commit comments