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-digitaltwins] [Digitaltwins] Update readme.python.md #2213

Closed
wants to merge 1 commit into from
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
12 changes: 6 additions & 6 deletions sdk/digitaltwins/azure-mgmt-digitaltwins/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"commit": "750ec43bdd137935cea70888634dbc9730c99fec",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
],
"commit": "2eff0ce269e651478a36712c6edcd51a82842141",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/digitaltwins/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/digitaltwins/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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/digitaltwins/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
patch_sdk()
except ImportError:
pass

from ._version import VERSION

__version__ = VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer
from typing import Any, Optional, TYPE_CHECKING

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

from ._configuration import AzureDigitalTwinsManagementClientConfiguration
from ._serialization import Deserializer, Serializer

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional

from azure.core.credentials import TokenCredential

class _SDKClient(object):
Expand All @@ -43,9 +40,9 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient):
The api-version parameter sets the default API version if the operation
group is not described in the profile.

:param credential: Credential needed for the client to connect to Azure.
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription identifier.
:param subscription_id: The subscription identifier. Required.
:type subscription_id: str
:param api_version: API version to use if no profile is provided, or if missing in profile.
:type api_version: str
Expand All @@ -56,7 +53,7 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2022-05-31'
DEFAULT_API_VERSION = '2022-10-31'
_PROFILE_TAG = "azure.mgmt.digitaltwins.AzureDigitalTwinsManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -67,12 +64,12 @@ class AzureDigitalTwinsManagementClient(MultiApiClientMixin, _SDKClient):

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
credential: "TokenCredential",
subscription_id: str,
api_version: Optional[str]=None,
base_url: str = "https://management.azure.com",
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
self._config = AzureDigitalTwinsManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
Expand All @@ -94,6 +91,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-12-01: :mod:`v2020_12_01.models<azure.mgmt.digitaltwins.v2020_12_01.models>`
* 2021-06-30-preview: :mod:`v2021_06_30_preview.models<azure.mgmt.digitaltwins.v2021_06_30_preview.models>`
* 2022-05-31: :mod:`v2022_05_31.models<azure.mgmt.digitaltwins.v2022_05_31.models>`
* 2022-10-31: :mod:`v2022_10_31.models<azure.mgmt.digitaltwins.v2022_10_31.models>`
"""
if api_version == '2020-03-01-preview':
from .v2020_03_01_preview import models
Expand All @@ -110,6 +108,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-05-31':
from .v2022_05_31 import models
return models
elif api_version == '2022-10-31':
from .v2022_10_31 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand All @@ -121,6 +122,7 @@ def digital_twins(self):
* 2020-12-01: :class:`DigitalTwinsOperations<azure.mgmt.digitaltwins.v2020_12_01.operations.DigitalTwinsOperations>`
* 2021-06-30-preview: :class:`DigitalTwinsOperations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.DigitalTwinsOperations>`
* 2022-05-31: :class:`DigitalTwinsOperations<azure.mgmt.digitaltwins.v2022_05_31.operations.DigitalTwinsOperations>`
* 2022-10-31: :class:`DigitalTwinsOperations<azure.mgmt.digitaltwins.v2022_10_31.operations.DigitalTwinsOperations>`
"""
api_version = self._get_api_version('digital_twins')
if api_version == '2020-03-01-preview':
Expand All @@ -133,8 +135,11 @@ def digital_twins(self):
from .v2021_06_30_preview.operations import DigitalTwinsOperations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import DigitalTwinsOperations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import DigitalTwinsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'digital_twins'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -146,6 +151,7 @@ def digital_twins_endpoint(self):
* 2020-12-01: :class:`DigitalTwinsEndpointOperations<azure.mgmt.digitaltwins.v2020_12_01.operations.DigitalTwinsEndpointOperations>`
* 2021-06-30-preview: :class:`DigitalTwinsEndpointOperations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.DigitalTwinsEndpointOperations>`
* 2022-05-31: :class:`DigitalTwinsEndpointOperations<azure.mgmt.digitaltwins.v2022_05_31.operations.DigitalTwinsEndpointOperations>`
* 2022-10-31: :class:`DigitalTwinsEndpointOperations<azure.mgmt.digitaltwins.v2022_10_31.operations.DigitalTwinsEndpointOperations>`
"""
api_version = self._get_api_version('digital_twins_endpoint')
if api_version == '2020-03-01-preview':
Expand All @@ -158,8 +164,11 @@ def digital_twins_endpoint(self):
from .v2021_06_30_preview.operations import DigitalTwinsEndpointOperations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import DigitalTwinsEndpointOperations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import DigitalTwinsEndpointOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'digital_twins_endpoint'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -171,6 +180,7 @@ def operations(self):
* 2020-12-01: :class:`Operations<azure.mgmt.digitaltwins.v2020_12_01.operations.Operations>`
* 2021-06-30-preview: :class:`Operations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.Operations>`
* 2022-05-31: :class:`Operations<azure.mgmt.digitaltwins.v2022_05_31.operations.Operations>`
* 2022-10-31: :class:`Operations<azure.mgmt.digitaltwins.v2022_10_31.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2020-03-01-preview':
Expand All @@ -183,8 +193,11 @@ def operations(self):
from .v2021_06_30_preview.operations import Operations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import Operations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -194,6 +207,7 @@ def private_endpoint_connections(self):
* 2020-12-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.digitaltwins.v2020_12_01.operations.PrivateEndpointConnectionsOperations>`
* 2021-06-30-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.PrivateEndpointConnectionsOperations>`
* 2022-05-31: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.digitaltwins.v2022_05_31.operations.PrivateEndpointConnectionsOperations>`
* 2022-10-31: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.digitaltwins.v2022_10_31.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2020-12-01':
Expand All @@ -202,8 +216,11 @@ def private_endpoint_connections(self):
from .v2021_06_30_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -213,6 +230,7 @@ def private_link_resources(self):
* 2020-12-01: :class:`PrivateLinkResourcesOperations<azure.mgmt.digitaltwins.v2020_12_01.operations.PrivateLinkResourcesOperations>`
* 2021-06-30-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.PrivateLinkResourcesOperations>`
* 2022-05-31: :class:`PrivateLinkResourcesOperations<azure.mgmt.digitaltwins.v2022_05_31.operations.PrivateLinkResourcesOperations>`
* 2022-10-31: :class:`PrivateLinkResourcesOperations<azure.mgmt.digitaltwins.v2022_10_31.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2020-12-01':
Expand All @@ -221,8 +239,11 @@ def private_link_resources(self):
from .v2021_06_30_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
Expand All @@ -231,14 +252,18 @@ def time_series_database_connections(self):

* 2021-06-30-preview: :class:`TimeSeriesDatabaseConnectionsOperations<azure.mgmt.digitaltwins.v2021_06_30_preview.operations.TimeSeriesDatabaseConnectionsOperations>`
* 2022-05-31: :class:`TimeSeriesDatabaseConnectionsOperations<azure.mgmt.digitaltwins.v2022_05_31.operations.TimeSeriesDatabaseConnectionsOperations>`
* 2022-10-31: :class:`TimeSeriesDatabaseConnectionsOperations<azure.mgmt.digitaltwins.v2022_10_31.operations.TimeSeriesDatabaseConnectionsOperations>`
"""
api_version = self._get_api_version('time_series_database_connections')
if api_version == '2021-06-30-preview':
from .v2021_06_30_preview.operations import TimeSeriesDatabaseConnectionsOperations as OperationClass
elif api_version == '2022-05-31':
from .v2022_05_31.operations import TimeSeriesDatabaseConnectionsOperations as OperationClass
elif api_version == '2022-10-31':
from .v2022_10_31.operations import TimeSeriesDatabaseConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'time_series_database_connections'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

def close(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
Expand All @@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

class AzureDigitalTwinsManagementClientConfiguration(Configuration):
Expand All @@ -28,19 +26,18 @@ class AzureDigitalTwinsManagementClientConfiguration(Configuration):
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.
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The subscription identifier.
:param subscription_id: The subscription identifier. Required.
:type subscription_id: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
Expand All @@ -55,9 +52,8 @@ def __init__(

def _configure(
self,
**kwargs # type: Any
**kwargs: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
Expand Down
Loading