Skip to content

Commit d596ae4

Browse files
committed
Regen with stable swagger
Signed-off-by: Paul Van Eck <[email protected]>
1 parent c59d0ed commit d596ae4

File tree

5 files changed

+45
-43
lines changed

5 files changed

+45
-43
lines changed

sdk/monitor/azure-monitor-query/azure/monitor/query/_generated/aio/operations/_operations.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,9 @@ async def resource_get(
597597
)
598598
request.url = self._client.format_url(request.url)
599599

600+
_stream = False
600601
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
601-
request, stream=False, **kwargs
602+
request, stream=_stream, **kwargs
602603
)
603604

604605
response = pipeline_response.http_response
@@ -916,8 +917,9 @@ async def resource_execute(
916917
)
917918
request.url = self._client.format_url(request.url)
918919

920+
_stream = False
919921
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
920-
request, stream=False, **kwargs
922+
request, stream=_stream, **kwargs
921923
)
922924

923925
response = pipeline_response.http_response
@@ -978,8 +980,10 @@ async def batch(self, body: JSON, *, content_type: str = "application/json", **k
978980
"str": "str" # Optional. Dictionary of
979981
:code:`<string>`.
980982
},
981-
"method": "str", # Optional. "POST"
982-
"path": "str" # Optional. "/query"
983+
"method": "POST", # Optional. Default value is "POST". An
984+
single request in a batch. Required.
985+
"path": "/query" # Optional. Default value is "/query". An
986+
single request in a batch. Required.
983987
}
984988
]
985989
}
@@ -1188,8 +1192,10 @@ async def batch(self, body: Union[JSON, IO], **kwargs: Any) -> JSON:
11881192
"str": "str" # Optional. Dictionary of
11891193
:code:`<string>`.
11901194
},
1191-
"method": "str", # Optional. "POST"
1192-
"path": "str" # Optional. "/query"
1195+
"method": "POST", # Optional. Default value is "POST". An
1196+
single request in a batch. Required.
1197+
"path": "/query" # Optional. Default value is "/query". An
1198+
single request in a batch. Required.
11931199
}
11941200
]
11951201
}
@@ -1412,8 +1418,9 @@ async def resource_get_xms(
14121418
)
14131419
request.url = self._client.format_url(request.url)
14141420

1421+
_stream = False
14151422
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1416-
request, stream=False, **kwargs
1423+
request, stream=_stream, **kwargs
14171424
)
14181425

14191426
response = pipeline_response.http_response
@@ -1731,8 +1738,9 @@ async def resource_execute_xms(
17311738
)
17321739
request.url = self._client.format_url(request.url)
17331740

1741+
_stream = False
17341742
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
1735-
request, stream=False, **kwargs
1743+
request, stream=_stream, **kwargs
17361744
)
17371745

17381746
response = pipeline_response.http_response

