9
9
# regenerated.
10
10
# --------------------------------------------------------------------------
11
11
12
- from azure .mgmt .core import AsyncARMPipelineClient
13
- from msrest import Serializer , Deserializer
12
+ from typing import Any , Optional , TYPE_CHECKING
14
13
14
+ from azure .core .pipeline .transport import AsyncHttpResponse , HttpRequest
15
+ from azure .mgmt .core import AsyncARMPipelineClient
15
16
from azure .profiles import KnownProfiles , ProfileDefinition
16
17
from azure .profiles .multiapiclient import MultiApiClientMixin
18
+ from msrest import Deserializer , Serializer
19
+
17
20
from ._configuration import ApplicationInsightsManagementClientConfiguration
18
21
22
+ if TYPE_CHECKING :
23
+ # pylint: disable=unused-import,ungrouped-imports
24
+ from azure .core .credentials_async import AsyncTokenCredential
25
+
19
26
class _SDKClient (object ):
20
27
def __init__ (self , * args , ** kwargs ):
21
28
"""This is a fake class to support current implemetation of MultiApiClientMixin."
@@ -38,9 +45,10 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
38
45
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
39
46
:param subscription_id: The ID of the target subscription.
40
47
:type subscription_id: str
41
- :param str api_version: API version to use if no profile is provided, or if
42
- missing in profile.
43
- :param str base_url: Service URL
48
+ :param api_version: API version to use if no profile is provided, or if missing in profile.
49
+ :type api_version: str
50
+ :param base_url: Service URL
51
+ :type base_url: str
44
52
:param profile: A profile definition, from KnownProfiles to dict.
45
53
:type profile: azure.profiles.KnownProfiles
46
54
"""
@@ -73,11 +81,11 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
73
81
74
82
def __init__ (
75
83
self ,
76
- credential , # type : "AsyncTokenCredential"
77
- subscription_id , # type : str
78
- api_version = None ,
79
- base_url = None ,
80
- profile = KnownProfiles .default ,
84
+ credential : "AsyncTokenCredential" ,
85
+ subscription_id : str ,
86
+ api_version : Optional [ str ] = None ,
87
+ base_url : Optional [ str ] = None ,
88
+ profile : KnownProfiles = KnownProfiles .default ,
81
89
** kwargs # type: Any
82
90
) -> None :
83
91
if not base_url :
@@ -101,7 +109,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
101
109
* 2017-10-01: :mod:`v2017_10_01.models<azure.mgmt.applicationinsights.v2017_10_01.models>`
102
110
* 2018-05-01-preview: :mod:`v2018_05_01_preview.models<azure.mgmt.applicationinsights.v2018_05_01_preview.models>`
103
111
* 2018-06-17-preview: :mod:`v2018_06_17_preview.models<azure.mgmt.applicationinsights.v2018_06_17_preview.models>`
104
- * 2019-09-01-preview: :mod:`v2019_09_01_preview.models<azure.mgmt.applicationinsights.v2019_09_01_preview.models>`
105
112
* 2019-10-17-preview: :mod:`v2019_10_17_preview.models<azure.mgmt.applicationinsights.v2019_10_17_preview.models>`
106
113
* 2020-02-02-preview: :mod:`v2020_02_02_preview.models<azure.mgmt.applicationinsights.v2020_02_02_preview.models>`
107
114
* 2020-03-01-preview: :mod:`v2020_03_01_preview.models<azure.mgmt.applicationinsights.v2020_03_01_preview.models>`
@@ -119,9 +126,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
119
126
elif api_version == '2018-06-17-preview' :
120
127
from ..v2018_06_17_preview import models
121
128
return models
122
- elif api_version == '2019-09-01-preview' :
123
- from ..v2019_09_01_preview import models
124
- return models
125
129
elif api_version == '2019-10-17-preview' :
126
130
from ..v2019_10_17_preview import models
127
131
return models
@@ -368,14 +372,17 @@ def operations(self):
368
372
"""Instance depends on the API version:
369
373
370
374
* 2015-05-01: :class:`Operations<azure.mgmt.applicationinsights.v2015_05_01.aio.operations.Operations>`
371
- * 2019-09-01-preview: :class:`Operations<azure.mgmt.applicationinsights.v2019_09_01_preview.aio.operations.Operations>`
375
+ * 2018-05-01-preview: :class:`Operations<azure.mgmt.applicationinsights.v2018_05_01_preview.aio.operations.Operations>`
376
+ * 2018-06-17-preview: :class:`Operations<azure.mgmt.applicationinsights.v2018_06_17_preview.aio.operations.Operations>`
372
377
* 2020-06-02-preview: :class:`Operations<azure.mgmt.applicationinsights.v2020_06_02_preview.aio.operations.Operations>`
373
378
"""
374
379
api_version = self ._get_api_version ('operations' )
375
380
if api_version == '2015-05-01' :
376
381
from ..v2015_05_01 .aio .operations import Operations as OperationClass
377
- elif api_version == '2019-09-01-preview' :
378
- from ..v2019_09_01_preview .aio .operations import Operations as OperationClass
382
+ elif api_version == '2018-05-01-preview' :
383
+ from ..v2018_05_01_preview .aio .operations import Operations as OperationClass
384
+ elif api_version == '2018-06-17-preview' :
385
+ from ..v2018_06_17_preview .aio .operations import Operations as OperationClass
379
386
elif api_version == '2020-06-02-preview' :
380
387
from ..v2020_06_02_preview .aio .operations import Operations as OperationClass
381
388
else :
@@ -398,32 +405,6 @@ def proactive_detection_configurations(self):
398
405
raise ValueError ("API version {} does not have operation group 'proactive_detection_configurations'" .format (api_version ))
399
406
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
400
407
401
- @property
402
- def queries (self ):
403
- """Instance depends on the API version:
404
-
405
- * 2019-09-01-preview: :class:`QueriesOperations<azure.mgmt.applicationinsights.v2019_09_01_preview.aio.operations.QueriesOperations>`
406
- """
407
- api_version = self ._get_api_version ('queries' )
408
- if api_version == '2019-09-01-preview' :
409
- from ..v2019_09_01_preview .aio .operations import QueriesOperations as OperationClass
410
- else :
411
- raise ValueError ("API version {} does not have operation group 'queries'" .format (api_version ))
412
- return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
413
-
414
- @property
415
- def query_packs (self ):
416
- """Instance depends on the API version:
417
-
418
- * 2019-09-01-preview: :class:`QueryPacksOperations<azure.mgmt.applicationinsights.v2019_09_01_preview.aio.operations.QueryPacksOperations>`
419
- """
420
- api_version = self ._get_api_version ('query_packs' )
421
- if api_version == '2019-09-01-preview' :
422
- from ..v2019_09_01_preview .aio .operations import QueryPacksOperations as OperationClass
423
- else :
424
- raise ValueError ("API version {} does not have operation group 'query_packs'" .format (api_version ))
425
- return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
426
-
427
408
@property
428
409
def web_test_locations (self ):
429
410
"""Instance depends on the API version:
@@ -442,10 +423,13 @@ def web_tests(self):
442
423
"""Instance depends on the API version:
443
424
444
425
* 2015-05-01: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2015_05_01.aio.operations.WebTestsOperations>`
426
+ * 2018-05-01-preview: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.aio.operations.WebTestsOperations>`
445
427
"""
446
428
api_version = self ._get_api_version ('web_tests' )
447
429
if api_version == '2015-05-01' :
448
430
from ..v2015_05_01 .aio .operations import WebTestsOperations as OperationClass
431
+ elif api_version == '2018-05-01-preview' :
432
+ from ..v2018_05_01_preview .aio .operations import WebTestsOperations as OperationClass
449
433
else :
450
434
raise ValueError ("API version {} does not have operation group 'web_tests'" .format (api_version ))
451
435
return OperationClass (self ._client , self ._config , Serializer (self ._models_dict (api_version )), Deserializer (self ._models_dict (api_version )))
0 commit comments