diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/MANIFEST.in b/sdk/azureadb2c/azure-mgmt-azureadb2c/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/MANIFEST.in +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/_meta.json b/sdk/azureadb2c/azure-mgmt-azureadb2c/_meta.json new file mode 100644 index 000000000000..4dd2d559a7e4 --- /dev/null +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.0", + "@autorest/modelerfour@4.19.2" + ], + "commit": "23c24e00212be80ed2b37a633c34b7aacc211346", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/cpim/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/cpim/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_configuration.py index 143adf32a07a..1bd56c4694bf 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,11 @@ from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_cpim_configuration_client.py index 56ea074123e9..3f23d9640c3f 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/_cpim_configuration_client.py @@ -9,13 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import CPIMConfigurationClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -38,9 +47,10 @@ class CPIMConfigurationClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -60,9 +70,9 @@ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): if not base_url: diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_configuration.py index a0d976ec6811..8525988d827d 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,9 @@ from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. @@ -31,8 +34,8 @@ class CPIMConfigurationClientConfiguration(Configuration): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str + credential: "AsyncTokenCredential", + subscription_id: str, **kwargs # type: Any ) -> None: if credential is None: diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_cpim_configuration_client.py index a9b1009a4856..2e62e3b1500a 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/aio/_cpim_configuration_client.py @@ -9,13 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import CPIMConfigurationClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -38,9 +45,10 @@ class CPIMConfigurationClient(MultiApiClientMixin, _SDKClient): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -58,11 +66,11 @@ class CPIMConfigurationClient(MultiApiClientMixin, _SDKClient): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: Optional[str] = None, + profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: if not base_url: diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/__init__.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/__init__.py index 223e0381b0a6..7a081181bdbe 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/__init__.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._cpim_configuration_client import CPIMConfigurationClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['CPIMConfigurationClient'] try: diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_configuration.py index 1b547a7d43ea..27635de8f4b5 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_cpim_configuration_client.py index e2e578454b3a..b52e672bc7c6 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_cpim_configuration_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import CPIMConfigurationClientConfiguration from .operations import B2CTenantsOperations @@ -53,6 +54,7 @@ def __init__( 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.b2_ctenants = B2CTenantsOperations( @@ -60,6 +62,24 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_metadata.json b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_metadata.json index 31742f097234..553a949cdd11 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_metadata.json +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CPIMConfigurationClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CPIMConfigurationClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", "docstring_type": "str", "required": true @@ -42,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "b2_ctenants": "B2CTenantsOperations", "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_version.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_version.py new file mode 100644 index 000000000000..dfa6ee022f15 --- /dev/null +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b2" diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_configuration.py index b9759ca2f801..d6c2fdcd1e96 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_cpim_configuration_client.py index 9d408b1f6392..4abb429a79b3 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/_cpim_configuration_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -50,6 +51,7 @@ def __init__( 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.b2_ctenants = B2CTenantsOperations( @@ -57,6 +59,23 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_b2_ctenants_operations.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_b2_ctenants_operations.py index 0e028a5c818b..4bee3bf1fe43 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_b2_ctenants_operations.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_b2_ctenants_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def check_name_availability( self, check_name_availability_request_body: Optional["_models.CheckNameAvailabilityRequestBody"] = None, - **kwargs + **kwargs: Any ) -> "_models.NameAvailabilityResponse": """Checks the availability and validity of a domain name for the tenant. @@ -107,7 +107,7 @@ async def check_name_availability( def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.B2CTenantResourceList"]: """Get all the Azure AD B2C tenant resources in a resource group. @@ -176,7 +176,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.B2CTenantResourceList"]: """Get all the Azure AD B2C tenant resources in a subscription. @@ -244,7 +244,7 @@ async def get( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.B2CTenantResource": """Get the Azure AD B2C tenant resource. @@ -303,7 +303,7 @@ async def update( resource_group_name: str, resource_name: str, update_tenant_request_body: Optional["_models.B2CTenantUpdateRequest"] = None, - **kwargs + **kwargs: Any ) -> "_models.B2CTenantResource": """Update the Azure AD B2C tenant resource. @@ -372,7 +372,7 @@ async def _create_initial( resource_group_name: str, resource_name: str, create_tenant_request_body: Optional["_models.CreateTenantRequestBody"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.B2CTenantResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.B2CTenantResource"]] error_map = { @@ -438,7 +438,7 @@ async def begin_create( resource_group_name: str, resource_name: str, create_tenant_request_body: Optional["_models.CreateTenantRequestBody"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.B2CTenantResource"]: """Initiates an async request to create both the Azure AD B2C tenant and the corresponding Azure resource linked to a subscription. @@ -451,8 +451,8 @@ async def begin_create( :type create_tenant_request_body: ~$(python-base-namespace).v2019_01_01_preview.models.CreateTenantRequestBody :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either B2CTenantResource or the result of cls(response) @@ -509,7 +509,7 @@ async def _delete_initial( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -558,7 +558,7 @@ async def begin_delete( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Initiates an async operation to delete the Azure AD B2C tenant and Azure resource. The resource deletion can only happen as the last step in `the tenant deletion process @@ -570,8 +570,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_operations.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_operations.py index 0698c45ced56..32e11d23c908 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_operations.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists the operations available from this provider. @@ -106,7 +106,7 @@ async def get_next(next_link=None): async def get_async_status( self, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.AsyncOperationStatus": """Gets the status of the async operation. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_cpim_configuration_client_enums.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_cpim_configuration_client_enums.py index 88b51ed674b3..d7e1cce9495b 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_cpim_configuration_client_enums.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_cpim_configuration_client_enums.py @@ -30,9 +30,15 @@ class B2CResourceSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The name of the SKU for the tenant. """ - STANDARD = "Standard" #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model. - PREMIUM_P1 = "PremiumP1" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing. - PREMIUM_P2 = "PremiumP2" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing. + #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users + #: (MAU) billing model. + STANDARD = "Standard" + #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications + #: based billing. + PREMIUM_P1 = "PremiumP1" + #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications + #: based billing. + PREMIUM_P2 = "PremiumP2" class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of billing. Will be MAU for all new customers. If 'Auths', it can be updated to 'MAU'. @@ -40,20 +46,30 @@ class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): `aka.ms/b2cBilling `_. """ - MAU = "MAU" #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users (MAU) billing model. - AUTHS = "Auths" #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications based billing. + #: Azure AD B2C usage is billed to a linked Azure subscription and uses a monthly active users + #: (MAU) billing model. + MAU = "MAU" + #: Azure AD B2C usage is billed to a linked Azure subscription and uses number of authentications + #: based billing. + AUTHS = "Auths" class NameAvailabilityReasonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Describes the reason for the 'nameAvailable' value. """ - ALREADY_EXISTS = "AlreadyExists" #: The name is already in use and is therefore unavailable. - INVALID = "Invalid" #: The name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.). + #: The name is already in use and is therefore unavailable. + ALREADY_EXISTS = "AlreadyExists" + #: The name provided does not match the resource provider’s naming requirements (incorrect length, + #: unsupported characters, etc.). + INVALID = "Invalid" class StatusType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The status of the operation. """ - SUCCEEDED = "Succeeded" #: The operation succeeded. - PENDING = "Pending" #: The operation is pending. - FAILED = "Failed" #: The operation failed. + #: The operation succeeded. + SUCCEEDED = "Succeeded" + #: The operation is pending. + PENDING = "Pending" + #: The operation failed. + FAILED = "Failed" diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models.py index 9d0a71aba0e9..e0eea767ad44 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models.py @@ -28,8 +28,8 @@ class AsyncOperationStatus(msrest.serialization.Model): :param error: Error response if async operation failed. :type error: ~$(python-base-namespace).v2019_01_01_preview.models.AsyncOperationStatusError :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -133,15 +133,15 @@ class B2CTenantResource(msrest.serialization.Model): :vartype id: str :ivar name: The name of the B2C tenant resource. :vartype name: str - :param location: Required. The location in which the resource is hosted and data resides. Refer - to `this documentation `_ to see valid data residency - locations. Please choose one of 'United States', 'Europe', and 'Asia Pacific'. + :param location: Required. The location in which the resource is hosted and data resides. Can + be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to `this + documentation `_ for more information. :type location: str :param tags: A set of tags. Resource Tags. :type tags: dict[str, str] :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -247,8 +247,8 @@ class B2CTenantUpdateRequest(msrest.serialization.Model): :param tags: A set of tags. Resource Tags. :type tags: dict[str, str] :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -309,13 +309,13 @@ class CreateTenantRequestBody(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param location: Required. The location in which the resource is hosted and data resides. Refer - to `this documentation `_ to see valid data residency - locations. Please choose one of 'United States', 'Europe', and 'Asia Pacific'. + :param location: Required. The location in which the resource is hosted and data resides. Can + be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to `this + documentation `_ for more information. :type location: str :param properties: Required. - :type properties: ~$(python-base- - namespace).v2019_01_01_preview.models.CreateTenantRequestBodyProperties + :type properties: + ~$(python-base-namespace).v2019_01_01_preview.models.CreateTenantRequestBodyProperties :param sku: Required. SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at `aka.ms/b2cBilling `_. :type sku: ~$(python-base-namespace).v2019_01_01_preview.models.B2CResourceSKU @@ -381,7 +381,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -417,8 +417,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2019_01_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2019_01_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2019_01_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -459,8 +459,8 @@ class NameAvailabilityResponse(msrest.serialization.Model): :type name_available: bool :param reason: Describes the reason for the 'nameAvailable' value. Possible values include: "AlreadyExists", "Invalid". - :type reason: str or ~$(python-base- - namespace).v2019_01_01_preview.models.NameAvailabilityReasonType + :type reason: str or + ~$(python-base-namespace).v2019_01_01_preview.models.NameAvailabilityReasonType """ _attribute_map = { diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models_py3.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models_py3.py index bd19f3dda298..d5cffccf723d 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models_py3.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/models/_models_py3.py @@ -32,8 +32,8 @@ class AsyncOperationStatus(msrest.serialization.Model): :param error: Error response if async operation failed. :type error: ~$(python-base-namespace).v2019_01_01_preview.models.AsyncOperationStatusError :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -152,15 +152,15 @@ class B2CTenantResource(msrest.serialization.Model): :vartype id: str :ivar name: The name of the B2C tenant resource. :vartype name: str - :param location: Required. The location in which the resource is hosted and data resides. Refer - to `this documentation `_ to see valid data residency - locations. Please choose one of 'United States', 'Europe', and 'Asia Pacific'. + :param location: Required. The location in which the resource is hosted and data resides. Can + be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to `this + documentation `_ for more information. :type location: str :param tags: A set of tags. Resource Tags. :type tags: dict[str, str] :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -274,8 +274,8 @@ class B2CTenantUpdateRequest(msrest.serialization.Model): :param tags: A set of tags. Resource Tags. :type tags: dict[str, str] :param billing_config: The billing configuration for the tenant. - :type billing_config: ~$(python-base- - namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig + :type billing_config: + ~$(python-base-namespace).v2019_01_01_preview.models.B2CTenantResourcePropertiesBillingConfig :param tenant_id: An identifier of the B2C tenant. :type tenant_id: str """ @@ -344,13 +344,13 @@ class CreateTenantRequestBody(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param location: Required. The location in which the resource is hosted and data resides. Refer - to `this documentation `_ to see valid data residency - locations. Please choose one of 'United States', 'Europe', and 'Asia Pacific'. + :param location: Required. The location in which the resource is hosted and data resides. Can + be one of 'United States', 'Europe', 'Asia Pacific', or 'Australia' (preview). Refer to `this + documentation `_ for more information. :type location: str :param properties: Required. - :type properties: ~$(python-base- - namespace).v2019_01_01_preview.models.CreateTenantRequestBodyProperties + :type properties: + ~$(python-base-namespace).v2019_01_01_preview.models.CreateTenantRequestBodyProperties :param sku: Required. SKU properties of the Azure AD B2C tenant. Learn more about Azure AD B2C billing at `aka.ms/b2cBilling `_. :type sku: ~$(python-base-namespace).v2019_01_01_preview.models.B2CResourceSKU @@ -424,7 +424,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -460,8 +460,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2019_01_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2019_01_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2019_01_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -502,8 +502,8 @@ class NameAvailabilityResponse(msrest.serialization.Model): :type name_available: bool :param reason: Describes the reason for the 'nameAvailable' value. Possible values include: "AlreadyExists", "Invalid". - :type reason: str or ~$(python-base- - namespace).v2019_01_01_preview.models.NameAvailabilityReasonType + :type reason: str or + ~$(python-base-namespace).v2019_01_01_preview.models.NameAvailabilityReasonType """ _attribute_map = { diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/operations/_b2_ctenants_operations.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/operations/_b2_ctenants_operations.py index af288754869e..1837edff6a92 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/operations/_b2_ctenants_operations.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2019_01_01_preview/operations/_b2_ctenants_operations.py @@ -462,8 +462,8 @@ def begin_create( :type create_tenant_request_body: ~$(python-base-namespace).v2019_01_01_preview.models.CreateTenantRequestBody :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either B2CTenantResource or the result of cls(response) @@ -583,8 +583,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/__init__.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/__init__.py index 223e0381b0a6..7a081181bdbe 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/__init__.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._cpim_configuration_client import CPIMConfigurationClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['CPIMConfigurationClient'] try: diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_configuration.py index e67073e37a65..d7545537ed72 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_cpim_configuration_client.py index bf51e9a87939..f2ab1d8b3db5 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_cpim_configuration_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import CPIMConfigurationClientConfiguration from .operations import Operations @@ -52,6 +53,7 @@ def __init__( 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.operations = Operations( @@ -59,6 +61,24 @@ def __init__( self.guest_usages = GuestUsagesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_metadata.json b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_metadata.json index 63233f94a9d3..7b18a760985c 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_metadata.json +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CPIMConfigurationClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CPIMConfigurationClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).", "docstring_type": "str", "required": true @@ -42,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "operations": "Operations", "guest_usages": "GuestUsagesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_version.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_version.py new file mode 100644 index 000000000000..dfa6ee022f15 --- /dev/null +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b2" diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_configuration.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_configuration.py index 2f963820f694..2f724fee66f7 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_configuration.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class CPIMConfigurationClientConfiguration(Configuration): """Configuration for CPIMConfigurationClient. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_cpim_configuration_client.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_cpim_configuration_client.py index 2e5c9ab47915..7d5154de18ea 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_cpim_configuration_client.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/_cpim_configuration_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -49,6 +50,7 @@ def __init__( 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.operations = Operations( @@ -56,6 +58,23 @@ def __init__( self.guest_usages = GuestUsagesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_guest_usages_operations.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_guest_usages_operations.py index 8520dd526abd..a501b8222e7b 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_guest_usages_operations.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_guest_usages_operations.py @@ -46,7 +46,7 @@ async def create( resource_group_name: str, resource_name: str, resource: Optional["_models.GuestUsagesResource"] = None, - **kwargs + **kwargs: Any ) -> "_models.GuestUsagesResource": """Creates a Guest Usages resource. @@ -117,7 +117,7 @@ async def update( resource_group_name: str, resource_name: str, resource_patch: Optional["_models.GuestUsagesResourcePatch"] = None, - **kwargs + **kwargs: Any ) -> "_models.GuestUsagesResource": """Updates a Guest Usages resource. @@ -187,7 +187,7 @@ async def delete( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a Guest Usages resource. @@ -244,7 +244,7 @@ async def get( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.GuestUsagesResource": """Gets a Guest Usages resource. @@ -302,7 +302,7 @@ async def get( def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestUsagesResourceList"]: """Gets Guest Usages resources under a subscription. @@ -372,7 +372,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestUsagesResourceList"]: """Gets Guest Usages resources under resource group. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_operations.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_operations.py index acb5f2340f04..556f0b83a8b8 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_operations.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists the operations available from this provider. diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models.py index 2033aa35fddd..581584d14380 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models.py @@ -17,7 +17,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -53,8 +53,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] """ _validation = { diff --git a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models_py3.py b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models_py3.py index 2c18f4b05ad0..4d7367bfb4dd 100644 --- a/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models_py3.py +++ b/sdk/azureadb2c/azure-mgmt-azureadb2c/azure/mgmt/azureadb2c/v2020_05_01_preview/models/_models_py3.py @@ -19,7 +19,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -55,8 +55,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] """ _validation = {