diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/__init__.py index 9ba14ee8d728..67546426ab3d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2 import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 -__all__ = ['MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2'] +from ._metrics_advisor import MetricsAdvisor +__all__ = ['MetricsAdvisor'] try: from ._patch import patch_sdk # type: ignore diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_configuration.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_configuration.py index 482bc4973fe9..4ab4b4596b3e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_configuration.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_configuration.py @@ -19,8 +19,8 @@ VERSION = "unknown" -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration(Configuration): - """Configuration for MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2. +class MetricsAdvisorConfiguration(Configuration): + """Configuration for MetricsAdvisor. Note that all parameters used to create this instance are saved as instance attributes. @@ -42,7 +42,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration, self).__init__(**kwargs) + super(MetricsAdvisorConfiguration, self).__init__(**kwargs) self.credential = credential self.endpoint = endpoint diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_metrics_advisor.py similarity index 87% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py rename to sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_metrics_advisor.py index 564113cfdead..fb7543c69aee 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/_metrics_advisor.py @@ -18,12 +18,12 @@ from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse -from ._configuration import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration -from .operations import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin +from ._configuration import MetricsAdvisorConfiguration +from .operations import MetricsAdvisorOperationsMixin from . import models -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2(MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin): +class MetricsAdvisor(MetricsAdvisorOperationsMixin): """Microsoft Azure Metrics Advisor REST API (OpenAPI v2). :param credential: Credential needed for the client to connect to Azure. @@ -40,7 +40,7 @@ def __init__( ): # type: (...) -> None base_url = '{endpoint}/metricsadvisor/v1.0' - self._config = MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration(credential, endpoint, **kwargs) + self._config = MetricsAdvisorConfiguration(credential, endpoint, **kwargs) self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -72,7 +72,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 + # type: () -> MetricsAdvisor self._client.__enter__() return self diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/__init__.py index 5110d588a403..e72d372fbd25 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2 import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 -__all__ = ['MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2'] +from ._metrics_advisor import MetricsAdvisor +__all__ = ['MetricsAdvisor'] diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_configuration.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_configuration.py index f3d8f5c3fe54..de14ef321746 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_configuration.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_configuration.py @@ -17,8 +17,8 @@ VERSION = "unknown" -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration(Configuration): - """Configuration for MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2. +class MetricsAdvisorConfiguration(Configuration): + """Configuration for MetricsAdvisor. Note that all parameters used to create this instance are saved as instance attributes. @@ -39,7 +39,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration, self).__init__(**kwargs) + super(MetricsAdvisorConfiguration, self).__init__(**kwargs) self.credential = credential self.endpoint = endpoint diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_metrics_advisor.py similarity index 86% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py rename to sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_metrics_advisor.py index 64c6f317b1f7..c11dca3e827c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_metrics_advisor.py @@ -16,12 +16,12 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration -from .operations import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin +from ._configuration import MetricsAdvisorConfiguration +from .operations import MetricsAdvisorOperationsMixin from .. import models -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2(MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin): +class MetricsAdvisor(MetricsAdvisorOperationsMixin): """Microsoft Azure Metrics Advisor REST API (OpenAPI v2). :param credential: Credential needed for the client to connect to Azure. @@ -37,7 +37,7 @@ def __init__( **kwargs: Any ) -> None: base_url = '{endpoint}/metricsadvisor/v1.0' - self._config = MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2Configuration(credential, endpoint, **kwargs) + self._config = MetricsAdvisorConfiguration(credential, endpoint, **kwargs) self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -66,7 +66,7 @@ async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> Async async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2": + async def __aenter__(self) -> "MetricsAdvisor": await self._client.__aenter__() return self diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/__init__.py index d301f3c2c9f8..7c5eb5aab483 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin +from ._metrics_advisor_operations import MetricsAdvisorOperationsMixin __all__ = [ - 'MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin', + 'MetricsAdvisorOperationsMixin', ] diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_metrics_advisor_operations.py similarity index 99% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py rename to sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_metrics_advisor_operations.py index 62c6c834d229..5c0aa1b0101f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/operations/_metrics_advisor_operations.py @@ -18,7 +18,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin: +class MetricsAdvisorOperationsMixin: async def get_active_series_count( self, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/__init__.py index 4f426ed14666..20230fbb7248 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/__init__.py @@ -323,7 +323,7 @@ from ._models import WholeMetricConfiguration # type: ignore from ._models import WholeMetricConfigurationPatch # type: ignore -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2_enums import ( +from ._metrics_advisor_enums import ( AnomalyAlertingConfigurationLogicType, AnomalyDetectionConfigurationLogicType, AnomalyDetectorDirection, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_enums.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_metrics_advisor_enums.py similarity index 100% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_enums.py rename to sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_metrics_advisor_enums.py diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_models_py3.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_models_py3.py index 621077cd6989..1be5f016122d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_models_py3.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2_enums import * +from ._metrics_advisor_enums import * class AlertingResultQuery(msrest.serialization.Model): diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/__init__.py index d301f3c2c9f8..7c5eb5aab483 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin +from ._metrics_advisor_operations import MetricsAdvisorOperationsMixin __all__ = [ - 'MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin', + 'MetricsAdvisorOperationsMixin', ] diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_metrics_advisor_operations.py similarity index 99% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py rename to sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_metrics_advisor_operations.py index 73b02ed9e7b0..5673e69d71fb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_microsoft_azure_metrics_advisor_restapi_open_ap_iv2_operations.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/operations/_metrics_advisor_operations.py @@ -22,7 +22,7 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2OperationsMixin(object): +class MetricsAdvisorOperationsMixin(object): def get_active_series_count( self, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_administration_client.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_administration_client.py index 1955c77ffcb7..78d68d1441b8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_administration_client.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_administration_client.py @@ -11,9 +11,7 @@ import datetime import six from azure.core.tracing.decorator import distributed_trace -from ._generated._microsoft_azure_metrics_advisor_restapi_open_ap_iv2 import ( - MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 as _Client, -) +from ._generated import MetricsAdvisor as _Client from ._generated.models import ( AnomalyAlertingConfiguration as _AnomalyAlertingConfiguration, AzureApplicationInsightsDataFeed as _AzureApplicationInsightsDataFeed, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_client.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_client.py index 0d5078054bf7..4cc124819353 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_client.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_metrics_advisor_client.py @@ -24,7 +24,7 @@ FeedbackDimensionFilter, DimensionGroupIdentity, ) -from ._generated import MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 as _Client +from ._generated import MetricsAdvisor as _Client from ._helpers import ( convert_to_sub_feedback, convert_datetime, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_administration_client_async.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_administration_client_async.py index 3b244b261c7b..6cc73ab99813 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_administration_client_async.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_administration_client_async.py @@ -20,7 +20,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async from azure.core.async_paging import AsyncItemPaged from .._generated.aio import ( - MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 as _ClientAsync, + MetricsAdvisor as _ClientAsync, ) from .._generated.models import ( AnomalyAlertingConfiguration as _AnomalyAlertingConfiguration, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_client_async.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_client_async.py index f527793546c3..8313ad5b45b1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_client_async.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/aio/_metrics_advisor_client_async.py @@ -28,9 +28,7 @@ FeedbackDimensionFilter, DimensionGroupIdentity, ) -from .._generated.aio import ( - MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2 as _ClientAsync, -) +from .._generated.aio import MetricsAdvisor as _ClientAsync from .._helpers import ( convert_to_sub_feedback, convert_datetime, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/models/__init__.py b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/models/__init__.py index 0829ccf4eb18..a5bc331ead11 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/models/__init__.py +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/models/__init__.py @@ -24,7 +24,7 @@ # # -------------------------------------------------------------------------- -from .._generated.models._microsoft_azure_metrics_advisor_restapi_open_ap_iv2_enums import ( +from .._generated.models import ( SnoozeScope, Severity as AnomalySeverity, DataSourceType as DatasourceType,