Skip to content

Commit 61cb5a3

Browse files
author
SDKAuto
committed
CodeGen from PR 33210 in Azure/azure-rest-api-specs
Merge 10196a6e832394cb261f333ebdd0cbb2c0bfbaaa into c56bcb994cdb222ae05e428096f0804d3c68f78c
1 parent c393dc0 commit 61cb5a3

File tree

7 files changed

+15
-51
lines changed

7 files changed

+15
-51
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "2ed1d371e3519553cd527c1f9f2c316f9ed58f47",
2+
"commit": "bb720b097f7c7afa6cdc8246f6fb654ef390993a",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/impact/Impact.Management",
5-
"@azure-tools/typespec-python": "0.38.4"
5+
"@azure-tools/typespec-python": "0.40.0"
66
}

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/_serialization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def from_dict(
411411
:param function key_extractors: A key extractor function.
412412
:param str content_type: JSON by default, set application/xml if XML.
413413
:returns: An instance of this model
414-
:raises: DeserializationError if something went wrong
414+
:raises DeserializationError: if something went wrong
415415
:rtype: Self
416416
"""
417417
deserializer = Deserializer(cls._infer_class_models())

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/aio/operations/_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def prepare_request(next_link=None):
142142

143143
async def extract_data(pipeline_response):
144144
deserialized = pipeline_response.http_response.json()
145-
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
145+
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
146146
if cls:
147147
list_of_elem = cls(list_of_elem) # type: ignore
148148
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -554,7 +554,7 @@ def prepare_request(next_link=None):
554554

555555
async def extract_data(pipeline_response):
556556
deserialized = pipeline_response.http_response.json()
557-
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized["value"])
557+
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized.get("value", []))
558558
if cls:
559559
list_of_elem = cls(list_of_elem) # type: ignore
560560
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -727,7 +727,7 @@ def prepare_request(next_link=None):
727727

728728
async def extract_data(pipeline_response):
729729
deserialized = pipeline_response.http_response.json()
730-
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized["value"])
730+
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized.get("value", []))
731731
if cls:
732732
list_of_elem = cls(list_of_elem) # type: ignore
733733
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -897,7 +897,7 @@ def prepare_request(next_link=None):
897897

898898
async def extract_data(pipeline_response):
899899
deserialized = pipeline_response.http_response.json()
900-
list_of_elem = _deserialize(List[_models.Insight], deserialized["value"])
900+
list_of_elem = _deserialize(List[_models.Insight], deserialized.get("value", []))
901901
if cls:
902902
list_of_elem = cls(list_of_elem) # type: ignore
903903
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)
@@ -1654,7 +1654,7 @@ def prepare_request(next_link=None):
16541654

16551655
async def extract_data(pipeline_response):
16561656
deserialized = pipeline_response.http_response.json()
1657-
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
1657+
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
16581658
if cls:
16591659
list_of_elem = cls(list_of_elem) # type: ignore
16601660
return deserialized.get("nextLink") or None, AsyncList(list_of_elem)

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/models/_models.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
112112
class Resource(_model_base.Model):
113113
"""Common fields that are returned in the response for all Azure Resource Manager resources.
114114
115-
Readonly variables are only populated by the server, and will be ignored when sending a request.
116-
117115
:ivar id: Fully qualified resource ID for the resource. Ex -
118116
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
119117
:vartype id: str
@@ -143,8 +141,6 @@ class ProxyResource(Resource):
143141
"""The resource model definition for a Azure Resource Manager proxy resource. It will not have
144142
tags and a location.
145143
146-
Readonly variables are only populated by the server, and will be ignored when sending a request.
147-
148144
:ivar id: Fully qualified resource ID for the resource. Ex -
149145
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
150146
:vartype id: str
@@ -163,8 +159,6 @@ class Connector(ProxyResource):
163159
"""A connector is a resource that can be used to proactively report impacts against workloads in
164160
Azure to Microsoft.
165161
166-
Readonly variables are only populated by the server, and will be ignored when sending a request.
167-
168162
:ivar id: Fully qualified resource ID for the resource. Ex -
169163
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
170164
:vartype id: str
@@ -206,9 +200,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
206200
class ConnectorProperties(_model_base.Model):
207201
"""Details of the Connector.
208202
209-
Readonly variables are only populated by the server, and will be ignored when sending a request.
210-
211-
212203
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
213204
and "Canceled".
214205
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -318,7 +309,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
318309
class Content(_model_base.Model):
319310
"""Article details of the insight like title, description etc.
320311
321-
322312
:ivar title: Title of the insight. Required.
323313
:vartype title: str
324314
:ivar description: Description of the insight. Required.
@@ -352,8 +342,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
352342
class ErrorAdditionalInfo(_model_base.Model):
353343
"""The resource management error additional info.
354344
355-
Readonly variables are only populated by the server, and will be ignored when sending a request.
356-
357345
:ivar type: The additional info type.
358346
:vartype type: str
359347
:ivar info: The additional info.
@@ -369,8 +357,6 @@ class ErrorAdditionalInfo(_model_base.Model):
369357
class ErrorDetail(_model_base.Model):
370358
"""The error detail.
371359
372-
Readonly variables are only populated by the server, and will be ignored when sending a request.
373-
374360
:ivar code: The error code.
375361
:vartype code: str
376362
:ivar message: The error message.
@@ -464,7 +450,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
464450
class ExpectedValueRange(_model_base.Model):
465451
"""Max and Min Threshold values for the metric.
466452
467-
468453
:ivar min: Min threshold value for the metric. Required.
469454
:vartype min: float
470455
:ivar max: Max threshold value for the metric. Required.
@@ -498,8 +483,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
498483
class ImpactCategory(ProxyResource):
499484
"""ImpactCategory resource.
500485
501-
Readonly variables are only populated by the server, and will be ignored when sending a request.
502-
503486
:ivar id: Fully qualified resource ID for the resource. Ex -
504487
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
505488
:vartype id: str
@@ -541,9 +524,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
541524
class ImpactCategoryProperties(_model_base.Model):
542525
"""Impact category properties.
543526
544-
Readonly variables are only populated by the server, and will be ignored when sending a request.
545-
546-
547527
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
548528
and "Canceled".
549529
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -600,7 +580,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
600580
class ImpactDetails(_model_base.Model):
601581
"""details of of the impact for which insight has been generated.
602582
603-
604583
:ivar impacted_resource_id: List of impacted Azure resources. Required.
605584
:vartype impacted_resource_id: str
606585
:ivar start_time: Time at which impact was started according to reported impact. Required.
@@ -650,8 +629,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
650629
class Insight(ProxyResource):
651630
"""Insight resource.
652631
653-
Readonly variables are only populated by the server, and will be ignored when sending a request.
654-
655632
:ivar id: Fully qualified resource ID for the resource. Ex -
656633
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
657634
:vartype id: str
@@ -693,9 +670,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
693670
class InsightProperties(_model_base.Model):
694671
"""Impact category properties.
695672
696-
Readonly variables are only populated by the server, and will be ignored when sending a request.
697-
698-
699673
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
700674
and "Canceled".
701675
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState
@@ -779,8 +753,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
779753
class Operation(_model_base.Model):
780754
"""Details of a REST API operation, returned from the Resource Provider Operations API.
781755
782-
Readonly variables are only populated by the server, and will be ignored when sending a request.
783-
784756
:ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
785757
"Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
786758
:vartype name: str
@@ -838,8 +810,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
838810
class OperationDisplay(_model_base.Model):
839811
"""Localized display information for and operation.
840812
841-
Readonly variables are only populated by the server, and will be ignored when sending a request.
842-
843813
:ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft
844814
Monitoring Insights" or "Microsoft Compute".
845815
:vartype provider: str
@@ -933,7 +903,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
933903
class RequiredImpactProperties(_model_base.Model):
934904
"""Required impact properties.
935905
936-
937906
:ivar name: Name of the property. Required.
938907
:vartype name: str
939908
:ivar allowed_values: Allowed values values for the property.
@@ -1105,8 +1074,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
11051074
class WorkloadImpact(ProxyResource):
11061075
"""Workload Impact properties.
11071076
1108-
Readonly variables are only populated by the server, and will be ignored when sending a request.
1109-
11101077
:ivar id: Fully qualified resource ID for the resource. Ex -
11111078
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
11121079
:vartype id: str
@@ -1148,9 +1115,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
11481115
class WorkloadImpactProperties(_model_base.Model):
11491116
"""Workload impact properties.
11501117
1151-
Readonly variables are only populated by the server, and will be ignored when sending a request.
1152-
1153-
11541118
:ivar provisioning_state: Resource provisioning state. Known values are: "Succeeded", "Failed",
11551119
and "Canceled".
11561120
:vartype provisioning_state: str or ~azure.mgmt.impactreporting.models.ProvisioningState

sdk/impactreporting/azure-mgmt-impactreporting/azure/mgmt/impactreporting/operations/_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def prepare_request(next_link=None):
555555

556556
def extract_data(pipeline_response):
557557
deserialized = pipeline_response.http_response.json()
558-
list_of_elem = _deserialize(List[_models.Operation], deserialized["value"])
558+
list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", []))
559559
if cls:
560560
list_of_elem = cls(list_of_elem) # type: ignore
561561
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -968,7 +968,7 @@ def prepare_request(next_link=None):
968968

969969
def extract_data(pipeline_response):
970970
deserialized = pipeline_response.http_response.json()
971-
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized["value"])
971+
list_of_elem = _deserialize(List[_models.WorkloadImpact], deserialized.get("value", []))
972972
if cls:
973973
list_of_elem = cls(list_of_elem) # type: ignore
974974
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -1140,7 +1140,7 @@ def prepare_request(next_link=None):
11401140

11411141
def extract_data(pipeline_response):
11421142
deserialized = pipeline_response.http_response.json()
1143-
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized["value"])
1143+
list_of_elem = _deserialize(List[_models.ImpactCategory], deserialized.get("value", []))
11441144
if cls:
11451145
list_of_elem = cls(list_of_elem) # type: ignore
11461146
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -1310,7 +1310,7 @@ def prepare_request(next_link=None):
13101310

13111311
def extract_data(pipeline_response):
13121312
deserialized = pipeline_response.http_response.json()
1313-
list_of_elem = _deserialize(List[_models.Insight], deserialized["value"])
1313+
list_of_elem = _deserialize(List[_models.Insight], deserialized.get("value", []))
13141314
if cls:
13151315
list_of_elem = cls(list_of_elem) # type: ignore
13161316
return deserialized.get("nextLink") or None, iter(list_of_elem)
@@ -2069,7 +2069,7 @@ def prepare_request(next_link=None):
20692069

20702070
def extract_data(pipeline_response):
20712071
deserialized = pipeline_response.http_response.json()
2072-
list_of_elem = _deserialize(List[_models.Connector], deserialized["value"])
2072+
list_of_elem = _deserialize(List[_models.Connector], deserialized.get("value", []))
20732073
if cls:
20742074
list_of_elem = cls(list_of_elem) # type: ignore
20752075
return deserialized.get("nextLink") or None, iter(list_of_elem)

sdk/impactreporting/azure-mgmt-impactreporting/generated_samples/insights_create.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def main():
3838
"properties": {
3939
"category": "repair",
4040
"content": {
41-
"description": 'At 2018-11-08T00:00:00Z UTC, your services dependent on these resources :code:`<link href=”…”>VM1</link>` may have experienced an issue. :code:`<br/>`\\ :code:`<div>`We have identified an outage that affected these resources(s). You can look at outage information on :code:`<link href="https:// portal.azure.com/#view/Microsoft_Azure_Health/AzureHealthBrowseBlade/~/serviceIssues/trackingId/NL2W-VCZ">NL2W-VCZ</link>` link.\\ :code:`<div>`',
41+
"description": 'At 2018-11-08T00:00:00Z UTC, your services dependent on these resources <link href=”…”>VM1</link> may have experienced an issue. <br/><div>We have identified an outage that affected these resources(s). You can look at outage information on <link href="https:// portal.azure.com/#view/Microsoft_Azure_Health/AzureHealthBrowseBlade/~/serviceIssues/trackingId/NL2W-VCZ">NL2W-VCZ</link> link.<div>',
4242
"title": "Impact Has been correlated to an outage",
4343
},
4444
"eventTime": "2023-06-15T04:00:00.009223Z",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/impact/Impact.Management
2-
commit: 2ed1d371e3519553cd527c1f9f2c316f9ed58f47
2+
commit: bb720b097f7c7afa6cdc8246f6fb654ef390993a
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)