sdk/monitor/azure-monitor-query/azure/monitor/query/_generated/metrics/aio/operations/_operations.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
from collections.abc import MutableMapping
3737
else:
3838
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
39-
if sys.version_info >= (3, 8):
40-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
41-
else:
42-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
4339
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
4440
T = TypeVar("T")
4541
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -128,7 +124,7 @@ def list(self, resource_uri: str, *, metricnamespace: Optional[str] = None, **kw
128124
_headers = kwargs.pop("headers", {}) or {}
129125
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
130126

131-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
127+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
132128
cls: ClsType[JSON] = kwargs.pop("cls", None)
133129

134130
error_map = {
@@ -351,7 +347,7 @@ async def list(
351347
_headers = kwargs.pop("headers", {}) or {}
352348
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
353349

354-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
350+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
355351
cls: ClsType[JSON] = kwargs.pop("cls", None)
356352

357353
request = build_metrics_list_request(
@@ -441,9 +437,7 @@ def list(self, resource_uri: str, *, start_time: Optional[str] = None, **kwargs:
441437
_headers = kwargs.pop("headers", {}) or {}
442438
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
443439

444-
api_version: Literal["2017-12-01-preview"] = kwargs.pop(
445-
"api_version", _params.pop("api-version", "2017-12-01-preview")
446-
)
440+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview"))
447441
cls: ClsType[JSON] = kwargs.pop("cls", None)
448442

449443
error_map = {

sdk/monitor/azure-monitor-query/azure/monitor/query/_generated/metrics/operations/_operations.py

+6-14
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
from collections.abc import MutableMapping
3333
else:
3434
from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
35-
if sys.version_info >= (3, 8):
36-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
37-
else:
38-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3935
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
4036
T = TypeVar("T")
4137
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +46,7 @@ def build_metric_definitions_list_request(
5046
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
5147
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
5248

53-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
49+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
5450
accept = _headers.pop("Accept", "application/json")
5551

5652
# Construct URL
@@ -89,7 +85,7 @@ def build_metrics_list_request(
8985
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
9086
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
9187

92-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
88+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
9389
accept = _headers.pop("Accept", "application/json")
9490

9591
# Construct URL
@@ -133,9 +129,7 @@ def build_metric_namespaces_list_request(
133129
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
134130
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
135131

136-
api_version: Literal["2017-12-01-preview"] = kwargs.pop(
137-
"api_version", _params.pop("api-version", "2017-12-01-preview")
138-
)
132+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview"))
139133
accept = _headers.pop("Accept", "application/json")
140134

141135
# Construct URL
@@ -240,7 +234,7 @@ def list(self, resource_uri: str, *, metricnamespace: Optional[str] = None, **kw
240234
_headers = kwargs.pop("headers", {}) or {}
241235
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
242236

243-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
237+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
244238
cls: ClsType[JSON] = kwargs.pop("cls", None)
245239

246240
error_map = {
@@ -463,7 +457,7 @@ def list(
463457
_headers = kwargs.pop("headers", {}) or {}
464458
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
465459

466-
api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
460+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01"))
467461
cls: ClsType[JSON] = kwargs.pop("cls", None)
468462

469463
request = build_metrics_list_request(
@@ -553,9 +547,7 @@ def list(self, resource_uri: str, *, start_time: Optional[str] = None, **kwargs:
553547
_headers = kwargs.pop("headers", {}) or {}
554548
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
555549

556-
api_version: Literal["2017-12-01-preview"] = kwargs.pop(
557-
"api_version", _params.pop("api-version", "2017-12-01-preview")
558-
)
550+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview"))
559551
cls: ClsType[JSON] = kwargs.pop("cls", None)
560552

561553
error_map = {

sdk/monitor/azure-monitor-query/azure/monitor/query/_generated/operations/_operations.py

+16-8
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,9 @@ def resource_get(
801801
)
802802
request.url = self._client.format_url(request.url)
803803

804+
_stream = False
804805
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
805-
request, stream=False, **kwargs
806+
request, stream=_stream, **kwargs
806807
)
807808

808809
response = pipeline_response.http_response
@@ -1120,8 +1121,9 @@ def resource_execute(
11201121
)
11211122
request.url = self._client.format_url(request.url)
11221123

1124+
_stream = False
11231125
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
1124-
request, stream=False, **kwargs
1126+
request, stream=_stream, **kwargs
11251127
)
11261128

11271129
response = pipeline_response.http_response
@@ -1182,8 +1184,10 @@ def batch(self, body: JSON, *, content_type: str = "application/json", **kwargs:
11821184
"str": "str" # Optional. Dictionary of
11831185
:code:`<string>`.
11841186
},
1185-
"method": "str", # Optional. "POST"
1186-
"path": "str" # Optional. "/query"
1187+
"method": "POST", # Optional. Default value is "POST". An
1188+
single request in a batch. Required.
1189+
"path": "/query" # Optional. Default value is "/query". An
1190+
single request in a batch. Required.
11871191
}
11881192
]
11891193
}
@@ -1392,8 +1396,10 @@ def batch(self, body: Union[JSON, IO], **kwargs: Any) -> JSON:
13921396
"str": "str" # Optional. Dictionary of
13931397
:code:`<string>`.
13941398
},
1395-
"method": "str", # Optional. "POST"
1396-
"path": "str" # Optional. "/query"
1399+
"method": "POST", # Optional. Default value is "POST". An
1400+
single request in a batch. Required.
1401+
"path": "/query" # Optional. Default value is "/query". An
1402+
single request in a batch. Required.
13971403
}
13981404
]
13991405
}
@@ -1616,8 +1622,9 @@ def resource_get_xms(
16161622
)
16171623
request.url = self._client.format_url(request.url)
16181624

1625+
_stream = False
16191626
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
1620-
request, stream=False, **kwargs
1627+
request, stream=_stream, **kwargs
16211628
)
16221629

16231630
response = pipeline_response.http_response
@@ -1935,8 +1942,9 @@ def resource_execute_xms(
19351942
)
19361943
request.url = self._client.format_url(request.url)
19371944

1945+
_stream = False
19381946
pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
1939-
request, stream=False, **kwargs
1947+
request, stream=_stream, **kwargs
19401948
)
19411949

19421950
response = pipeline_response.http_response

sdk/monitor/azure-monitor-query/swagger/README.PYTHON.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ These settings apply only when `--tag=release_query` is specified on the command
3232

3333
```yaml $(tag) == 'release_query'
3434
input-file:
35-
- https://github.com/Azure/azure-rest-api-specs/blob/fc3c409825d6a31ba909a88ea34dcc13165edc9c/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/preview/2022-10-27_Preview/OperationalInsights.json
35+
- https://github.com/Azure/azure-rest-api-specs/blob/605407bc0c1a133018285f550d01175469cb3c3a/specification/operationalinsights/data-plane/Microsoft.OperationalInsights/stable/2022-10-27/OperationalInsights.json
3636
output-folder: ../azure/monitor/query/_generated
3737
title: MonitorQueryClient
3838
description: Azure Monitor Query Python Client
@@ -44,9 +44,9 @@ These settings apply only when `--tag=release_metrics` is specified on the comma
4444

4545
```yaml $(tag) == 'release_metrics'
4646
input-file:
47-
- https://github.com/Azure/azure-rest-api-specs/blob/fc3c409825d6a31ba909a88ea34dcc13165edc9c/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json
48-
- https://github.com/Azure/azure-rest-api-specs/blob/fc3c409825d6a31ba909a88ea34dcc13165edc9c/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json
49-
- https://github.com/Azure/azure-rest-api-specs/blob/fc3c409825d6a31ba909a88ea34dcc13165edc9c/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json
47+
- https://github.com/Azure/azure-rest-api-specs/blob/605407bc0c1a133018285f550d01175469cb3c3a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json
48+
- https://github.com/Azure/azure-rest-api-specs/blob/605407bc0c1a133018285f550d01175469cb3c3a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json
49+
- https://github.com/Azure/azure-rest-api-specs/blob/605407bc0c1a133018285f550d01175469cb3c3a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-12-01-preview/metricNamespaces_API.json
5050
output-folder: ../azure/monitor/query/_generated/metrics
5151
title: MonitorMetricsClient
5252
description: Azure Monitor Metrics Python Client

0 commit comments

Comments
 (0)