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

[AutoPR track2_azure-mgmt-monitor] [Hub Generated] Review request for Microsoft.Insights to add version stable/2019-03-01 #3788

Closed
Closed
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
4 changes: 2 additions & 2 deletions sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py
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 ._monitor_management_client import MonitorManagementClient
__all__ = ['MonitorManagementClient']
from ._monitor_client import MonitorClient
__all__ = ['MonitorClient']

try:
from ._patch import patch_sdk # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
from ._version import VERSION


class MonitorManagementClientConfiguration(Configuration):
"""Configuration for MonitorManagementClient.
class MonitorClientConfiguration(Configuration):
"""Configuration for MonitorClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

Expand All @@ -40,7 +40,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MonitorManagementClientConfiguration, self).__init__(**kwargs)
super(MonitorClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from ._configuration import MonitorManagementClientConfiguration
from ._configuration import MonitorClientConfiguration

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand All @@ -23,7 +23,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
class MonitorClient(MultiApiClientMixin, _SDKClient):
"""Monitor Management Client.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand All @@ -36,7 +36,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
Expand All @@ -47,7 +47,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
"""

DEFAULT_API_VERSION = '2019-10-17-preview'
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
_PROFILE_TAG = "azure.mgmt.monitor.MonitorClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand Down Expand Up @@ -92,9 +92,9 @@ def __init__(
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs)
self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(MonitorManagementClient, self).__init__(
super(MonitorClient, self).__init__(
api_version=api_version,
profile=profile
)
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 ._monitor_management_client import MonitorManagementClient
__all__ = ['MonitorManagementClient']
from ._monitor_client import MonitorClient
__all__ = ['MonitorClient']
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
from .._version import VERSION


class MonitorManagementClientConfiguration(Configuration):
"""Configuration for MonitorManagementClient.
class MonitorClientConfiguration(Configuration):
"""Configuration for MonitorClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

Expand All @@ -39,7 +39,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MonitorManagementClientConfiguration, self).__init__(**kwargs)
super(MonitorClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from ._configuration import MonitorManagementClientConfiguration
from ._configuration import MonitorClientConfiguration

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand All @@ -23,7 +23,7 @@ def __init__(self, *args, **kwargs):
"""
pass

class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
class MonitorClient(MultiApiClientMixin, _SDKClient):
"""Monitor Management Client.

This ready contains multiple API versions, to help you deal with all of the Azure clouds
Expand All @@ -36,7 +36,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str api_version: API version to use if no profile is provided, or if
missing in profile.
Expand All @@ -47,7 +47,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
"""

DEFAULT_API_VERSION = '2019-10-17-preview'
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
_PROFILE_TAG = "azure.mgmt.monitor.MonitorClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
Expand Down Expand Up @@ -92,9 +92,9 @@ def __init__(
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs)
self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(MonitorManagementClient, self).__init__(
super(MonitorClient, self).__init__(
api_version=api_version,
profile=profile
)
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 ._monitor_management_client import MonitorManagementClient
__all__ = ['MonitorManagementClient']
from ._monitor_client import MonitorClient
__all__ = ['MonitorClient']

try:
from ._patch import patch_sdk # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@

VERSION = "unknown"

class MonitorManagementClientConfiguration(Configuration):
"""Configuration for MonitorManagementClient.
class MonitorClientConfiguration(Configuration):
"""Configuration for MonitorClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

Expand All @@ -43,7 +43,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MonitorManagementClientConfiguration, self).__init__(**kwargs)
super(MonitorClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"chosen_version": "2015-04-01",
"total_api_version_list": ["2015-04-01"],
"client": {
"name": "MonitorManagementClient",
"filename": "_monitor_management_client",
"name": "MonitorClient",
"filename": "_monitor_client",
"description": "Monitor Management Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": false
"client_side_validation": true
},
"global_parameters": {
"sync": {
Expand All @@ -21,7 +21,7 @@
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The Azure subscription Id.",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
Expand All @@ -35,7 +35,7 @@
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The Azure subscription Id.",
"description": "The ID of the target subscription.",
"docstring_type": "str",
"required": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from azure.core.credentials import TokenCredential

from ._configuration import MonitorManagementClientConfiguration
from ._configuration import MonitorClientConfiguration
from .operations import ActivityLogsOperations
from .operations import AutoscaleSettingsOperations
from .operations import EventCategoriesOperations
Expand All @@ -26,7 +26,7 @@
from . import models


class MonitorManagementClient(object):
class MonitorClient(object):
"""Monitor Management Client.

:ivar activity_logs: ActivityLogsOperations operations
Expand All @@ -41,7 +41,7 @@ class MonitorManagementClient(object):
:vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -56,12 +56,11 @@ def __init__(
# type: (...) -> None
if not base_url:
base_url = 'https://management.azure.com'
self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs)
self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs)
self._client = 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._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.activity_logs = ActivityLogsOperations(
Expand All @@ -80,7 +79,7 @@ def close(self):
self._client.close()

def __enter__(self):
# type: () -> MonitorManagementClient
# type: () -> MonitorClient
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 ._monitor_management_client import MonitorManagementClient
__all__ = ['MonitorManagementClient']
from ._monitor_client import MonitorClient
__all__ = ['MonitorClient']
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

VERSION = "unknown"

class MonitorManagementClientConfiguration(Configuration):
"""Configuration for MonitorManagementClient.
class MonitorClientConfiguration(Configuration):
"""Configuration for MonitorClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
"""

Expand All @@ -40,7 +40,7 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(MonitorManagementClientConfiguration, self).__init__(**kwargs)
super(MonitorClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

from ._configuration import MonitorManagementClientConfiguration
from ._configuration import MonitorClientConfiguration
from .operations import ActivityLogsOperations
from .operations import AutoscaleSettingsOperations
from .operations import EventCategoriesOperations
Expand All @@ -24,7 +24,7 @@
from .. import models


class MonitorManagementClient(object):
class MonitorClient(object):
"""Monitor Management Client.

:ivar activity_logs: ActivityLogsOperations operations
Expand All @@ -39,7 +39,7 @@ class MonitorManagementClient(object):
:vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.aio.operations.TenantActivityLogsOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The Azure subscription Id.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -53,12 +53,11 @@ def __init__(
) -> None:
if not base_url:
base_url = 'https://management.azure.com'
self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs)
self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs)
self._client = AsyncARMPipelineClient(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._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.activity_logs = ActivityLogsOperations(
Expand All @@ -75,7 +74,7 @@ def __init__(
async def close(self) -> None:
await self._client.close()

async def __aenter__(self) -> "MonitorManagementClient":
async def __aenter__(self) -> "MonitorClient":
await self._client.__aenter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def prepare_request(next_link=None):
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
Expand Down
Loading