From d4c681b53e2fa9aef14f84e3203ee17a5cfa12b9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 3 Nov 2021 09:04:52 +0000 Subject: [PATCH] CodeGen from PR 16377 in Azure/azure-rest-api-specs Merge c72064e1756936920cad54db91adeb13f173533f into 54a13e2bbb5bf0b264dde6874e014a367f2dc02d --- .../azure-mgmt-botservice/_meta.json | 10 +- .../mgmt/botservice/_azure_bot_service.py | 16 + .../azure/mgmt/botservice/_configuration.py | 2 +- .../azure/mgmt/botservice/_metadata.json | 11 +- .../azure/mgmt/botservice/_version.py | 2 +- .../mgmt/botservice/aio/_azure_bot_service.py | 16 + .../mgmt/botservice/aio/_configuration.py | 2 +- .../botservice/aio/operations/__init__.py | 6 + .../operations/_bot_connection_operations.py | 14 +- .../aio/operations/_bots_operations.py | 14 +- .../aio/operations/_channels_operations.py | 12 +- .../aio/operations/_direct_line_operations.py | 2 +- .../operations/_host_settings_operations.py | 2 +- .../_operation_results_operations.py | 153 ++++ .../botservice/aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 314 +++++++++ .../_private_link_resources_operations.py | 100 +++ .../azure/mgmt/botservice/models/__init__.py | 38 + .../models/_azure_bot_service_enums.py | 35 + .../azure/mgmt/botservice/models/_models.py | 564 ++++++++++++++- .../mgmt/botservice/models/_models_py3.py | 660 +++++++++++++++++- .../mgmt/botservice/operations/__init__.py | 6 + .../operations/_bot_connection_operations.py | 14 +- .../botservice/operations/_bots_operations.py | 14 +- .../operations/_channels_operations.py | 12 +- .../operations/_direct_line_operations.py | 2 +- .../operations/_host_settings_operations.py | 2 +- .../_operation_results_operations.py | 159 +++++ .../mgmt/botservice/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 322 +++++++++ .../_private_link_resources_operations.py | 105 +++ 31 files changed, 2516 insertions(+), 97 deletions(-) create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operation_results_operations.py create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operation_results_operations.py create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_link_resources_operations.py diff --git a/sdk/botservice/azure-mgmt-botservice/_meta.json b/sdk/botservice/azure-mgmt-botservice/_meta.json index 1a49081aec34..cd34f768ba37 100644 --- a/sdk/botservice/azure-mgmt-botservice/_meta.json +++ b/sdk/botservice/azure-mgmt-botservice/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", - "@autorest/modelerfour@4.19.1" + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" ], - "commit": "e23a53d64f46db42df2886989a3436f7431168f4", + "commit": "a23d94329d6c056276108fab30d5aeec2cca3631", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/botservice/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.1 --version=3.4.2", + "autorest_command": "autorest specification/botservice/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.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/botservice/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py index 2f436d87a47a..2c291ccd37b7 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py @@ -25,6 +25,9 @@ from .operations import Operations from .operations import BotConnectionOperations from .operations import HostSettingsOperations +from .operations import OperationResultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from . import models @@ -43,11 +46,18 @@ class AzureBotService(object): :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations :ivar host_settings: HostSettingsOperations operations :vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations + :ivar operation_results: OperationResultsOperations operations + :vartype operation_results: azure.mgmt.botservice.operations.OperationResultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.botservice.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.botservice.operations.PrivateLinkResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Azure Subscription ID. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -80,6 +90,12 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.host_settings = HostSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_configuration.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_configuration.py index 1ea61826a5b3..893f909770ab 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_configuration.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_metadata.json b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_metadata.json index b0d2e5632170..1e0cd9310167 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_metadata.json +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-03-01", - "total_api_version_list": ["2021-03-01"], + "chosen_version": "2021-05-01-preview", + "total_api_version_list": ["2021-05-01-preview"], "client": { "name": "AzureBotService", "filename": "_azure_bot_service", @@ -8,7 +8,7 @@ "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, - "has_lro_operations": false, + "has_lro_operations": 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\": [\"AzureBotServiceConfiguration\"]}}, \"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\": [\"AzureBotServiceConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" @@ -103,6 +103,9 @@ "direct_line": "DirectLineOperations", "operations": "Operations", "bot_connection": "BotConnectionOperations", - "host_settings": "HostSettingsOperations" + "host_settings": "HostSettingsOperations", + "operation_results": "OperationResultsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations" } } \ No newline at end of file diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_version.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_version.py index c47f66669f1b..035146e99a22 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_version.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "0.2.0" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_azure_bot_service.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_azure_bot_service.py index 38d15c8325bb..f9d38276af18 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_azure_bot_service.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_azure_bot_service.py @@ -23,6 +23,9 @@ from .operations import Operations from .operations import BotConnectionOperations from .operations import HostSettingsOperations +from .operations import OperationResultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .. import models @@ -41,11 +44,18 @@ class AzureBotService(object): :vartype bot_connection: azure.mgmt.botservice.aio.operations.BotConnectionOperations :ivar host_settings: HostSettingsOperations operations :vartype host_settings: azure.mgmt.botservice.aio.operations.HostSettingsOperations + :ivar operation_results: OperationResultsOperations operations + :vartype operation_results: azure.mgmt.botservice.aio.operations.OperationResultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.botservice.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.botservice.aio.operations.PrivateLinkResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Azure Subscription ID. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -77,6 +87,12 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.host_settings = HostSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + 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. diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_configuration.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_configuration.py index dd20f20ff3cc..18a1ebb9e0b6 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_configuration.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/__init__.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/__init__.py index 57b1265e4d3f..89604c7b3d53 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/__init__.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/__init__.py @@ -12,6 +12,9 @@ from ._operations import Operations from ._bot_connection_operations import BotConnectionOperations from ._host_settings_operations import HostSettingsOperations +from ._operation_results_operations import OperationResultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations __all__ = [ 'BotsOperations', @@ -20,4 +23,7 @@ 'Operations', 'BotConnectionOperations', 'HostSettingsOperations', + 'OperationResultsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', ] diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bot_connection_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bot_connection_operations.py index b3f52991b370..d480838751e4 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bot_connection_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bot_connection_operations.py @@ -57,7 +57,7 @@ async def list_service_providers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ async def list_with_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -183,7 +183,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -258,7 +258,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -393,7 +393,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -450,7 +450,7 @@ def list_by_bot_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bots_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bots_operations.py index f4aeb496f22e..216672c23d12 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bots_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_bots_operations.py @@ -66,7 +66,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -154,7 +154,7 @@ async def update( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.Bot(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -278,7 +278,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -334,7 +334,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -402,7 +402,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -473,7 +473,7 @@ async def get_check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_channels_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_channels_operations.py index a67700e64ffb..23025697d142 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_channels_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_channels_operations.py @@ -69,7 +69,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -161,7 +161,7 @@ async def update( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.BotChannel(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -233,7 +233,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -293,7 +293,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -356,7 +356,7 @@ async def list_with_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -416,7 +416,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_direct_line_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_direct_line_operations.py index 8476401cb3d2..fa8623183b77 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_direct_line_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_direct_line_operations.py @@ -69,7 +69,7 @@ async def regenerate_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_host_settings_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_host_settings_operations.py index adb542bfc081..6be51b02b1dc 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_host_settings_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_host_settings_operations.py @@ -56,7 +56,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operation_results_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operation_results_operations.py new file mode 100644 index 000000000000..740683a9d8f3 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operation_results_operations.py @@ -0,0 +1,153 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultsOperations: + """OperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _get_initial( + self, + operation_result_id: str, + **kwargs: Any + ) -> Optional["_models.OperationResultsDescription"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultsDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self._get_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResultsDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}'} # type: ignore + + async def begin_get( + self, + operation_result_id: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.OperationResultsDescription"]: + """Get the operation result for a long running operation. + + :param operation_result_id: The ID of the operation result to get. + :type operation_result_id: 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: 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 OperationResultsDescription or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.botservice.models.OperationResultsDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultsDescription"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_initial( + operation_result_id=operation_result_id, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResultsDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}'} # type: ignore diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operations.py index 2c6d92928bd5..88de23ccf2f3 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..107ff6a0cacf --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,314 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List all the private endpoint connections associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.botservice.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def create( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + properties: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Update the state of specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + """Deletes the specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_link_resources_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..0b45cdad264d --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,100 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_bot_resource( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourceListResult": + """Gets the private link resources that need to be created for a Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_bot_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_bot_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources'} # type: ignore diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py index bd46a4fa483c..448b13f92479 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py @@ -45,9 +45,19 @@ from ._models_py3 import OperationDisplayInfo from ._models_py3 import OperationEntity from ._models_py3 import OperationEntityListResult + from ._models_py3 import OperationResultsDescription + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceBase + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import Resource from ._models_py3 import ServiceProvider from ._models_py3 import ServiceProviderParameter + from ._models_py3 import ServiceProviderParameterMetadata + from ._models_py3 import ServiceProviderParameterMetadataConstraints from ._models_py3 import ServiceProviderProperties from ._models_py3 import ServiceProviderResponseList from ._models_py3 import SiteInfo @@ -102,9 +112,19 @@ from ._models import OperationDisplayInfo # type: ignore from ._models import OperationEntity # type: ignore from ._models import OperationEntityListResult # type: ignore + from ._models import OperationResultsDescription # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceBase # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore from ._models import Resource # type: ignore from ._models import ServiceProvider # type: ignore from ._models import ServiceProviderParameter # type: ignore + from ._models import ServiceProviderParameterMetadata # type: ignore + from ._models import ServiceProviderParameterMetadataConstraints # type: ignore from ._models import ServiceProviderProperties # type: ignore from ._models import ServiceProviderResponseList # type: ignore from ._models import SiteInfo # type: ignore @@ -125,6 +145,10 @@ ChannelName, Key, Kind, + MsaAppType, + OperationResultStatus, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, RegenerateKeysChannelName, SkuName, SkuTier, @@ -169,9 +193,19 @@ 'OperationDisplayInfo', 'OperationEntity', 'OperationEntityListResult', + 'OperationResultsDescription', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceBase', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', 'Resource', 'ServiceProvider', 'ServiceProviderParameter', + 'ServiceProviderParameterMetadata', + 'ServiceProviderParameterMetadataConstraints', 'ServiceProviderProperties', 'ServiceProviderResponseList', 'SiteInfo', @@ -190,6 +224,10 @@ 'ChannelName', 'Key', 'Kind', + 'MsaAppType', + 'OperationResultStatus', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', 'RegenerateKeysChannelName', 'SkuName', 'SkuTier', diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py index 68217ec6aa3e..36942b6cdd5a 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py @@ -59,6 +59,41 @@ class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FUNCTION = "function" AZUREBOT = "azurebot" +class MsaAppType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Microsoft App Type for the bot + """ + + USER_ASSIGNED_MSI = "UserAssignedMSI" + SINGLE_TENANT = "SingleTenant" + MULTI_TENANT = "MultiTenant" + +class OperationResultStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the operation being performed. + """ + + CANCELED = "Canceled" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + REQUESTED = "Requested" + RUNNING = "Running" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + class RegenerateKeysChannelName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): WEB_CHAT_CHANNEL = "WebChatChannel" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py index e6e002c38513..a140faa1ebc7 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py @@ -20,6 +20,8 @@ class Channel(msrest.serialization.Model): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str """ _validation = { @@ -28,6 +30,7 @@ class Channel(msrest.serialization.Model): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } _subtype_map = { @@ -40,26 +43,36 @@ def __init__( ): super(Channel, self).__init__(**kwargs) self.channel_name = None # type: Optional[str] + self.etag = kwargs.get('etag', None) class AlexaChannel(Channel): """Alexa channel definition. + Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Alexa channel resource. :type properties: ~azure.mgmt.botservice.models.AlexaChannelProperties + :ivar provisioning_state: Provisioning state of the resource. + :vartype provisioning_state: str """ _validation = { 'channel_name': {'required': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -69,6 +82,7 @@ def __init__( super(AlexaChannel, self).__init__(**kwargs) self.channel_name = 'AlexaChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = None class AlexaChannelProperties(msrest.serialization.Model): @@ -135,12 +149,15 @@ class Resource(msrest.serialization.Model): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -152,6 +169,7 @@ class Resource(msrest.serialization.Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__( @@ -167,6 +185,7 @@ def __init__( self.sku = kwargs.get('sku', None) self.kind = kwargs.get('kind', None) self.etag = kwargs.get('etag', None) + self.zones = None class Bot(Resource): @@ -191,6 +210,8 @@ class Bot(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot resource. :type properties: ~azure.mgmt.botservice.models.BotProperties """ @@ -199,6 +220,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -210,6 +232,7 @@ class Bot(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'BotProperties'}, } @@ -243,6 +266,8 @@ class BotChannel(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot channel resource. :type properties: ~azure.mgmt.botservice.models.Channel """ @@ -251,6 +276,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -262,6 +288,7 @@ class BotChannel(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'Channel'}, } @@ -290,8 +317,21 @@ class BotProperties(msrest.serialization.Model): :type endpoint: str :ivar endpoint_version: The bot's endpoint version. :vartype endpoint_version: str + :param all_settings: Contains resource all settings defined as key/value pairs. + :type all_settings: dict[str, str] + :param parameters: Contains resource parameters defined as key/value pairs. + :type parameters: dict[str, str] + :param manifest_url: The bot's manifest url. + :type manifest_url: str + :param msa_app_type: Microsoft App Type for the bot. Possible values include: + "UserAssignedMSI", "SingleTenant", "MultiTenant". + :type msa_app_type: str or ~azure.mgmt.botservice.models.MsaAppType :param msa_app_id: Required. Microsoft App Id for the bot. :type msa_app_id: str + :param msa_app_tenant_id: Microsoft App Tenant Id for the bot. + :type msa_app_tenant_id: str + :param msa_app_msi_resource_id: Microsoft App Managed Identity Resource Id for the bot. + :type msa_app_msi_resource_id: str :ivar configured_channels: Collection of channels for which the bot is configured. :vartype configured_channels: list[str] :ivar enabled_channels: Collection of channels for which the bot is enabled. @@ -310,10 +350,36 @@ class BotProperties(msrest.serialization.Model): :type is_cmek_enabled: bool :param cmek_key_vault_url: The CMK Url. :type cmek_key_vault_url: str + :param cmek_encryption_status: The CMK encryption status. + :type cmek_encryption_status: str :param is_isolated: Whether the bot is in an isolated network. :type is_isolated: bool + :param is_streaming_supported: Whether the bot is streaming supported. + :type is_streaming_supported: bool + :param is_developer_app_insights_api_key_set: Whether the bot is developerAppInsightsApiKey + set. + :type is_developer_app_insights_api_key_set: bool + :ivar migration_token: Token used to migrate non Azure bot to azure subscription. + :vartype migration_token: str + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool :param schema_transformation_version: The channel schema transformation version for the bot. :type schema_transformation_version: str + :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the + bot. + :vartype private_endpoint_connections: + list[~azure.mgmt.botservice.models.PrivateEndpointConnection] + :param open_with_hint: The hint to browser (e.g. protocol handler) on how to open the bot for + authoring. + :type open_with_hint: str + :param app_password_hint: The hint (e.g. keyVault secret resourceId) on how to fetch the app + secret. + :type app_password_hint: str + :ivar provisioning_state: Provisioning state of the resource. + :vartype provisioning_state: str + :param publishing_credentials: Publishing credentials of the resource. + :type publishing_credentials: str """ _validation = { @@ -323,6 +389,9 @@ class BotProperties(msrest.serialization.Model): 'msa_app_id': {'required': True}, 'configured_channels': {'readonly': True}, 'enabled_channels': {'readonly': True}, + 'migration_token': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -331,7 +400,13 @@ class BotProperties(msrest.serialization.Model): 'icon_url': {'key': 'iconUrl', 'type': 'str'}, 'endpoint': {'key': 'endpoint', 'type': 'str'}, 'endpoint_version': {'key': 'endpointVersion', 'type': 'str'}, + 'all_settings': {'key': 'allSettings', 'type': '{str}'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'manifest_url': {'key': 'manifestUrl', 'type': 'str'}, + 'msa_app_type': {'key': 'msaAppType', 'type': 'str'}, 'msa_app_id': {'key': 'msaAppId', 'type': 'str'}, + 'msa_app_tenant_id': {'key': 'msaAppTenantId', 'type': 'str'}, + 'msa_app_msi_resource_id': {'key': 'msaAppMSIResourceId', 'type': 'str'}, 'configured_channels': {'key': 'configuredChannels', 'type': '[str]'}, 'enabled_channels': {'key': 'enabledChannels', 'type': '[str]'}, 'developer_app_insight_key': {'key': 'developerAppInsightKey', 'type': 'str'}, @@ -341,8 +416,18 @@ class BotProperties(msrest.serialization.Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, 'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'}, 'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'}, + 'cmek_encryption_status': {'key': 'cmekEncryptionStatus', 'type': 'str'}, 'is_isolated': {'key': 'isIsolated', 'type': 'bool'}, + 'is_streaming_supported': {'key': 'isStreamingSupported', 'type': 'bool'}, + 'is_developer_app_insights_api_key_set': {'key': 'isDeveloperAppInsightsApiKeySet', 'type': 'bool'}, + 'migration_token': {'key': 'migrationToken', 'type': 'str'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'open_with_hint': {'key': 'openWithHint', 'type': 'str'}, + 'app_password_hint': {'key': 'appPasswordHint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'publishing_credentials': {'key': 'publishingCredentials', 'type': 'str'}, } def __init__( @@ -355,7 +440,13 @@ def __init__( self.icon_url = kwargs.get('icon_url', None) self.endpoint = kwargs['endpoint'] self.endpoint_version = None + self.all_settings = kwargs.get('all_settings', None) + self.parameters = kwargs.get('parameters', None) + self.manifest_url = kwargs.get('manifest_url', None) + self.msa_app_type = kwargs.get('msa_app_type', None) self.msa_app_id = kwargs['msa_app_id'] + self.msa_app_tenant_id = kwargs.get('msa_app_tenant_id', None) + self.msa_app_msi_resource_id = kwargs.get('msa_app_msi_resource_id', None) self.configured_channels = None self.enabled_channels = None self.developer_app_insight_key = kwargs.get('developer_app_insight_key', None) @@ -365,8 +456,18 @@ def __init__( self.luis_key = kwargs.get('luis_key', None) self.is_cmek_enabled = kwargs.get('is_cmek_enabled', None) self.cmek_key_vault_url = kwargs.get('cmek_key_vault_url', None) + self.cmek_encryption_status = kwargs.get('cmek_encryption_status', None) self.is_isolated = kwargs.get('is_isolated', None) + self.is_streaming_supported = kwargs.get('is_streaming_supported', None) + self.is_developer_app_insights_api_key_set = kwargs.get('is_developer_app_insights_api_key_set', None) + self.migration_token = None + self.disable_local_auth = kwargs.get('disable_local_auth', None) self.schema_transformation_version = kwargs.get('schema_transformation_version', None) + self.private_endpoint_connections = None + self.open_with_hint = kwargs.get('open_with_hint', None) + self.app_password_hint = kwargs.get('app_password_hint', None) + self.provisioning_state = None + self.publishing_credentials = kwargs.get('publishing_credentials', None) class BotResponseList(msrest.serialization.Model): @@ -521,6 +622,8 @@ class ConnectionSetting(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot channel resource. :type properties: ~azure.mgmt.botservice.models.ConnectionSettingProperties """ @@ -529,6 +632,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -540,6 +644,7 @@ class ConnectionSetting(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, } @@ -594,6 +699,8 @@ class ConnectionSettingProperties(msrest.serialization.Model): :type service_provider_display_name: str :param parameters: Service Provider Parameters associated with the Connection Setting. :type parameters: list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -608,6 +715,7 @@ class ConnectionSettingProperties(msrest.serialization.Model): 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -622,6 +730,7 @@ def __init__( self.service_provider_id = kwargs.get('service_provider_id', None) self.service_provider_display_name = kwargs.get('service_provider_display_name', None) self.parameters = kwargs.get('parameters', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class ConnectionSettingResponseList(msrest.serialization.Model): @@ -661,8 +770,14 @@ class DirectLineChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Direct Line channel resource. :type properties: ~azure.mgmt.botservice.models.DirectLineChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -671,7 +786,10 @@ class DirectLineChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( @@ -681,6 +799,8 @@ def __init__( super(DirectLineChannel, self).__init__(**kwargs) self.channel_name = 'DirectLineChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) class DirectLineChannelProperties(msrest.serialization.Model): @@ -688,10 +808,13 @@ class DirectLineChannelProperties(msrest.serialization.Model): :param sites: The list of Direct Line sites. :type sites: list[~azure.mgmt.botservice.models.DirectLineSite] + :param direct_line_embed_code: Direct Line embed code of the resource. + :type direct_line_embed_code: str """ _attribute_map = { 'sites': {'key': 'sites', 'type': '[DirectLineSite]'}, + 'direct_line_embed_code': {'key': 'DirectLineEmbedCode', 'type': 'str'}, } def __init__( @@ -700,6 +823,7 @@ def __init__( ): super(DirectLineChannelProperties, self).__init__(**kwargs) self.sites = kwargs.get('sites', None) + self.direct_line_embed_code = kwargs.get('direct_line_embed_code', None) class DirectLineSite(msrest.serialization.Model): @@ -728,6 +852,8 @@ class DirectLineSite(msrest.serialization.Model): :param is_secure_site_enabled: Whether this site is enabled for authentication with Bot Framework. :type is_secure_site_enabled: bool + :param is_block_user_upload_enabled: Whether this site is enabled for block user upload. + :type is_block_user_upload_enabled: bool :param trusted_origins: List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True. :type trusted_origins: list[str] @@ -752,6 +878,7 @@ class DirectLineSite(msrest.serialization.Model): 'is_v1_enabled': {'key': 'isV1Enabled', 'type': 'bool'}, 'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'}, 'is_secure_site_enabled': {'key': 'isSecureSiteEnabled', 'type': 'bool'}, + 'is_block_user_upload_enabled': {'key': 'isBlockUserUploadEnabled', 'type': 'bool'}, 'trusted_origins': {'key': 'trustedOrigins', 'type': '[str]'}, } @@ -768,6 +895,7 @@ def __init__( self.is_v1_enabled = kwargs['is_v1_enabled'] self.is_v3_enabled = kwargs['is_v3_enabled'] self.is_secure_site_enabled = kwargs.get('is_secure_site_enabled', None) + self.is_block_user_upload_enabled = kwargs.get('is_block_user_upload_enabled', None) self.trusted_origins = kwargs.get('trusted_origins', None) @@ -778,8 +906,12 @@ class DirectLineSpeechChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to DirectLine Speech channel resource. :type properties: ~azure.mgmt.botservice.models.DirectLineSpeechChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -788,7 +920,9 @@ class DirectLineSpeechChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -798,6 +932,7 @@ def __init__( super(DirectLineSpeechChannel, self).__init__(**kwargs) self.channel_name = 'DirectLineSpeechChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class DirectLineSpeechChannelProperties(msrest.serialization.Model): @@ -805,9 +940,12 @@ class DirectLineSpeechChannelProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cognitive_services_subscription_id: Required. The cognitive service subscription ID to + :param cognitive_service_region: Required. The cognitive service region with this channel + registration. + :type cognitive_service_region: str + :param cognitive_service_subscription_key: Required. The cognitive service subscription key to use with this channel registration. - :type cognitive_services_subscription_id: str + :type cognitive_service_subscription_key: str :param is_enabled: Whether this channel is enabled or not. :type is_enabled: bool :param custom_voice_deployment_id: Custom speech model id (optional). @@ -820,11 +958,13 @@ class DirectLineSpeechChannelProperties(msrest.serialization.Model): """ _validation = { - 'cognitive_services_subscription_id': {'required': True}, + 'cognitive_service_region': {'required': True}, + 'cognitive_service_subscription_key': {'required': True}, } _attribute_map = { - 'cognitive_services_subscription_id': {'key': 'cognitiveServicesSubscriptionId', 'type': 'str'}, + 'cognitive_service_region': {'key': 'cognitiveServiceRegion', 'type': 'str'}, + 'cognitive_service_subscription_key': {'key': 'cognitiveServiceSubscriptionKey', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'custom_voice_deployment_id': {'key': 'customVoiceDeploymentId', 'type': 'str'}, 'custom_speech_model_id': {'key': 'customSpeechModelId', 'type': 'str'}, @@ -836,7 +976,8 @@ def __init__( **kwargs ): super(DirectLineSpeechChannelProperties, self).__init__(**kwargs) - self.cognitive_services_subscription_id = kwargs['cognitive_services_subscription_id'] + self.cognitive_service_region = kwargs['cognitive_service_region'] + self.cognitive_service_subscription_key = kwargs['cognitive_service_subscription_key'] self.is_enabled = kwargs.get('is_enabled', None) self.custom_voice_deployment_id = kwargs.get('custom_voice_deployment_id', None) self.custom_speech_model_id = kwargs.get('custom_speech_model_id', None) @@ -850,8 +991,12 @@ class EmailChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to email channel resource. :type properties: ~azure.mgmt.botservice.models.EmailChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -860,7 +1005,9 @@ class EmailChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -870,6 +1017,7 @@ def __init__( super(EmailChannel, self).__init__(**kwargs) self.channel_name = 'EmailChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class EmailChannelProperties(msrest.serialization.Model): @@ -963,8 +1111,14 @@ class FacebookChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to bot facebook channel. :type properties: ~azure.mgmt.botservice.models.FacebookChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -973,7 +1127,10 @@ class FacebookChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( @@ -983,6 +1140,8 @@ def __init__( super(FacebookChannel, self).__init__(**kwargs) self.channel_name = 'FacebookChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) class FacebookChannelProperties(msrest.serialization.Model): @@ -1086,7 +1245,7 @@ class HostSettingsResponse(msrest.serialization.Model): :type to_channel_from_bot_o_auth_scope: str :param validate_authority: Per cloud OAuth setting on whether authority is validated. :type validate_authority: bool - :param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. + :param bot_open_id_metadata: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. :type bot_open_id_metadata: str """ @@ -1123,6 +1282,8 @@ class KikChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Kik channel resource. :type properties: ~azure.mgmt.botservice.models.KikChannelProperties """ @@ -1133,6 +1294,7 @@ class KikChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } @@ -1191,6 +1353,8 @@ class LineChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to line channel resource. :type properties: ~azure.mgmt.botservice.models.LineChannelProperties """ @@ -1201,6 +1365,7 @@ class LineChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'LineChannelProperties'}, } @@ -1290,8 +1455,14 @@ class MsTeamsChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Microsoft Teams channel resource. :type properties: ~azure.mgmt.botservice.models.MsTeamsChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -1300,7 +1471,10 @@ class MsTeamsChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( @@ -1310,6 +1484,8 @@ def __init__( super(MsTeamsChannel, self).__init__(**kwargs) self.channel_name = 'MsTeamsChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) class MsTeamsChannelProperties(msrest.serialization.Model): @@ -1323,6 +1499,12 @@ class MsTeamsChannelProperties(msrest.serialization.Model): :type calling_web_hook: str :param is_enabled: Required. Whether this channel is enabled for the bot. :type is_enabled: bool + :param incoming_call_route: Webhook for Microsoft Teams channel calls. + :type incoming_call_route: str + :param deployment_environment: Deployment environment for Microsoft Teams channel calls. + :type deployment_environment: str + :param accepted_terms: Whether this channel accepted terms. + :type accepted_terms: bool """ _validation = { @@ -1333,6 +1515,9 @@ class MsTeamsChannelProperties(msrest.serialization.Model): 'enable_calling': {'key': 'enableCalling', 'type': 'bool'}, 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'incoming_call_route': {'key': 'incomingCallRoute', 'type': 'str'}, + 'deployment_environment': {'key': 'deploymentEnvironment', 'type': 'str'}, + 'accepted_terms': {'key': 'acceptedTerms', 'type': 'bool'}, } def __init__( @@ -1343,6 +1528,9 @@ def __init__( self.enable_calling = kwargs.get('enable_calling', None) self.calling_web_hook = kwargs.get('calling_web_hook', None) self.is_enabled = kwargs['is_enabled'] + self.incoming_call_route = kwargs.get('incoming_call_route', None) + self.deployment_environment = kwargs.get('deployment_environment', None) + self.accepted_terms = kwargs.get('accepted_terms', None) class OperationDisplayInfo(msrest.serialization.Model): @@ -1430,6 +1618,275 @@ def __init__( self.value = kwargs.get('value', None) +class OperationResultsDescription(msrest.serialization.Model): + """The properties indicating the operation result of an operation on a service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values include: "Canceled", + "Succeeded", "Failed", "Requested", "Running". + :vartype status: str or ~azure.mgmt.botservice.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateLinkResourceBase(msrest.serialization.Model): + """Common fields that are returned in the response for all BotService Private Link Resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceBase, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class PrivateEndpointConnection(PrivateLinkResourceBase): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.botservice.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.botservice.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.botservice.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.botservice.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResource(PrivateLinkResourceBase): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.botservice.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~azure.mgmt.botservice.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + class ServiceProvider(msrest.serialization.Model): """Service Provider Definition. @@ -1466,6 +1923,8 @@ class ServiceProviderParameter(msrest.serialization.Model): :vartype help_url: str :ivar default: Default Name for the Service Provider. :vartype default: str + :ivar metadata: Meta data for the Service Provider. + :vartype metadata: ~azure.mgmt.botservice.models.ServiceProviderParameterMetadata """ _validation = { @@ -1475,6 +1934,7 @@ class ServiceProviderParameter(msrest.serialization.Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1484,6 +1944,7 @@ class ServiceProviderParameter(msrest.serialization.Model): 'description': {'key': 'description', 'type': 'str'}, 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'default': {'key': 'default', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'ServiceProviderParameterMetadata'}, } def __init__( @@ -1497,6 +1958,45 @@ def __init__( self.description = None self.help_url = None self.default = None + self.metadata = None + + +class ServiceProviderParameterMetadata(msrest.serialization.Model): + """Meta data for the Service Provider. + + :param constraints: the constraints of the bot meta data. + :type constraints: ~azure.mgmt.botservice.models.ServiceProviderParameterMetadataConstraints + """ + + _attribute_map = { + 'constraints': {'key': 'constraints', 'type': 'ServiceProviderParameterMetadataConstraints'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceProviderParameterMetadata, self).__init__(**kwargs) + self.constraints = kwargs.get('constraints', None) + + +class ServiceProviderParameterMetadataConstraints(msrest.serialization.Model): + """the constraints of the bot meta data. + + :param required: Whether required the constraints of the bot meta data. + :type required: bool + """ + + _attribute_map = { + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceProviderParameterMetadataConstraints, self).__init__(**kwargs) + self.required = kwargs.get('required', None) class ServiceProviderProperties(msrest.serialization.Model): @@ -1648,6 +2148,8 @@ class SkypeChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Skype channel resource. :type properties: ~azure.mgmt.botservice.models.SkypeChannelProperties """ @@ -1658,6 +2160,7 @@ class SkypeChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } @@ -1691,6 +2194,8 @@ class SkypeChannelProperties(msrest.serialization.Model): :type groups_mode: str :param calling_web_hook: Calling web hook for Skype channel. :type calling_web_hook: str + :param incoming_call_route: Incoming call route for Skype channel. + :type incoming_call_route: str :param is_enabled: Required. Whether this channel is enabled for the bot. :type is_enabled: bool """ @@ -1708,6 +2213,7 @@ class SkypeChannelProperties(msrest.serialization.Model): 'enable_groups': {'key': 'enableGroups', 'type': 'bool'}, 'groups_mode': {'key': 'groupsMode', 'type': 'str'}, 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, + 'incoming_call_route': {'key': 'incomingCallRoute', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } @@ -1724,6 +2230,7 @@ def __init__( self.enable_groups = kwargs.get('enable_groups', None) self.groups_mode = kwargs.get('groups_mode', None) self.calling_web_hook = kwargs.get('calling_web_hook', None) + self.incoming_call_route = kwargs.get('incoming_call_route', None) self.is_enabled = kwargs['is_enabled'] @@ -1734,8 +2241,12 @@ class SlackChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Slack channel resource. :type properties: ~azure.mgmt.botservice.models.SlackChannelProperties + :param location: Location of the resource. + :type location: str """ _validation = { @@ -1744,7 +2255,9 @@ class SlackChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( @@ -1754,6 +2267,7 @@ def __init__( super(SlackChannel, self).__init__(**kwargs) self.channel_name = 'SlackChannel' # type: str self.properties = kwargs.get('properties', None) + self.location = kwargs.get('location', None) class SlackChannelProperties(msrest.serialization.Model): @@ -1771,6 +2285,8 @@ class SlackChannelProperties(msrest.serialization.Model): :param verification_token: The Slack verification token. Value only returned through POST to the action Channel List API, otherwise empty. :type verification_token: str + :param scopes: The Slack permission scopes. + :type scopes: str :param landing_page_url: The Slack landing page Url. :type landing_page_url: str :ivar redirect_action: The Slack redirect action. @@ -1800,11 +2316,12 @@ class SlackChannelProperties(msrest.serialization.Model): 'client_id': {'key': 'clientId', 'type': 'str'}, 'client_secret': {'key': 'clientSecret', 'type': 'str'}, 'verification_token': {'key': 'verificationToken', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, 'landing_page_url': {'key': 'landingPageUrl', 'type': 'str'}, 'redirect_action': {'key': 'redirectAction', 'type': 'str'}, 'last_submission_id': {'key': 'lastSubmissionId', 'type': 'str'}, 'register_before_o_auth_flow': {'key': 'registerBeforeOAuthFlow', 'type': 'bool'}, - 'is_validated': {'key': 'isValidated', 'type': 'bool'}, + 'is_validated': {'key': 'IsValidated', 'type': 'bool'}, 'signing_secret': {'key': 'signingSecret', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } @@ -1817,6 +2334,7 @@ def __init__( self.client_id = kwargs.get('client_id', None) self.client_secret = kwargs.get('client_secret', None) self.verification_token = kwargs.get('verification_token', None) + self.scopes = kwargs.get('scopes', None) self.landing_page_url = kwargs.get('landing_page_url', None) self.redirect_action = None self.last_submission_id = None @@ -1833,6 +2351,8 @@ class SmsChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Sms channel resource. :type properties: ~azure.mgmt.botservice.models.SmsChannelProperties """ @@ -1843,6 +2363,7 @@ class SmsChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } @@ -1907,8 +2428,12 @@ class TelegramChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Telegram channel resource. :type properties: ~azure.mgmt.botservice.models.TelegramChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -1917,7 +2442,9 @@ class TelegramChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -1927,6 +2454,7 @@ def __init__( super(TelegramChannel, self).__init__(**kwargs) self.channel_name = 'TelegramChannel' # type: str self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class TelegramChannelProperties(msrest.serialization.Model): @@ -1970,8 +2498,14 @@ class WebChatChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Web Chat channel resource. :type properties: ~azure.mgmt.botservice.models.WebChatChannelProperties + :param location: Location of the resource. + :type location: str + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -1980,7 +2514,10 @@ class WebChatChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -1990,6 +2527,8 @@ def __init__( super(WebChatChannel, self).__init__(**kwargs) self.channel_name = 'WebChatChannel' # type: str self.properties = kwargs.get('properties', None) + self.location = kwargs.get('location', None) + self.provisioning_state = kwargs.get('provisioning_state', None) class WebChatChannelProperties(msrest.serialization.Model): @@ -2040,8 +2579,9 @@ class WebChatSite(msrest.serialization.Model): :vartype key2: str :param is_enabled: Required. Whether this site is enabled for DirectLine channel. :type is_enabled: bool - :param enable_preview: Required. Whether this site is enabled for preview versions of Webchat. - :type enable_preview: bool + :param is_webchat_preview_enabled: Required. Whether this site is enabled for preview versions + of Webchat. + :type is_webchat_preview_enabled: bool """ _validation = { @@ -2050,7 +2590,7 @@ class WebChatSite(msrest.serialization.Model): 'key': {'readonly': True}, 'key2': {'readonly': True}, 'is_enabled': {'required': True}, - 'enable_preview': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, } _attribute_map = { @@ -2059,7 +2599,7 @@ class WebChatSite(msrest.serialization.Model): 'key': {'key': 'key', 'type': 'str'}, 'key2': {'key': 'key2', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'enable_preview': {'key': 'enablePreview', 'type': 'bool'}, + 'is_webchat_preview_enabled': {'key': 'isWebchatPreviewEnabled', 'type': 'bool'}, } def __init__( @@ -2072,4 +2612,4 @@ def __init__( self.key = None self.key2 = None self.is_enabled = kwargs['is_enabled'] - self.enable_preview = kwargs['enable_preview'] + self.is_webchat_preview_enabled = kwargs['is_webchat_preview_enabled'] diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py index cad036e43070..6671ff631fd7 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py @@ -24,6 +24,8 @@ class Channel(msrest.serialization.Model): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str """ _validation = { @@ -32,6 +34,7 @@ class Channel(msrest.serialization.Model): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } _subtype_map = { @@ -40,41 +43,55 @@ class Channel(msrest.serialization.Model): def __init__( self, + *, + etag: Optional[str] = None, **kwargs ): super(Channel, self).__init__(**kwargs) self.channel_name = None # type: Optional[str] + self.etag = etag class AlexaChannel(Channel): """Alexa channel definition. + Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Alexa channel resource. :type properties: ~azure.mgmt.botservice.models.AlexaChannelProperties + :ivar provisioning_state: Provisioning state of the resource. + :vartype provisioning_state: str """ _validation = { 'channel_name': {'required': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["AlexaChannelProperties"] = None, **kwargs ): - super(AlexaChannel, self).__init__(**kwargs) + super(AlexaChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'AlexaChannel' # type: str self.properties = properties + self.provisioning_state = None class AlexaChannelProperties(msrest.serialization.Model): @@ -144,12 +161,15 @@ class Resource(msrest.serialization.Model): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -161,6 +181,7 @@ class Resource(msrest.serialization.Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__( @@ -182,6 +203,7 @@ def __init__( self.sku = sku self.kind = kind self.etag = etag + self.zones = None class Bot(Resource): @@ -206,6 +228,8 @@ class Bot(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot resource. :type properties: ~azure.mgmt.botservice.models.BotProperties """ @@ -214,6 +238,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -225,6 +250,7 @@ class Bot(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'BotProperties'}, } @@ -265,6 +291,8 @@ class BotChannel(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot channel resource. :type properties: ~azure.mgmt.botservice.models.Channel """ @@ -273,6 +301,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -284,6 +313,7 @@ class BotChannel(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'Channel'}, } @@ -319,8 +349,21 @@ class BotProperties(msrest.serialization.Model): :type endpoint: str :ivar endpoint_version: The bot's endpoint version. :vartype endpoint_version: str + :param all_settings: Contains resource all settings defined as key/value pairs. + :type all_settings: dict[str, str] + :param parameters: Contains resource parameters defined as key/value pairs. + :type parameters: dict[str, str] + :param manifest_url: The bot's manifest url. + :type manifest_url: str + :param msa_app_type: Microsoft App Type for the bot. Possible values include: + "UserAssignedMSI", "SingleTenant", "MultiTenant". + :type msa_app_type: str or ~azure.mgmt.botservice.models.MsaAppType :param msa_app_id: Required. Microsoft App Id for the bot. :type msa_app_id: str + :param msa_app_tenant_id: Microsoft App Tenant Id for the bot. + :type msa_app_tenant_id: str + :param msa_app_msi_resource_id: Microsoft App Managed Identity Resource Id for the bot. + :type msa_app_msi_resource_id: str :ivar configured_channels: Collection of channels for which the bot is configured. :vartype configured_channels: list[str] :ivar enabled_channels: Collection of channels for which the bot is enabled. @@ -339,10 +382,36 @@ class BotProperties(msrest.serialization.Model): :type is_cmek_enabled: bool :param cmek_key_vault_url: The CMK Url. :type cmek_key_vault_url: str + :param cmek_encryption_status: The CMK encryption status. + :type cmek_encryption_status: str :param is_isolated: Whether the bot is in an isolated network. :type is_isolated: bool + :param is_streaming_supported: Whether the bot is streaming supported. + :type is_streaming_supported: bool + :param is_developer_app_insights_api_key_set: Whether the bot is developerAppInsightsApiKey + set. + :type is_developer_app_insights_api_key_set: bool + :ivar migration_token: Token used to migrate non Azure bot to azure subscription. + :vartype migration_token: str + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool :param schema_transformation_version: The channel schema transformation version for the bot. :type schema_transformation_version: str + :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the + bot. + :vartype private_endpoint_connections: + list[~azure.mgmt.botservice.models.PrivateEndpointConnection] + :param open_with_hint: The hint to browser (e.g. protocol handler) on how to open the bot for + authoring. + :type open_with_hint: str + :param app_password_hint: The hint (e.g. keyVault secret resourceId) on how to fetch the app + secret. + :type app_password_hint: str + :ivar provisioning_state: Provisioning state of the resource. + :vartype provisioning_state: str + :param publishing_credentials: Publishing credentials of the resource. + :type publishing_credentials: str """ _validation = { @@ -352,6 +421,9 @@ class BotProperties(msrest.serialization.Model): 'msa_app_id': {'required': True}, 'configured_channels': {'readonly': True}, 'enabled_channels': {'readonly': True}, + 'migration_token': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { @@ -360,7 +432,13 @@ class BotProperties(msrest.serialization.Model): 'icon_url': {'key': 'iconUrl', 'type': 'str'}, 'endpoint': {'key': 'endpoint', 'type': 'str'}, 'endpoint_version': {'key': 'endpointVersion', 'type': 'str'}, + 'all_settings': {'key': 'allSettings', 'type': '{str}'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'manifest_url': {'key': 'manifestUrl', 'type': 'str'}, + 'msa_app_type': {'key': 'msaAppType', 'type': 'str'}, 'msa_app_id': {'key': 'msaAppId', 'type': 'str'}, + 'msa_app_tenant_id': {'key': 'msaAppTenantId', 'type': 'str'}, + 'msa_app_msi_resource_id': {'key': 'msaAppMSIResourceId', 'type': 'str'}, 'configured_channels': {'key': 'configuredChannels', 'type': '[str]'}, 'enabled_channels': {'key': 'enabledChannels', 'type': '[str]'}, 'developer_app_insight_key': {'key': 'developerAppInsightKey', 'type': 'str'}, @@ -370,8 +448,18 @@ class BotProperties(msrest.serialization.Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, 'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'}, 'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'}, + 'cmek_encryption_status': {'key': 'cmekEncryptionStatus', 'type': 'str'}, 'is_isolated': {'key': 'isIsolated', 'type': 'bool'}, + 'is_streaming_supported': {'key': 'isStreamingSupported', 'type': 'bool'}, + 'is_developer_app_insights_api_key_set': {'key': 'isDeveloperAppInsightsApiKeySet', 'type': 'bool'}, + 'migration_token': {'key': 'migrationToken', 'type': 'str'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, 'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'open_with_hint': {'key': 'openWithHint', 'type': 'str'}, + 'app_password_hint': {'key': 'appPasswordHint', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'publishing_credentials': {'key': 'publishingCredentials', 'type': 'str'}, } def __init__( @@ -382,6 +470,12 @@ def __init__( msa_app_id: str, description: Optional[str] = None, icon_url: Optional[str] = None, + all_settings: Optional[Dict[str, str]] = None, + parameters: Optional[Dict[str, str]] = None, + manifest_url: Optional[str] = None, + msa_app_type: Optional[Union[str, "MsaAppType"]] = None, + msa_app_tenant_id: Optional[str] = None, + msa_app_msi_resource_id: Optional[str] = None, developer_app_insight_key: Optional[str] = None, developer_app_insights_api_key: Optional[str] = None, developer_app_insights_application_id: Optional[str] = None, @@ -389,8 +483,15 @@ def __init__( luis_key: Optional[str] = None, is_cmek_enabled: Optional[bool] = None, cmek_key_vault_url: Optional[str] = None, + cmek_encryption_status: Optional[str] = None, is_isolated: Optional[bool] = None, + is_streaming_supported: Optional[bool] = None, + is_developer_app_insights_api_key_set: Optional[bool] = None, + disable_local_auth: Optional[bool] = None, schema_transformation_version: Optional[str] = None, + open_with_hint: Optional[str] = None, + app_password_hint: Optional[str] = None, + publishing_credentials: Optional[str] = None, **kwargs ): super(BotProperties, self).__init__(**kwargs) @@ -399,7 +500,13 @@ def __init__( self.icon_url = icon_url self.endpoint = endpoint self.endpoint_version = None + self.all_settings = all_settings + self.parameters = parameters + self.manifest_url = manifest_url + self.msa_app_type = msa_app_type self.msa_app_id = msa_app_id + self.msa_app_tenant_id = msa_app_tenant_id + self.msa_app_msi_resource_id = msa_app_msi_resource_id self.configured_channels = None self.enabled_channels = None self.developer_app_insight_key = developer_app_insight_key @@ -409,8 +516,18 @@ def __init__( self.luis_key = luis_key self.is_cmek_enabled = is_cmek_enabled self.cmek_key_vault_url = cmek_key_vault_url + self.cmek_encryption_status = cmek_encryption_status self.is_isolated = is_isolated + self.is_streaming_supported = is_streaming_supported + self.is_developer_app_insights_api_key_set = is_developer_app_insights_api_key_set + self.migration_token = None + self.disable_local_auth = disable_local_auth self.schema_transformation_version = schema_transformation_version + self.private_endpoint_connections = None + self.open_with_hint = open_with_hint + self.app_password_hint = app_password_hint + self.provisioning_state = None + self.publishing_credentials = publishing_credentials class BotResponseList(msrest.serialization.Model): @@ -575,6 +692,8 @@ class ConnectionSetting(Resource): :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag. :type etag: str + :ivar zones: Entity zones. + :vartype zones: list[str] :param properties: The set of properties specific to bot channel resource. :type properties: ~azure.mgmt.botservice.models.ConnectionSettingProperties """ @@ -583,6 +702,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -594,6 +714,7 @@ class ConnectionSetting(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, } @@ -658,6 +779,8 @@ class ConnectionSettingProperties(msrest.serialization.Model): :type service_provider_display_name: str :param parameters: Service Provider Parameters associated with the Connection Setting. :type parameters: list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -672,6 +795,7 @@ class ConnectionSettingProperties(msrest.serialization.Model): 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( @@ -683,6 +807,7 @@ def __init__( service_provider_id: Optional[str] = None, service_provider_display_name: Optional[str] = None, parameters: Optional[List["ConnectionSettingParameter"]] = None, + provisioning_state: Optional[str] = None, **kwargs ): super(ConnectionSettingProperties, self).__init__(**kwargs) @@ -693,6 +818,7 @@ def __init__( self.service_provider_id = service_provider_id self.service_provider_display_name = service_provider_display_name self.parameters = parameters + self.provisioning_state = provisioning_state class ConnectionSettingResponseList(msrest.serialization.Model): @@ -734,8 +860,14 @@ class DirectLineChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Direct Line channel resource. :type properties: ~azure.mgmt.botservice.models.DirectLineChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -744,18 +876,26 @@ class DirectLineChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["DirectLineChannelProperties"] = None, + provisioning_state: Optional[str] = None, + location: Optional[str] = None, **kwargs ): - super(DirectLineChannel, self).__init__(**kwargs) + super(DirectLineChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'DirectLineChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state + self.location = location class DirectLineChannelProperties(msrest.serialization.Model): @@ -763,20 +903,25 @@ class DirectLineChannelProperties(msrest.serialization.Model): :param sites: The list of Direct Line sites. :type sites: list[~azure.mgmt.botservice.models.DirectLineSite] + :param direct_line_embed_code: Direct Line embed code of the resource. + :type direct_line_embed_code: str """ _attribute_map = { 'sites': {'key': 'sites', 'type': '[DirectLineSite]'}, + 'direct_line_embed_code': {'key': 'DirectLineEmbedCode', 'type': 'str'}, } def __init__( self, *, sites: Optional[List["DirectLineSite"]] = None, + direct_line_embed_code: Optional[str] = None, **kwargs ): super(DirectLineChannelProperties, self).__init__(**kwargs) self.sites = sites + self.direct_line_embed_code = direct_line_embed_code class DirectLineSite(msrest.serialization.Model): @@ -805,6 +950,8 @@ class DirectLineSite(msrest.serialization.Model): :param is_secure_site_enabled: Whether this site is enabled for authentication with Bot Framework. :type is_secure_site_enabled: bool + :param is_block_user_upload_enabled: Whether this site is enabled for block user upload. + :type is_block_user_upload_enabled: bool :param trusted_origins: List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True. :type trusted_origins: list[str] @@ -829,6 +976,7 @@ class DirectLineSite(msrest.serialization.Model): 'is_v1_enabled': {'key': 'isV1Enabled', 'type': 'bool'}, 'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'}, 'is_secure_site_enabled': {'key': 'isSecureSiteEnabled', 'type': 'bool'}, + 'is_block_user_upload_enabled': {'key': 'isBlockUserUploadEnabled', 'type': 'bool'}, 'trusted_origins': {'key': 'trustedOrigins', 'type': '[str]'}, } @@ -840,6 +988,7 @@ def __init__( is_v1_enabled: bool, is_v3_enabled: bool, is_secure_site_enabled: Optional[bool] = None, + is_block_user_upload_enabled: Optional[bool] = None, trusted_origins: Optional[List[str]] = None, **kwargs ): @@ -852,6 +1001,7 @@ def __init__( self.is_v1_enabled = is_v1_enabled self.is_v3_enabled = is_v3_enabled self.is_secure_site_enabled = is_secure_site_enabled + self.is_block_user_upload_enabled = is_block_user_upload_enabled self.trusted_origins = trusted_origins @@ -862,8 +1012,12 @@ class DirectLineSpeechChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to DirectLine Speech channel resource. :type properties: ~azure.mgmt.botservice.models.DirectLineSpeechChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -872,18 +1026,23 @@ class DirectLineSpeechChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["DirectLineSpeechChannelProperties"] = None, + provisioning_state: Optional[str] = None, **kwargs ): - super(DirectLineSpeechChannel, self).__init__(**kwargs) + super(DirectLineSpeechChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'DirectLineSpeechChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state class DirectLineSpeechChannelProperties(msrest.serialization.Model): @@ -891,9 +1050,12 @@ class DirectLineSpeechChannelProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cognitive_services_subscription_id: Required. The cognitive service subscription ID to + :param cognitive_service_region: Required. The cognitive service region with this channel + registration. + :type cognitive_service_region: str + :param cognitive_service_subscription_key: Required. The cognitive service subscription key to use with this channel registration. - :type cognitive_services_subscription_id: str + :type cognitive_service_subscription_key: str :param is_enabled: Whether this channel is enabled or not. :type is_enabled: bool :param custom_voice_deployment_id: Custom speech model id (optional). @@ -906,11 +1068,13 @@ class DirectLineSpeechChannelProperties(msrest.serialization.Model): """ _validation = { - 'cognitive_services_subscription_id': {'required': True}, + 'cognitive_service_region': {'required': True}, + 'cognitive_service_subscription_key': {'required': True}, } _attribute_map = { - 'cognitive_services_subscription_id': {'key': 'cognitiveServicesSubscriptionId', 'type': 'str'}, + 'cognitive_service_region': {'key': 'cognitiveServiceRegion', 'type': 'str'}, + 'cognitive_service_subscription_key': {'key': 'cognitiveServiceSubscriptionKey', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'custom_voice_deployment_id': {'key': 'customVoiceDeploymentId', 'type': 'str'}, 'custom_speech_model_id': {'key': 'customSpeechModelId', 'type': 'str'}, @@ -920,7 +1084,8 @@ class DirectLineSpeechChannelProperties(msrest.serialization.Model): def __init__( self, *, - cognitive_services_subscription_id: str, + cognitive_service_region: str, + cognitive_service_subscription_key: str, is_enabled: Optional[bool] = None, custom_voice_deployment_id: Optional[str] = None, custom_speech_model_id: Optional[str] = None, @@ -928,7 +1093,8 @@ def __init__( **kwargs ): super(DirectLineSpeechChannelProperties, self).__init__(**kwargs) - self.cognitive_services_subscription_id = cognitive_services_subscription_id + self.cognitive_service_region = cognitive_service_region + self.cognitive_service_subscription_key = cognitive_service_subscription_key self.is_enabled = is_enabled self.custom_voice_deployment_id = custom_voice_deployment_id self.custom_speech_model_id = custom_speech_model_id @@ -942,8 +1108,12 @@ class EmailChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to email channel resource. :type properties: ~azure.mgmt.botservice.models.EmailChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -952,18 +1122,23 @@ class EmailChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["EmailChannelProperties"] = None, + provisioning_state: Optional[str] = None, **kwargs ): - super(EmailChannel, self).__init__(**kwargs) + super(EmailChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'EmailChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state class EmailChannelProperties(msrest.serialization.Model): @@ -1066,8 +1241,14 @@ class FacebookChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to bot facebook channel. :type properties: ~azure.mgmt.botservice.models.FacebookChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -1076,18 +1257,26 @@ class FacebookChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["FacebookChannelProperties"] = None, + provisioning_state: Optional[str] = None, + location: Optional[str] = None, **kwargs ): - super(FacebookChannel, self).__init__(**kwargs) + super(FacebookChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'FacebookChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state + self.location = location class FacebookChannelProperties(msrest.serialization.Model): @@ -1199,7 +1388,7 @@ class HostSettingsResponse(msrest.serialization.Model): :type to_channel_from_bot_o_auth_scope: str :param validate_authority: Per cloud OAuth setting on whether authority is validated. :type validate_authority: bool - :param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. + :param bot_open_id_metadata: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. :type bot_open_id_metadata: str """ @@ -1245,6 +1434,8 @@ class KikChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Kik channel resource. :type properties: ~azure.mgmt.botservice.models.KikChannelProperties """ @@ -1255,16 +1446,18 @@ class KikChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["KikChannelProperties"] = None, **kwargs ): - super(KikChannel, self).__init__(**kwargs) + super(KikChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'KikChannel' # type: str self.properties = properties @@ -1320,6 +1513,8 @@ class LineChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to line channel resource. :type properties: ~azure.mgmt.botservice.models.LineChannelProperties """ @@ -1330,16 +1525,18 @@ class LineChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'LineChannelProperties'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["LineChannelProperties"] = None, **kwargs ): - super(LineChannel, self).__init__(**kwargs) + super(LineChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'LineChannel' # type: str self.properties = properties @@ -1426,8 +1623,14 @@ class MsTeamsChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Microsoft Teams channel resource. :type properties: ~azure.mgmt.botservice.models.MsTeamsChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str + :param location: Location of the resource. + :type location: str """ _validation = { @@ -1436,18 +1639,26 @@ class MsTeamsChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["MsTeamsChannelProperties"] = None, + provisioning_state: Optional[str] = None, + location: Optional[str] = None, **kwargs ): - super(MsTeamsChannel, self).__init__(**kwargs) + super(MsTeamsChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'MsTeamsChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state + self.location = location class MsTeamsChannelProperties(msrest.serialization.Model): @@ -1461,6 +1672,12 @@ class MsTeamsChannelProperties(msrest.serialization.Model): :type calling_web_hook: str :param is_enabled: Required. Whether this channel is enabled for the bot. :type is_enabled: bool + :param incoming_call_route: Webhook for Microsoft Teams channel calls. + :type incoming_call_route: str + :param deployment_environment: Deployment environment for Microsoft Teams channel calls. + :type deployment_environment: str + :param accepted_terms: Whether this channel accepted terms. + :type accepted_terms: bool """ _validation = { @@ -1471,6 +1688,9 @@ class MsTeamsChannelProperties(msrest.serialization.Model): 'enable_calling': {'key': 'enableCalling', 'type': 'bool'}, 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'incoming_call_route': {'key': 'incomingCallRoute', 'type': 'str'}, + 'deployment_environment': {'key': 'deploymentEnvironment', 'type': 'str'}, + 'accepted_terms': {'key': 'acceptedTerms', 'type': 'bool'}, } def __init__( @@ -1479,12 +1699,18 @@ def __init__( is_enabled: bool, enable_calling: Optional[bool] = None, calling_web_hook: Optional[str] = None, + incoming_call_route: Optional[str] = None, + deployment_environment: Optional[str] = None, + accepted_terms: Optional[bool] = None, **kwargs ): super(MsTeamsChannelProperties, self).__init__(**kwargs) self.enable_calling = enable_calling self.calling_web_hook = calling_web_hook self.is_enabled = is_enabled + self.incoming_call_route = incoming_call_route + self.deployment_environment = deployment_environment + self.accepted_terms = accepted_terms class OperationDisplayInfo(msrest.serialization.Model): @@ -1585,6 +1811,288 @@ def __init__( self.value = value +class OperationResultsDescription(msrest.serialization.Model): + """The properties indicating the operation result of an operation on a service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the operation returned. + :vartype id: str + :ivar name: The name of the operation result. + :vartype name: str + :ivar status: The status of the operation being performed. Possible values include: "Canceled", + "Succeeded", "Failed", "Requested", "Running". + :vartype status: str or ~azure.mgmt.botservice.models.OperationResultStatus + :ivar start_time: The time that the operation was started. + :vartype start_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'start_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateLinkResourceBase(msrest.serialization.Model): + """Common fields that are returned in the response for all BotService Private Link Resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceBase, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class PrivateEndpointConnection(PrivateLinkResourceBase): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~azure.mgmt.botservice.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.botservice.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.botservice.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.botservice.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(PrivateLinkResourceBase): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.botservice.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~azure.mgmt.botservice.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + class ServiceProvider(msrest.serialization.Model): """Service Provider Definition. @@ -1623,6 +2131,8 @@ class ServiceProviderParameter(msrest.serialization.Model): :vartype help_url: str :ivar default: Default Name for the Service Provider. :vartype default: str + :ivar metadata: Meta data for the Service Provider. + :vartype metadata: ~azure.mgmt.botservice.models.ServiceProviderParameterMetadata """ _validation = { @@ -1632,6 +2142,7 @@ class ServiceProviderParameter(msrest.serialization.Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1641,6 +2152,7 @@ class ServiceProviderParameter(msrest.serialization.Model): 'description': {'key': 'description', 'type': 'str'}, 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'default': {'key': 'default', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'ServiceProviderParameterMetadata'}, } def __init__( @@ -1654,6 +2166,49 @@ def __init__( self.description = None self.help_url = None self.default = None + self.metadata = None + + +class ServiceProviderParameterMetadata(msrest.serialization.Model): + """Meta data for the Service Provider. + + :param constraints: the constraints of the bot meta data. + :type constraints: ~azure.mgmt.botservice.models.ServiceProviderParameterMetadataConstraints + """ + + _attribute_map = { + 'constraints': {'key': 'constraints', 'type': 'ServiceProviderParameterMetadataConstraints'}, + } + + def __init__( + self, + *, + constraints: Optional["ServiceProviderParameterMetadataConstraints"] = None, + **kwargs + ): + super(ServiceProviderParameterMetadata, self).__init__(**kwargs) + self.constraints = constraints + + +class ServiceProviderParameterMetadataConstraints(msrest.serialization.Model): + """the constraints of the bot meta data. + + :param required: Whether required the constraints of the bot meta data. + :type required: bool + """ + + _attribute_map = { + 'required': {'key': 'required', 'type': 'bool'}, + } + + def __init__( + self, + *, + required: Optional[bool] = None, + **kwargs + ): + super(ServiceProviderParameterMetadataConstraints, self).__init__(**kwargs) + self.required = required class ServiceProviderProperties(msrest.serialization.Model): @@ -1814,6 +2369,8 @@ class SkypeChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Skype channel resource. :type properties: ~azure.mgmt.botservice.models.SkypeChannelProperties """ @@ -1824,16 +2381,18 @@ class SkypeChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["SkypeChannelProperties"] = None, **kwargs ): - super(SkypeChannel, self).__init__(**kwargs) + super(SkypeChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'SkypeChannel' # type: str self.properties = properties @@ -1859,6 +2418,8 @@ class SkypeChannelProperties(msrest.serialization.Model): :type groups_mode: str :param calling_web_hook: Calling web hook for Skype channel. :type calling_web_hook: str + :param incoming_call_route: Incoming call route for Skype channel. + :type incoming_call_route: str :param is_enabled: Required. Whether this channel is enabled for the bot. :type is_enabled: bool """ @@ -1876,6 +2437,7 @@ class SkypeChannelProperties(msrest.serialization.Model): 'enable_groups': {'key': 'enableGroups', 'type': 'bool'}, 'groups_mode': {'key': 'groupsMode', 'type': 'str'}, 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, + 'incoming_call_route': {'key': 'incomingCallRoute', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } @@ -1891,6 +2453,7 @@ def __init__( enable_groups: Optional[bool] = None, groups_mode: Optional[str] = None, calling_web_hook: Optional[str] = None, + incoming_call_route: Optional[str] = None, **kwargs ): super(SkypeChannelProperties, self).__init__(**kwargs) @@ -1902,6 +2465,7 @@ def __init__( self.enable_groups = enable_groups self.groups_mode = groups_mode self.calling_web_hook = calling_web_hook + self.incoming_call_route = incoming_call_route self.is_enabled = is_enabled @@ -1912,8 +2476,12 @@ class SlackChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Slack channel resource. :type properties: ~azure.mgmt.botservice.models.SlackChannelProperties + :param location: Location of the resource. + :type location: str """ _validation = { @@ -1922,18 +2490,23 @@ class SlackChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["SlackChannelProperties"] = None, + location: Optional[str] = None, **kwargs ): - super(SlackChannel, self).__init__(**kwargs) + super(SlackChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'SlackChannel' # type: str self.properties = properties + self.location = location class SlackChannelProperties(msrest.serialization.Model): @@ -1951,6 +2524,8 @@ class SlackChannelProperties(msrest.serialization.Model): :param verification_token: The Slack verification token. Value only returned through POST to the action Channel List API, otherwise empty. :type verification_token: str + :param scopes: The Slack permission scopes. + :type scopes: str :param landing_page_url: The Slack landing page Url. :type landing_page_url: str :ivar redirect_action: The Slack redirect action. @@ -1980,11 +2555,12 @@ class SlackChannelProperties(msrest.serialization.Model): 'client_id': {'key': 'clientId', 'type': 'str'}, 'client_secret': {'key': 'clientSecret', 'type': 'str'}, 'verification_token': {'key': 'verificationToken', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, 'landing_page_url': {'key': 'landingPageUrl', 'type': 'str'}, 'redirect_action': {'key': 'redirectAction', 'type': 'str'}, 'last_submission_id': {'key': 'lastSubmissionId', 'type': 'str'}, 'register_before_o_auth_flow': {'key': 'registerBeforeOAuthFlow', 'type': 'bool'}, - 'is_validated': {'key': 'isValidated', 'type': 'bool'}, + 'is_validated': {'key': 'IsValidated', 'type': 'bool'}, 'signing_secret': {'key': 'signingSecret', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } @@ -1996,6 +2572,7 @@ def __init__( client_id: Optional[str] = None, client_secret: Optional[str] = None, verification_token: Optional[str] = None, + scopes: Optional[str] = None, landing_page_url: Optional[str] = None, signing_secret: Optional[str] = None, **kwargs @@ -2004,6 +2581,7 @@ def __init__( self.client_id = client_id self.client_secret = client_secret self.verification_token = verification_token + self.scopes = scopes self.landing_page_url = landing_page_url self.redirect_action = None self.last_submission_id = None @@ -2020,6 +2598,8 @@ class SmsChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Sms channel resource. :type properties: ~azure.mgmt.botservice.models.SmsChannelProperties """ @@ -2030,16 +2610,18 @@ class SmsChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["SmsChannelProperties"] = None, **kwargs ): - super(SmsChannel, self).__init__(**kwargs) + super(SmsChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'SmsChannel' # type: str self.properties = properties @@ -2102,8 +2684,12 @@ class TelegramChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Telegram channel resource. :type properties: ~azure.mgmt.botservice.models.TelegramChannelProperties + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -2112,18 +2698,23 @@ class TelegramChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["TelegramChannelProperties"] = None, + provisioning_state: Optional[str] = None, **kwargs ): - super(TelegramChannel, self).__init__(**kwargs) + super(TelegramChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'TelegramChannel' # type: str self.properties = properties + self.provisioning_state = provisioning_state class TelegramChannelProperties(msrest.serialization.Model): @@ -2171,8 +2762,14 @@ class WebChatChannel(Channel): :param channel_name: Required. The channel name.Constant filled by server. :type channel_name: str + :param etag: Entity Tag of the resource. + :type etag: str :param properties: The set of properties specific to Web Chat channel resource. :type properties: ~azure.mgmt.botservice.models.WebChatChannelProperties + :param location: Location of the resource. + :type location: str + :param provisioning_state: Provisioning state of the resource. + :type provisioning_state: str """ _validation = { @@ -2181,18 +2778,26 @@ class WebChatChannel(Channel): _attribute_map = { 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__( self, *, + etag: Optional[str] = None, properties: Optional["WebChatChannelProperties"] = None, + location: Optional[str] = None, + provisioning_state: Optional[str] = None, **kwargs ): - super(WebChatChannel, self).__init__(**kwargs) + super(WebChatChannel, self).__init__(etag=etag, **kwargs) self.channel_name = 'WebChatChannel' # type: str self.properties = properties + self.location = location + self.provisioning_state = provisioning_state class WebChatChannelProperties(msrest.serialization.Model): @@ -2245,8 +2850,9 @@ class WebChatSite(msrest.serialization.Model): :vartype key2: str :param is_enabled: Required. Whether this site is enabled for DirectLine channel. :type is_enabled: bool - :param enable_preview: Required. Whether this site is enabled for preview versions of Webchat. - :type enable_preview: bool + :param is_webchat_preview_enabled: Required. Whether this site is enabled for preview versions + of Webchat. + :type is_webchat_preview_enabled: bool """ _validation = { @@ -2255,7 +2861,7 @@ class WebChatSite(msrest.serialization.Model): 'key': {'readonly': True}, 'key2': {'readonly': True}, 'is_enabled': {'required': True}, - 'enable_preview': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, } _attribute_map = { @@ -2264,7 +2870,7 @@ class WebChatSite(msrest.serialization.Model): 'key': {'key': 'key', 'type': 'str'}, 'key2': {'key': 'key2', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, - 'enable_preview': {'key': 'enablePreview', 'type': 'bool'}, + 'is_webchat_preview_enabled': {'key': 'isWebchatPreviewEnabled', 'type': 'bool'}, } def __init__( @@ -2272,7 +2878,7 @@ def __init__( *, site_name: str, is_enabled: bool, - enable_preview: bool, + is_webchat_preview_enabled: bool, **kwargs ): super(WebChatSite, self).__init__(**kwargs) @@ -2281,4 +2887,4 @@ def __init__( self.key = None self.key2 = None self.is_enabled = is_enabled - self.enable_preview = enable_preview + self.is_webchat_preview_enabled = is_webchat_preview_enabled diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py index 57b1265e4d3f..89604c7b3d53 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py @@ -12,6 +12,9 @@ from ._operations import Operations from ._bot_connection_operations import BotConnectionOperations from ._host_settings_operations import HostSettingsOperations +from ._operation_results_operations import OperationResultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations __all__ = [ 'BotsOperations', @@ -20,4 +23,7 @@ 'Operations', 'BotConnectionOperations', 'HostSettingsOperations', + 'OperationResultsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', ] diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py index c0bfd7861cc7..1b7de2448c16 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py @@ -62,7 +62,7 @@ def list_service_providers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -123,7 +123,7 @@ def list_with_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -190,7 +190,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -266,7 +266,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +339,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -403,7 +403,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -461,7 +461,7 @@ def list_by_bot_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py index ed7fd2484627..f55209315074 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py @@ -71,7 +71,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -160,7 +160,7 @@ def update( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.Bot(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -229,7 +229,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -286,7 +286,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -343,7 +343,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -412,7 +412,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -484,7 +484,7 @@ def get_check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py index 8b4d14b36711..0e80bedd1c2c 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py @@ -74,7 +74,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -167,7 +167,7 @@ def update( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.BotChannel(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +240,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -301,7 +301,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -365,7 +365,7 @@ def list_with_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL @@ -426,7 +426,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py index 4f1f776163b0..42bc7f1bb15e 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py @@ -74,7 +74,7 @@ def regenerate_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py index 5f893242d0d2..024f60662b22 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py @@ -61,7 +61,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operation_results_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operation_results_operations.py new file mode 100644 index 000000000000..952a784a8f1a --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operation_results_operations.py @@ -0,0 +1,159 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultsOperations(object): + """OperationResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _get_initial( + self, + operation_result_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.OperationResultsDescription"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultsDescription"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self._get_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationResultsDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}'} # type: ignore + + def begin_get( + self, + operation_result_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.OperationResultsDescription"] + """Get the operation result for a long running operation. + + :param operation_result_id: The ID of the operation result to get. + :type operation_result_id: 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: 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 OperationResultsDescription or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.botservice.models.OperationResultsDescription] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResultsDescription"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_initial( + operation_result_id=operation_result_id, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationResultsDescription', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationResultId': self._serialize.url("operation_result_id", operation_result_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}'} # type: ignore diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py index 70b0dc376668..bc6fce09db4f 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-05-01-preview" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_endpoint_connections_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..3dbd927d8ea0 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,322 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List all the private endpoint connections associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.botservice.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets the specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def create( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + properties, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Update the state of specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param properties: The private endpoint connection properties. + :type properties: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes the specified private endpoint connection associated with the Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_link_resources_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..80fc8ef5f8f5 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_link_resources_operations.py @@ -0,0 +1,105 @@ +# 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. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.botservice.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_bot_resource( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourceListResult" + """Gets the private link resources that need to be created for a Bot. + + :param resource_group_name: The name of the Bot resource group in the user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.botservice.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_bot_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_bot_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources'} # type: ignore