Skip to content

Commit

Permalink
CodeGen from PR 25472 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.AlertsManagement to add version preview/2023-07-12-preview (Azure#25472)

* Adds base for updating Microsoft.AlertsManagement from version preview/2019-05-05-preview to version 2023-07-12-preview

* Updates readme

* Updates API version in new specs and examples

* added enrichments api

* fixing errors

* fixed more erros

* cont

* cont

* cont

* cont

* cont

* trying to fix errors

* cont

* cont

* cont

* cont

* used v5/types.json

* Used Resource definition from common-types

* Updated descriptions.

* set "x-ms-parameter-location": "method" for "scope" parameter

* Suppress lint err

* another try to suppress lint err
  • Loading branch information
SDKAuto committed Sep 18, 2023
1 parent 49e8606 commit 9e5b28d
Show file tree
Hide file tree
Showing 54 changed files with 2,929 additions and 835 deletions.
10 changes: 5 additions & 5 deletions sdk/alertsmanagement/azure-mgmt-alertsmanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "e37a57df67daaa82f9c3758fc450bc8655812a08",
"commit": "d310a1a98418f81c9e627729c64f9e0db2d8d6a3",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/alertsmanagement/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.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/alertsmanagement/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/alertsmanagement/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ._serialization import Deserializer, Serializer
from .operations import (
AlertProcessingRulesOperations,
AlertRuleRecommendationsOperations,
AlertsOperations,
Operations,
PrometheusRuleGroupsOperations,
Expand All @@ -31,9 +32,6 @@
class AlertsManagementClient: # pylint: disable=client-accepts-api-version-keyword
"""AlertsManagement Client.
:ivar alert_processing_rules: AlertProcessingRulesOperations operations
:vartype alert_processing_rules:
azure.mgmt.alertsmanagement.operations.AlertProcessingRulesOperations
:ivar prometheus_rule_groups: PrometheusRuleGroupsOperations operations
:vartype prometheus_rule_groups:
azure.mgmt.alertsmanagement.operations.PrometheusRuleGroupsOperations
Expand All @@ -43,6 +41,12 @@ class AlertsManagementClient: # pylint: disable=client-accepts-api-version-keyw
:vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations
:ivar smart_groups: SmartGroupsOperations operations
:vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations
:ivar alert_rule_recommendations: AlertRuleRecommendationsOperations operations
:vartype alert_rule_recommendations:
azure.mgmt.alertsmanagement.operations.AlertRuleRecommendationsOperations
:ivar alert_processing_rules: AlertProcessingRulesOperations operations
:vartype alert_processing_rules:
azure.mgmt.alertsmanagement.operations.AlertProcessingRulesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
Expand All @@ -61,21 +65,24 @@ def __init__(
self._config = AlertsManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.alert_processing_rules = AlertProcessingRulesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.prometheus_rule_groups = PrometheusRuleGroupsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(self._client, self._config, self._serialize, self._deserialize)
self.smart_groups = SmartGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
self.alert_rule_recommendations = AlertRuleRecommendationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.alert_processing_rules = AlertProcessingRulesOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down Expand Up @@ -106,5 +113,5 @@ def __enter__(self) -> "AlertsManagementClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Loading

0 comments on commit 9e5b28d

Please sign in to comment.