Skip to content

Commit 526969d

Browse files
author
SDKAuto
committed
CodeGen from PR 33352 in Azure/azure-rest-api-specs
Merge cc27aef9ad0efb58d0618036f4c30a7ac018967a into 9c2b2bba3f15b4557adb5159df14ec8e5d16157d
1 parent 2f6c69c commit 526969d

File tree

5 files changed

+9
-45
lines changed

5 files changed

+9
-45
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": "4b02dfbcc937ef8273413cd767bd20525bfaa700",
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.39.1"
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/models/_models.py

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# pylint: disable=useless-super-delegation
1010

1111
import datetime
12-
from typing import Any, List, Mapping, Optional, TYPE_CHECKING, Union, overload
12+
from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload
1313

1414
from .. import _model_base
1515
from .._model_base import rest_field
@@ -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
@@ -1181,7 +1145,7 @@ class WorkloadImpactProperties(_model_base.Model):
11811145
:vartype connectivity: ~azure.mgmt.impactreporting.models.Connectivity
11821146
:ivar additional_properties: Additional fields related to impact, applicable fields per
11831147
resource type are list under /impactCategories API.
1184-
:vartype additional_properties: any
1148+
:vartype additional_properties: dict[str, any]
11851149
:ivar error_details: ARM error code and error message associated with the impact.
11861150
:vartype error_details: ~azure.mgmt.impactreporting.models.ErrorDetailProperties
11871151
:ivar workload: Information about the impacted workload.
@@ -1238,7 +1202,7 @@ class WorkloadImpactProperties(_model_base.Model):
12381202
identified. For example, when a VM is impacted due to a network issue, the impacted resource is
12391203
identified as the VM, but the root cause is the network. In such cases, the connectivity field
12401204
will have the details about the network issue."""
1241-
additional_properties: Optional[Any] = rest_field(
1205+
additional_properties: Optional[Dict[str, Any]] = rest_field(
12421206
name="additionalProperties", visibility=["read", "create", "update", "delete", "query"]
12431207
)
12441208
"""Additional fields related to impact, applicable fields per resource type are list under
@@ -1275,7 +1239,7 @@ def __init__(
12751239
arm_correlation_ids: Optional[List[str]] = None,
12761240
performance: Optional[List["_models.Performance"]] = None,
12771241
connectivity: Optional["_models.Connectivity"] = None,
1278-
additional_properties: Optional[Any] = None,
1242+
additional_properties: Optional[Dict[str, Any]] = None,
12791243
error_details: Optional["_models.ErrorDetailProperties"] = None,
12801244
workload: Optional["_models.Workload"] = None,
12811245
impact_group_id: Optional[str] = None,

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: 4b02dfbcc937ef8273413cd767bd20525bfaa700
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)