Skip to content

Commit

Permalink
CodeGen from PR 24636 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge feb9e11b3d655b692fc57c4b197c6976b6bf4334 into 4c49a05d22106119afd2078a982f30855b91a010
  • Loading branch information
SDKAuto committed Jun 29, 2023
1 parent 892d560 commit dda21a8
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "e60df62e9e0d88462e6abba81a76d94eab000f0d",
"commit": "1699feedb41016e0a9aa5bd8531eedeaef7e9164",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.8",
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/newrelic/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/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/newrelic/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/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/newrelic/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse

Expand Down Expand Up @@ -331,7 +332,7 @@ async def _create_or_update_initial(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(resource, (IO, bytes)):
if isinstance(resource, (IOBase, bytes)):
_content = resource
else:
_json = self._serialize.body(resource, "NewRelicMonitorResource")
Expand Down Expand Up @@ -641,7 +642,7 @@ async def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(properties, (IO, bytes)):
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "NewRelicMonitorResourceUpdate")
Expand Down Expand Up @@ -905,7 +906,7 @@ async def get_metric_rules(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "MetricsRequest")
Expand Down Expand Up @@ -1048,7 +1049,7 @@ async def get_metric_status(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "MetricsStatusRequest")
Expand Down Expand Up @@ -1193,7 +1194,7 @@ def list_app_services(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "AppServicesGetRequest")
Expand Down Expand Up @@ -1363,7 +1364,7 @@ async def switch_billing(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "SwitchBillingRequest")
Expand Down Expand Up @@ -1510,7 +1511,7 @@ def list_hosts(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "HostsGetRequest")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse

Expand Down Expand Up @@ -248,7 +249,7 @@ async def _create_or_update_initial(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(resource, (IO, bytes)):
if isinstance(resource, (IOBase, bytes)):
_content = resource
else:
_json = self._serialize.body(resource, "TagRule")
Expand Down Expand Up @@ -699,7 +700,7 @@ async def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(properties, (IO, bytes)):
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "TagRuleUpdate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse

Expand Down Expand Up @@ -756,7 +757,7 @@ def _create_or_update_initial(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(resource, (IO, bytes)):
if isinstance(resource, (IOBase, bytes)):
_content = resource
else:
_json = self._serialize.body(resource, "NewRelicMonitorResource")
Expand Down Expand Up @@ -1065,7 +1066,7 @@ def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(properties, (IO, bytes)):
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "NewRelicMonitorResourceUpdate")
Expand Down Expand Up @@ -1328,7 +1329,7 @@ def get_metric_rules(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "MetricsRequest")
Expand Down Expand Up @@ -1471,7 +1472,7 @@ def get_metric_status(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "MetricsStatusRequest")
Expand Down Expand Up @@ -1613,7 +1614,7 @@ def list_app_services(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "AppServicesGetRequest")
Expand Down Expand Up @@ -1783,7 +1784,7 @@ def switch_billing(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "SwitchBillingRequest")
Expand Down Expand Up @@ -1927,7 +1928,7 @@ def list_hosts(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(request, (IO, bytes)):
if isinstance(request, (IOBase, bytes)):
_content = request
else:
_json = self._serialize.body(request, "HostsGetRequest")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from io import IOBase
from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload
import urllib.parse

Expand Down Expand Up @@ -38,7 +39,7 @@
_SERIALIZER.client_side_validation = False


def build_list_by_new_relic_monitor_resource_request( # pylint: disable=name-too-long
def build_list_by_new_relic_monitor_resource_request(
resource_group_name: str, monitor_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
Expand Down Expand Up @@ -416,7 +417,7 @@ def _create_or_update_initial(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(resource, (IO, bytes)):
if isinstance(resource, (IOBase, bytes)):
_content = resource
else:
_json = self._serialize.body(resource, "TagRule")
Expand Down Expand Up @@ -862,7 +863,7 @@ def update(
content_type = content_type or "application/json"
_json = None
_content = None
if isinstance(properties, (IO, bytes)):
if isinstance(properties, (IOBase, bytes)):
_content = properties
else:
_json = self._serialize.body(properties, "TagRuleUpdate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def main():
resource_group_name="rgNewRelic",
monitor_name="cdlymktqw",
resource={
"identity": {"type": "None", "userAssignedIdentities": {"key8903": {}}},
"location": "k",
"properties": {
"accountCreationSource": "LIFTR",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ def main():
subscription_id="ddqonpqwjr",
)

response = client.monitors.begin_delete(
client.monitors.begin_delete(
resource_group_name="rgopenapi",
user_email="ruxvg@xqkmdhrnoo.hlmbpm",
monitor_name="ipxmlcbonyxtolzejcjshkmlron",
).result()
print(response)


# x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MaximumSet_Gen.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ def main():
subscription_id="ddqonpqwjr",
)

response = client.monitors.begin_delete(
client.monitors.begin_delete(
resource_group_name="rgopenapi",
user_email="ruxvg@xqkmdhrnoo.hlmbpm",
monitor_name="ipxmlcbonyxtolzejcjshkmlron",
).result()
print(response)


# x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/Monitors_Delete_MinimumSet_Gen.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
response = client.monitors.get_metric_status(
resource_group_name="rgNewRelic",
monitor_name="fhcjxnxumkdlgpwanewtkdnyuz",
request={"userEmail": "ruxvg@xqkmdhrnoo.hlmbpm"},
request={"azureResourceIds": ["enfghpfw"], "userEmail": "ruxvg@xqkmdhrnoo.hlmbpm"},
)
print(response)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def main():
response = client.monitors.list_app_services(
resource_group_name="rgNewRelic",
monitor_name="fhcjxnxumkdlgpwanewtkdnyuz",
request={"userEmail": "ruxvg@xqkmdhrnoo.hlmbpm"},
request={"azureResourceIds": ["pvzrksrmzowobuhxpwiotnpcvjbu"], "userEmail": "ruxvg@xqkmdhrnoo.hlmbpm"},
)
for item in response:
print(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ def main():
subscription_id="ddqonpqwjr",
)

response = client.tag_rules.begin_delete(
client.tag_rules.begin_delete(
resource_group_name="rgopenapi",
monitor_name="ipxmlcbonyxtolzejcjshkmlron",
rule_set_name="bxcantgzggsepbhqmedjqyrqeezmfb",
).result()
print(response)


# x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MaximumSet_Gen.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ def main():
subscription_id="ddqonpqwjr",
)

response = client.tag_rules.begin_delete(
client.tag_rules.begin_delete(
resource_group_name="rgopenapi",
monitor_name="ipxmlcbonyxtolzejcjshkmlron",
rule_set_name="bxcantgzggsepbhqmedjqyrqeezmfb",
).result()
print(response)


# x-ms-original-file: specification/newrelic/resource-manager/NewRelic.Observability/stable/2022-07-01/examples/TagRules_Delete_MinimumSet_Gen.json
Expand Down

0 comments on commit dda21a8

Please sign in to comment.