Skip to content

Commit

Permalink
CodeGen from PR 20064 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 8be5e3c65e03b673dca5f44299c7599fa795a4a7 into 705bc5cfea866c838692f4aa0a1197c51bfd2d79
  • Loading branch information
SDKAuto committed Aug 2, 2022
1 parent 8f85562 commit c72cdf1
Show file tree
Hide file tree
Showing 41 changed files with 825 additions and 72 deletions.
4 changes: 2 additions & 2 deletions sdk/monitor/azure-mgmt-monitor/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "37966a6de2451407408adc2da5ab25631f0dd9b9",
"commit": "011881a1d2068a00969d7bbdc017c309e72fdea1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/monitor/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
'management_group_diagnostic_settings': '2021-05-01-preview',
'metric_alerts': '2018-03-01',
'metric_alerts_status': '2018-03-01',
'metric_baseline': '2017-11-01-preview',
'metric_definitions': '2018-01-01',
'metric_namespaces': '2017-12-01-preview',
'metrics': '2018-01-01',
Expand Down Expand Up @@ -130,7 +129,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2017-03-01-preview: :mod:`v2017_03_01_preview.models<azure.mgmt.monitor.v2017_03_01_preview.models>`
* 2017-04-01: :mod:`v2017_04_01.models<azure.mgmt.monitor.v2017_04_01.models>`
* 2017-05-01-preview: :mod:`v2017_05_01_preview.models<azure.mgmt.monitor.v2017_05_01_preview.models>`
* 2017-11-01-preview: :mod:`v2017_11_01_preview.models<azure.mgmt.monitor.v2017_11_01_preview.models>`
* 2017-12-01-preview: :mod:`v2017_12_01_preview.models<azure.mgmt.monitor.v2017_12_01_preview.models>`
* 2018-01-01: :mod:`v2018_01_01.models<azure.mgmt.monitor.v2018_01_01.models>`
* 2018-03-01: :mod:`v2018_03_01.models<azure.mgmt.monitor.v2018_03_01.models>`
Expand Down Expand Up @@ -173,9 +171,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2017-05-01-preview':
from .v2017_05_01_preview import models
return models
elif api_version == '2017-11-01-preview':
from .v2017_11_01_preview import models
return models
elif api_version == '2017-12-01-preview':
from .v2017_12_01_preview import models
return models
Expand Down Expand Up @@ -356,10 +351,13 @@ def autoscale_settings(self):
def baselines(self):
"""Instance depends on the API version:
* 2018-09-01: :class:`BaselinesOperations<azure.mgmt.monitor.v2018_09_01.operations.BaselinesOperations>`
* 2019-03-01: :class:`BaselinesOperations<azure.mgmt.monitor.v2019_03_01.operations.BaselinesOperations>`
"""
api_version = self._get_api_version('baselines')
if api_version == '2019-03-01':
if api_version == '2018-09-01':
from .v2018_09_01.operations import BaselinesOperations as OperationClass
elif api_version == '2019-03-01':
from .v2019_03_01.operations import BaselinesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'baselines'".format(api_version))
Expand Down Expand Up @@ -545,19 +543,6 @@ def metric_alerts_status(self):
raise ValueError("API version {} does not have operation group 'metric_alerts_status'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_baseline(self):
"""Instance depends on the API version:
* 2017-11-01-preview: :class:`MetricBaselineOperations<azure.mgmt.monitor.v2017_11_01_preview.operations.MetricBaselineOperations>`
"""
api_version = self._get_api_version('metric_baseline')
if api_version == '2017-11-01-preview':
from .v2017_11_01_preview.operations import MetricBaselineOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'metric_baseline'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_definitions(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
'management_group_diagnostic_settings': '2021-05-01-preview',
'metric_alerts': '2018-03-01',
'metric_alerts_status': '2018-03-01',
'metric_baseline': '2017-11-01-preview',
'metric_definitions': '2018-01-01',
'metric_namespaces': '2017-12-01-preview',
'metrics': '2018-01-01',
Expand Down Expand Up @@ -129,7 +128,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2017-03-01-preview: :mod:`v2017_03_01_preview.models<azure.mgmt.monitor.v2017_03_01_preview.models>`
* 2017-04-01: :mod:`v2017_04_01.models<azure.mgmt.monitor.v2017_04_01.models>`
* 2017-05-01-preview: :mod:`v2017_05_01_preview.models<azure.mgmt.monitor.v2017_05_01_preview.models>`
* 2017-11-01-preview: :mod:`v2017_11_01_preview.models<azure.mgmt.monitor.v2017_11_01_preview.models>`
* 2017-12-01-preview: :mod:`v2017_12_01_preview.models<azure.mgmt.monitor.v2017_12_01_preview.models>`
* 2018-01-01: :mod:`v2018_01_01.models<azure.mgmt.monitor.v2018_01_01.models>`
* 2018-03-01: :mod:`v2018_03_01.models<azure.mgmt.monitor.v2018_03_01.models>`
Expand Down Expand Up @@ -172,9 +170,6 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2017-05-01-preview':
from ..v2017_05_01_preview import models
return models
elif api_version == '2017-11-01-preview':
from ..v2017_11_01_preview import models
return models
elif api_version == '2017-12-01-preview':
from ..v2017_12_01_preview import models
return models
Expand Down Expand Up @@ -355,10 +350,13 @@ def autoscale_settings(self):
def baselines(self):
"""Instance depends on the API version:
* 2018-09-01: :class:`BaselinesOperations<azure.mgmt.monitor.v2018_09_01.aio.operations.BaselinesOperations>`
* 2019-03-01: :class:`BaselinesOperations<azure.mgmt.monitor.v2019_03_01.aio.operations.BaselinesOperations>`
"""
api_version = self._get_api_version('baselines')
if api_version == '2019-03-01':
if api_version == '2018-09-01':
from ..v2018_09_01.aio.operations import BaselinesOperations as OperationClass
elif api_version == '2019-03-01':
from ..v2019_03_01.aio.operations import BaselinesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'baselines'".format(api_version))
Expand Down Expand Up @@ -544,19 +542,6 @@ def metric_alerts_status(self):
raise ValueError("API version {} does not have operation group 'metric_alerts_status'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_baseline(self):
"""Instance depends on the API version:
* 2017-11-01-preview: :class:`MetricBaselineOperations<azure.mgmt.monitor.v2017_11_01_preview.aio.operations.MetricBaselineOperations>`
"""
api_version = self._get_api_version('metric_baseline')
if api_version == '2017-11-01-preview':
from ..v2017_11_01_preview.aio.operations import MetricBaselineOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'metric_baseline'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def metric_definitions(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .v2015_07_01.models import *
from .v2016_03_01.models import *
from .v2016_09_01.models import *
from .v2017_11_01_preview.models import *
from .v2017_12_01_preview.models import *
from .v2018_01_01.models import *
from .v2018_03_01.models import *
Expand Down
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
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 = "4.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"action_groups": "ActionGroupsOperations"
"action_groups": "ActionGroupsOperations",
"baselines": "BaselinesOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from . import models
from ._configuration import MonitorManagementClientConfiguration
from .operations import ActionGroupsOperations
from .operations import ActionGroupsOperations, BaselinesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -27,6 +27,8 @@ class MonitorManagementClient:
:ivar action_groups: ActionGroupsOperations operations
:vartype action_groups: $(python-base-namespace).v2018_09_01.operations.ActionGroupsOperations
:ivar baselines: BaselinesOperations operations
:vartype baselines: $(python-base-namespace).v2018_09_01.operations.BaselinesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
Expand Down Expand Up @@ -55,6 +57,9 @@ def __init__(
self.action_groups = ActionGroupsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.baselines = BaselinesOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
Expand Down
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 = "4.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from .. import models
from ._configuration import MonitorManagementClientConfiguration
from .operations import ActionGroupsOperations
from .operations import ActionGroupsOperations, BaselinesOperations

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
Expand All @@ -28,6 +28,8 @@ class MonitorManagementClient:
:ivar action_groups: ActionGroupsOperations operations
:vartype action_groups:
$(python-base-namespace).v2018_09_01.aio.operations.ActionGroupsOperations
:ivar baselines: BaselinesOperations operations
:vartype baselines: $(python-base-namespace).v2018_09_01.aio.operations.BaselinesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
Expand Down Expand Up @@ -56,6 +58,9 @@ def __init__(
self.action_groups = ActionGroupsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.baselines = BaselinesOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# --------------------------------------------------------------------------

from ._action_groups_operations import ActionGroupsOperations
from ._baselines_operations import BaselinesOperations

from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
'ActionGroupsOperations',
'BaselinesOperations',
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading

0 comments on commit c72cdf1

Please sign in to comment.