Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest swagger #20642

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)}
Expand Down Expand Up @@ -72,7 +72,7 @@ def close(self):
self._client.close()

def __enter__(self):
# type: () -> MicrosoftAzureMetricsAdvisorRESTAPIOpenAPIV2
# type: () -> MetricsAdvisor
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)}
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down