From e009a97f047bb6184678236f61312a57d35740b6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 17 Nov 2021 04:36:28 +0000 Subject: [PATCH] CodeGen from PR 16760 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.BotService to add version preview/2021-05-01-preview (#16760) * rename * change to enum * fix bug * fix example --- .../azure-mgmt-botservice/MANIFEST.in | 1 + .../azure-mgmt-botservice/_meta.json | 8 + .../mgmt/botservice/_azure_bot_service.py | 22 +- .../azure/mgmt/botservice/models/__init__.py | 42 ++ .../models/_azure_bot_service_enums.py | 38 + .../azure/mgmt/botservice/models/_models.py | 617 +++++++++++++++- .../mgmt/botservice/models/_models_py3.py | 693 ++++++++++++++++-- .../mgmt/botservice/models/_paged_models.py | 13 + .../mgmt/botservice/operations/__init__.py | 8 + .../operations/_bot_connection_operations.py | 4 +- .../botservice/operations/_bots_operations.py | 6 +- .../operations/_channels_operations.py | 6 +- .../operations/_direct_line_operations.py | 4 +- .../operations/_host_settings_operations.py | 94 +++ .../_operation_results_operations.py | 130 ++++ .../mgmt/botservice/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 307 ++++++++ .../_private_link_resources_operations.py | 101 +++ 18 files changed, 2013 insertions(+), 85 deletions(-) create mode 100644 sdk/botservice/azure-mgmt-botservice/_meta.json create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_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/MANIFEST.in b/sdk/botservice/azure-mgmt-botservice/MANIFEST.in index a3cb07df87658..3a9b6517412bc 100644 --- a/sdk/botservice/azure-mgmt-botservice/MANIFEST.in +++ b/sdk/botservice/azure-mgmt-botservice/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/botservice/azure-mgmt-botservice/_meta.json b/sdk/botservice/azure-mgmt-botservice/_meta.json new file mode 100644 index 0000000000000..2cd19a9fcaf69 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "c4d6f92d3fd35a69ebce68f4c73c35c4238c2ac5", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/botservice/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "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 4518da8b62a64..825b017e14fac 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 @@ -18,6 +18,10 @@ from .operations import DirectLineOperations 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 @@ -37,6 +41,14 @@ class AzureBotService(SDKClient): :vartype operations: azure.mgmt.botservice.operations.Operations :ivar bot_connection: BotConnection operations :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations + :ivar host_settings: HostSettings operations + :vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations + :ivar operation_results: OperationResults operations + :vartype operation_results: azure.mgmt.botservice.operations.OperationResultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.botservice.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.botservice.operations.PrivateLinkResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -53,7 +65,7 @@ def __init__( super(AzureBotService, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-02' + self.api_version = '2021-05-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -67,3 +79,11 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.bot_connection = BotConnectionOperations( 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) 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 40a0bf5bf7f49..a3cbbed937cc1 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 @@ -34,6 +34,7 @@ from ._models_py3 import FacebookChannel from ._models_py3 import FacebookChannelProperties from ._models_py3 import FacebookPage + from ._models_py3 import HostSettingsResponse from ._models_py3 import KikChannel from ._models_py3 import KikChannelProperties from ._models_py3 import LineChannel @@ -43,9 +44,18 @@ from ._models_py3 import MsTeamsChannelProperties from ._models_py3 import OperationDisplayInfo from ._models_py3 import OperationEntity + from ._models_py3 import OperationResultsDescription + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + 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 @@ -86,6 +96,7 @@ from ._models import FacebookChannel from ._models import FacebookChannelProperties from ._models import FacebookPage + from ._models import HostSettingsResponse from ._models import KikChannel from ._models import KikChannelProperties from ._models import LineChannel @@ -95,9 +106,18 @@ from ._models import MsTeamsChannelProperties from ._models import OperationDisplayInfo from ._models import OperationEntity + from ._models import OperationResultsDescription + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceBase + from ._models import PrivateLinkResourceListResult + from ._models import PrivateLinkServiceConnectionState from ._models import Resource from ._models import ServiceProvider from ._models import ServiceProviderParameter + from ._models import ServiceProviderParameterMetadata + from ._models import ServiceProviderParameterMetadataConstraints from ._models import ServiceProviderProperties from ._models import ServiceProviderResponseList from ._models import SiteInfo @@ -117,11 +137,17 @@ from ._paged_models import BotPaged from ._paged_models import ConnectionSettingPaged from ._paged_models import OperationEntityPaged +from ._paged_models import PrivateEndpointConnectionPaged from ._azure_bot_service_enums import ( SkuName, SkuTier, Kind, + MsaAppType, + PublicNetworkAccess, + PrivateEndpointServiceConnectionStatus, + PrivateEndpointConnectionProvisioningState, Key, + OperationResultStatus, ChannelName, RegenerateKeysChannelName, ) @@ -151,6 +177,7 @@ 'FacebookChannel', 'FacebookChannelProperties', 'FacebookPage', + 'HostSettingsResponse', 'KikChannel', 'KikChannelProperties', 'LineChannel', @@ -160,9 +187,18 @@ 'MsTeamsChannelProperties', 'OperationDisplayInfo', 'OperationEntity', + 'OperationResultsDescription', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceBase', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', 'Resource', 'ServiceProvider', 'ServiceProviderParameter', + 'ServiceProviderParameterMetadata', + 'ServiceProviderParameterMetadataConstraints', 'ServiceProviderProperties', 'ServiceProviderResponseList', 'SiteInfo', @@ -182,10 +218,16 @@ 'BotChannelPaged', 'OperationEntityPaged', 'ConnectionSettingPaged', + 'PrivateEndpointConnectionPaged', 'SkuName', 'SkuTier', 'Kind', + 'MsaAppType', + 'PublicNetworkAccess', + 'PrivateEndpointServiceConnectionStatus', + 'PrivateEndpointConnectionProvisioningState', 'Key', + 'OperationResultStatus', 'ChannelName', 'RegenerateKeysChannelName', ] 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 8bf05112160a9..aad54b7ecd4e4 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 @@ -30,6 +30,35 @@ class Kind(str, Enum): designer = "designer" bot = "bot" function = "function" + azurebot = "azurebot" + + +class MsaAppType(str, Enum): + + user_assigned_msi = "UserAssignedMSI" + single_tenant = "SingleTenant" + multi_tenant = "MultiTenant" + + +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class PrivateEndpointServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + + +class PrivateEndpointConnectionProvisioningState(str, Enum): + + succeeded = "Succeeded" + creating = "Creating" + deleting = "Deleting" + failed = "Failed" class Key(str, Enum): @@ -38,6 +67,15 @@ class Key(str, Enum): key2 = "key2" +class OperationResultStatus(str, Enum): + + canceled = "Canceled" + succeeded = "Succeeded" + failed = "Failed" + requested = "Requested" + running = "Running" + + class ChannelName(str, Enum): alexa_channel = "AlexaChannel" 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 86dfcd16fd5c9..659850e9fafd7 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 @@ -24,6 +24,8 @@ class Channel(Model): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str """ @@ -33,6 +35,7 @@ class Channel(Model): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, } @@ -42,33 +45,45 @@ class Channel(Model): def __init__(self, **kwargs): super(Channel, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) self.channel_name = 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 etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(AlexaChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = None self.channel_name = 'AlexaChannel' @@ -132,16 +147,19 @@ class Resource(Model): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 = { @@ -153,6 +171,7 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -165,6 +184,7 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.kind = kwargs.get('kind', None) self.etag = kwargs.get('etag', None) + self.zones = None class Bot(Resource): @@ -186,10 +206,12 @@ class Bot(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 """ @@ -198,6 +220,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -209,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'}, } @@ -236,10 +260,12 @@ class BotChannel(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 """ @@ -248,6 +274,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -259,6 +286,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'}, } @@ -285,8 +313,24 @@ class BotProperties(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] @@ -308,6 +352,40 @@ class BotProperties(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 public_network_access: Whether the bot is in an isolated network. + Possible values include: 'Enabled', 'Disabled'. Default value: "Enabled" . + :type public_network_access: str or + ~azure.mgmt.botservice.models.PublicNetworkAccess + :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 = { @@ -317,6 +395,9 @@ class BotProperties(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 = { @@ -325,7 +406,13 @@ class BotProperties(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'}, @@ -335,6 +422,18 @@ class BotProperties(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'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + '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__(self, **kwargs): @@ -344,7 +443,13 @@ def __init__(self, **kwargs): self.icon_url = kwargs.get('icon_url', None) self.endpoint = kwargs.get('endpoint', None) 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.get('msa_app_id', None) + 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) @@ -354,6 +459,18 @@ def __init__(self, **kwargs): 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.public_network_access = kwargs.get('public_network_access', "Enabled") + 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 CheckNameAvailabilityRequestBody(Model): @@ -451,10 +568,12 @@ class ConnectionSetting(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 @@ -464,6 +583,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -475,6 +595,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'}, } @@ -529,6 +650,8 @@ class ConnectionSettingProperties(Model): Connection Setting :type parameters: list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + :param provisioning_state: Provisioning state of the resource + :type provisioning_state: str """ _validation = { @@ -543,6 +666,7 @@ class ConnectionSettingProperties(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__(self, **kwargs): @@ -554,6 +678,7 @@ def __init__(self, **kwargs): 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 DirectLineChannel(Channel): @@ -561,12 +686,18 @@ class DirectLineChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -574,13 +705,18 @@ class DirectLineChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__(self, **kwargs): super(DirectLineChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) self.channel_name = 'DirectLineChannel' @@ -589,15 +725,19 @@ class DirectLineChannelProperties(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, **kwargs): 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(Model): @@ -630,6 +770,9 @@ class DirectLineSite(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] @@ -654,6 +797,7 @@ class DirectLineSite(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]'}, } @@ -667,6 +811,7 @@ def __init__(self, **kwargs): self.is_v1_enabled = kwargs.get('is_v1_enabled', None) self.is_v3_enabled = kwargs.get('is_v3_enabled', None) 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) @@ -675,12 +820,16 @@ class DirectLineSpeechChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -688,13 +837,16 @@ class DirectLineSpeechChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(DirectLineSpeechChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.channel_name = 'DirectLineSpeechChannel' @@ -703,9 +855,12 @@ class DirectLineSpeechChannelProperties(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 use with this channel registration. - :type cognitive_services_subscription_id: str + :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_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). @@ -718,11 +873,13 @@ class DirectLineSpeechChannelProperties(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'}, @@ -731,7 +888,8 @@ class DirectLineSpeechChannelProperties(Model): def __init__(self, **kwargs): super(DirectLineSpeechChannelProperties, self).__init__(**kwargs) - self.cognitive_services_subscription_id = kwargs.get('cognitive_services_subscription_id', None) + self.cognitive_service_region = kwargs.get('cognitive_service_region', None) + self.cognitive_service_subscription_key = kwargs.get('cognitive_service_subscription_key', None) 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) @@ -743,11 +901,15 @@ class EmailChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -755,13 +917,16 @@ class EmailChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(EmailChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.channel_name = 'EmailChannel' @@ -857,10 +1022,16 @@ class FacebookChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -868,13 +1039,18 @@ class FacebookChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__(self, **kwargs): super(FacebookChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) self.channel_name = 'FacebookChannel' @@ -955,11 +1131,65 @@ def __init__(self, **kwargs): self.access_token = kwargs.get('access_token', None) +class HostSettingsResponse(Model): + """The response body returned for a request to Bot Service Management to check + per subscription hostSettings. + + :param oauth_url: For in-conversation bot user authentication + :type oauth_url: str + :param to_bot_from_channel_open_id_metadata_url: For verifying incoming + tokens from the channels + :type to_bot_from_channel_open_id_metadata_url: str + :param to_bot_from_channel_token_issuer: For verifying incoming tokens + from the channels + :type to_bot_from_channel_token_issuer: str + :param to_bot_from_emulator_open_id_metadata_url: For verifying incoming + tokens from bot emulator + :type to_bot_from_emulator_open_id_metadata_url: str + :param to_channel_from_bot_login_url: For getting access token to channels + from bot host + :type to_channel_from_bot_login_url: str + :param to_channel_from_bot_oauth_scope: For getting access token to + channels from bot host + :type to_channel_from_bot_oauth_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 + :type bot_open_id_metadata: str + """ + + _attribute_map = { + 'oauth_url': {'key': 'OAuthUrl', 'type': 'str'}, + 'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'}, + 'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'}, + 'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'}, + 'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'}, + 'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'}, + 'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'}, + 'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HostSettingsResponse, self).__init__(**kwargs) + self.oauth_url = kwargs.get('oauth_url', None) + self.to_bot_from_channel_open_id_metadata_url = kwargs.get('to_bot_from_channel_open_id_metadata_url', None) + self.to_bot_from_channel_token_issuer = kwargs.get('to_bot_from_channel_token_issuer', None) + self.to_bot_from_emulator_open_id_metadata_url = kwargs.get('to_bot_from_emulator_open_id_metadata_url', None) + self.to_channel_from_bot_login_url = kwargs.get('to_channel_from_bot_login_url', None) + self.to_channel_from_bot_oauth_scope = kwargs.get('to_channel_from_bot_oauth_scope', None) + self.validate_authority = kwargs.get('validate_authority', None) + self.bot_open_id_metadata = kwargs.get('bot_open_id_metadata', None) + + class KikChannel(Channel): """Kik channel definition. All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Kik channel resource @@ -971,6 +1201,7 @@ class KikChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } @@ -1022,6 +1253,8 @@ class LineChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to line channel resource @@ -1033,6 +1266,7 @@ class LineChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'LineChannelProperties'}, } @@ -1117,11 +1351,17 @@ class MsTeamsChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1129,13 +1369,18 @@ class MsTeamsChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__(self, **kwargs): super(MsTeamsChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.location = kwargs.get('location', None) self.channel_name = 'MsTeamsChannel' @@ -1150,6 +1395,13 @@ class MsTeamsChannelProperties(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 = { @@ -1160,6 +1412,9 @@ class MsTeamsChannelProperties(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__(self, **kwargs): @@ -1167,6 +1422,9 @@ def __init__(self, **kwargs): self.enable_calling = kwargs.get('enable_calling', None) self.calling_web_hook = kwargs.get('calling_web_hook', None) self.is_enabled = kwargs.get('is_enabled', None) + 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(Model): @@ -1226,6 +1484,253 @@ def __init__(self, **kwargs): self.properties = kwargs.get('properties', None) +class OperationResultsDescription(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 + """ + + _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(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(Model): + """Private Link Resource Base. + + 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. + + All required parameters must be populated in order to send to Azure. + + :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: Required. 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 + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.botservice.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': 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 = kwargs.get('provisioning_state', 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(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(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(Model): """Service Provider Definition. @@ -1260,6 +1765,9 @@ class ServiceProviderParameter(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 = { @@ -1269,6 +1777,7 @@ class ServiceProviderParameter(Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1278,6 +1787,7 @@ class ServiceProviderParameter(Model): 'description': {'key': 'description', 'type': 'str'}, 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'default': {'key': 'default', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'ServiceProviderParameterMetadata'}, } def __init__(self, **kwargs): @@ -1288,6 +1798,40 @@ def __init__(self, **kwargs): self.description = None self.help_url = None self.default = None + self.metadata = None + + +class ServiceProviderParameterMetadata(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(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(Model): @@ -1431,6 +1975,8 @@ class SkypeChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Skype channel @@ -1443,6 +1989,7 @@ class SkypeChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } @@ -1474,6 +2021,8 @@ class SkypeChannelProperties(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 """ @@ -1491,6 +2040,7 @@ class SkypeChannelProperties(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'}, } @@ -1504,6 +2054,7 @@ def __init__(self, **kwargs): 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.get('is_enabled', None) @@ -1512,11 +2063,15 @@ class SlackChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1524,13 +2079,16 @@ class SlackChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, } def __init__(self, **kwargs): super(SlackChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.location = kwargs.get('location', None) self.channel_name = 'SlackChannel' @@ -1550,6 +2108,8 @@ class SlackChannelProperties(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 @@ -1579,11 +2139,12 @@ class SlackChannelProperties(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_oauth_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'}, } @@ -1593,6 +2154,7 @@ def __init__(self, **kwargs): 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 @@ -1607,6 +2169,8 @@ class SmsChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Sms channel resource @@ -1618,6 +2182,7 @@ class SmsChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } @@ -1675,11 +2240,15 @@ class TelegramChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1687,13 +2256,16 @@ class TelegramChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(TelegramChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.channel_name = 'TelegramChannel' @@ -1733,11 +2305,17 @@ class WebChatChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1745,13 +2323,18 @@ class WebChatChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } def __init__(self, **kwargs): super(WebChatChannel, self).__init__(**kwargs) self.properties = kwargs.get('properties', None) + self.location = kwargs.get('location', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.channel_name = 'WebChatChannel' @@ -1803,9 +2386,9 @@ class WebChatSite(Model): :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 = { @@ -1814,7 +2397,7 @@ class WebChatSite(Model): 'key': {'readonly': True}, 'key2': {'readonly': True}, 'is_enabled': {'required': True}, - 'enable_preview': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, } _attribute_map = { @@ -1823,7 +2406,7 @@ class WebChatSite(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__(self, **kwargs): @@ -1833,4 +2416,4 @@ def __init__(self, **kwargs): self.key = None self.key2 = None self.is_enabled = kwargs.get('is_enabled', None) - self.enable_preview = kwargs.get('enable_preview', None) + self.is_webchat_preview_enabled = kwargs.get('is_webchat_preview_enabled', None) 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 8492673e24350..b1f89a2448dfc 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(Model): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str """ @@ -33,6 +35,7 @@ class Channel(Model): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, } @@ -40,35 +43,47 @@ class Channel(Model): 'channel_name': {'AlexaChannel': 'AlexaChannel', 'FacebookChannel': 'FacebookChannel', 'EmailChannel': 'EmailChannel', 'MsTeamsChannel': 'MsTeamsChannel', 'SkypeChannel': 'SkypeChannel', 'KikChannel': 'KikChannel', 'WebChatChannel': 'WebChatChannel', 'DirectLineChannel': 'DirectLineChannel', 'TelegramChannel': 'TelegramChannel', 'SmsChannel': 'SmsChannel', 'SlackChannel': 'SlackChannel', 'LineChannel': 'LineChannel', 'DirectLineSpeechChannel': 'DirectLineSpeechChannel'} } - def __init__(self, **kwargs) -> None: + def __init__(self, *, etag: str=None, **kwargs) -> None: super(Channel, self).__init__(**kwargs) + self.etag = etag self.channel_name = 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 etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlexaChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, **kwargs) -> None: + super(AlexaChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = None self.channel_name = 'AlexaChannel' @@ -132,16 +147,19 @@ class Resource(Model): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 = { @@ -153,6 +171,7 @@ class Resource(Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, **kwargs) -> None: @@ -165,6 +184,7 @@ def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: self.sku = sku self.kind = kind self.etag = etag + self.zones = None class Bot(Resource): @@ -186,10 +206,12 @@ class Bot(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 """ @@ -198,6 +220,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -209,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'}, } @@ -236,10 +260,12 @@ class BotChannel(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 """ @@ -248,6 +274,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -259,6 +286,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'}, } @@ -285,8 +313,24 @@ class BotProperties(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] @@ -308,6 +352,40 @@ class BotProperties(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 public_network_access: Whether the bot is in an isolated network. + Possible values include: 'Enabled', 'Disabled'. Default value: "Enabled" . + :type public_network_access: str or + ~azure.mgmt.botservice.models.PublicNetworkAccess + :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 = { @@ -317,6 +395,9 @@ class BotProperties(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 = { @@ -325,7 +406,13 @@ class BotProperties(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'}, @@ -335,16 +422,34 @@ class BotProperties(Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, 'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'}, 'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'}, - } - - def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, description: str=None, icon_url: str=None, developer_app_insight_key: str=None, developer_app_insights_api_key: str=None, developer_app_insights_application_id: str=None, luis_app_ids=None, luis_key: str=None, is_cmek_enabled: bool=None, cmek_key_vault_url: str=None, **kwargs) -> None: + 'cmek_encryption_status': {'key': 'cmekEncryptionStatus', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + '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__(self, *, display_name: str, endpoint: str, msa_app_id: str, description: str=None, icon_url: str=None, all_settings=None, parameters=None, manifest_url: str=None, msa_app_type=None, msa_app_tenant_id: str=None, msa_app_msi_resource_id: str=None, developer_app_insight_key: str=None, developer_app_insights_api_key: str=None, developer_app_insights_application_id: str=None, luis_app_ids=None, luis_key: str=None, is_cmek_enabled: bool=None, cmek_key_vault_url: str=None, cmek_encryption_status: str=None, public_network_access="Enabled", is_streaming_supported: bool=None, is_developer_app_insights_api_key_set: bool=None, disable_local_auth: bool=None, schema_transformation_version: str=None, open_with_hint: str=None, app_password_hint: str=None, publishing_credentials: str=None, **kwargs) -> None: super(BotProperties, self).__init__(**kwargs) self.display_name = display_name self.description = description 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 @@ -354,6 +459,18 @@ def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, descrip 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.public_network_access = public_network_access + 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 CheckNameAvailabilityRequestBody(Model): @@ -451,10 +568,12 @@ class ConnectionSetting(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :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 @@ -464,6 +583,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -475,6 +595,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'}, } @@ -529,6 +650,8 @@ class ConnectionSettingProperties(Model): Connection Setting :type parameters: list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + :param provisioning_state: Provisioning state of the resource + :type provisioning_state: str """ _validation = { @@ -543,9 +666,10 @@ class ConnectionSettingProperties(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__(self, *, client_id: str=None, client_secret: str=None, scopes: str=None, service_provider_id: str=None, service_provider_display_name: str=None, parameters=None, **kwargs) -> None: + def __init__(self, *, client_id: str=None, client_secret: str=None, scopes: str=None, service_provider_id: str=None, service_provider_display_name: str=None, parameters=None, provisioning_state: str=None, **kwargs) -> None: super(ConnectionSettingProperties, self).__init__(**kwargs) self.client_id = client_id self.setting_id = None @@ -554,6 +678,7 @@ def __init__(self, *, client_id: str=None, client_secret: str=None, scopes: str= 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 DirectLineChannel(Channel): @@ -561,12 +686,18 @@ class DirectLineChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -574,13 +705,18 @@ class DirectLineChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(DirectLineChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, location: str=None, **kwargs) -> None: + super(DirectLineChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state + self.location = location self.channel_name = 'DirectLineChannel' @@ -589,15 +725,19 @@ class DirectLineChannelProperties(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=None, **kwargs) -> None: + def __init__(self, *, sites=None, direct_line_embed_code: str=None, **kwargs) -> None: super(DirectLineChannelProperties, self).__init__(**kwargs) self.sites = sites + self.direct_line_embed_code = direct_line_embed_code class DirectLineSite(Model): @@ -630,6 +770,9 @@ class DirectLineSite(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] @@ -654,10 +797,11 @@ class DirectLineSite(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]'}, } - def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, is_secure_site_enabled: bool=None, trusted_origins=None, **kwargs) -> None: + def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, is_secure_site_enabled: bool=None, is_block_user_upload_enabled: bool=None, trusted_origins=None, **kwargs) -> None: super(DirectLineSite, self).__init__(**kwargs) self.site_id = None self.site_name = site_name @@ -667,6 +811,7 @@ def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_ 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 @@ -675,12 +820,16 @@ class DirectLineSpeechChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -688,13 +837,16 @@ class DirectLineSpeechChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(DirectLineSpeechChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, **kwargs) -> None: + super(DirectLineSpeechChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state self.channel_name = 'DirectLineSpeechChannel' @@ -703,9 +855,12 @@ class DirectLineSpeechChannelProperties(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 use with this channel registration. - :type cognitive_services_subscription_id: str + :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_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). @@ -718,20 +873,23 @@ class DirectLineSpeechChannelProperties(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'}, 'is_default_bot_for_cog_svc_account': {'key': 'isDefaultBotForCogSvcAccount', 'type': 'bool'}, } - def __init__(self, *, cognitive_services_subscription_id: str, is_enabled: bool=None, custom_voice_deployment_id: str=None, custom_speech_model_id: str=None, is_default_bot_for_cog_svc_account: bool=None, **kwargs) -> None: + def __init__(self, *, cognitive_service_region: str, cognitive_service_subscription_key: str, is_enabled: bool=None, custom_voice_deployment_id: str=None, custom_speech_model_id: str=None, is_default_bot_for_cog_svc_account: bool=None, **kwargs) -> None: 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 @@ -743,11 +901,15 @@ class EmailChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -755,13 +917,16 @@ class EmailChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(EmailChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, **kwargs) -> None: + super(EmailChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state self.channel_name = 'EmailChannel' @@ -857,10 +1022,16 @@ class FacebookChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -868,13 +1039,18 @@ class FacebookChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(FacebookChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, location: str=None, **kwargs) -> None: + super(FacebookChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state + self.location = location self.channel_name = 'FacebookChannel' @@ -955,11 +1131,65 @@ def __init__(self, *, id: str, access_token: str=None, **kwargs) -> None: self.access_token = access_token +class HostSettingsResponse(Model): + """The response body returned for a request to Bot Service Management to check + per subscription hostSettings. + + :param oauth_url: For in-conversation bot user authentication + :type oauth_url: str + :param to_bot_from_channel_open_id_metadata_url: For verifying incoming + tokens from the channels + :type to_bot_from_channel_open_id_metadata_url: str + :param to_bot_from_channel_token_issuer: For verifying incoming tokens + from the channels + :type to_bot_from_channel_token_issuer: str + :param to_bot_from_emulator_open_id_metadata_url: For verifying incoming + tokens from bot emulator + :type to_bot_from_emulator_open_id_metadata_url: str + :param to_channel_from_bot_login_url: For getting access token to channels + from bot host + :type to_channel_from_bot_login_url: str + :param to_channel_from_bot_oauth_scope: For getting access token to + channels from bot host + :type to_channel_from_bot_oauth_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 + :type bot_open_id_metadata: str + """ + + _attribute_map = { + 'oauth_url': {'key': 'OAuthUrl', 'type': 'str'}, + 'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'}, + 'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'}, + 'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'}, + 'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'}, + 'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'}, + 'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'}, + 'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'}, + } + + def __init__(self, *, oauth_url: str=None, to_bot_from_channel_open_id_metadata_url: str=None, to_bot_from_channel_token_issuer: str=None, to_bot_from_emulator_open_id_metadata_url: str=None, to_channel_from_bot_login_url: str=None, to_channel_from_bot_oauth_scope: str=None, validate_authority: bool=None, bot_open_id_metadata: str=None, **kwargs) -> None: + super(HostSettingsResponse, self).__init__(**kwargs) + self.oauth_url = oauth_url + self.to_bot_from_channel_open_id_metadata_url = to_bot_from_channel_open_id_metadata_url + self.to_bot_from_channel_token_issuer = to_bot_from_channel_token_issuer + self.to_bot_from_emulator_open_id_metadata_url = to_bot_from_emulator_open_id_metadata_url + self.to_channel_from_bot_login_url = to_channel_from_bot_login_url + self.to_channel_from_bot_oauth_scope = to_channel_from_bot_oauth_scope + self.validate_authority = validate_authority + self.bot_open_id_metadata = bot_open_id_metadata + + class KikChannel(Channel): """Kik channel definition. All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Kik channel resource @@ -971,12 +1201,13 @@ class KikChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(KikChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, **kwargs) -> None: + super(KikChannel, self).__init__(etag=etag, **kwargs) self.properties = properties self.channel_name = 'KikChannel' @@ -1022,6 +1253,8 @@ class LineChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to line channel resource @@ -1033,12 +1266,13 @@ class LineChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'LineChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(LineChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, **kwargs) -> None: + super(LineChannel, self).__init__(etag=etag, **kwargs) self.properties = properties self.channel_name = 'LineChannel' @@ -1117,11 +1351,17 @@ class MsTeamsChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1129,13 +1369,18 @@ class MsTeamsChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(MsTeamsChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, location: str=None, **kwargs) -> None: + super(MsTeamsChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state + self.location = location self.channel_name = 'MsTeamsChannel' @@ -1150,6 +1395,13 @@ class MsTeamsChannelProperties(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 = { @@ -1160,13 +1412,19 @@ class MsTeamsChannelProperties(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__(self, *, is_enabled: bool, enable_calling: bool=None, calling_web_hook: str=None, **kwargs) -> None: + def __init__(self, *, is_enabled: bool, enable_calling: bool=None, calling_web_hook: str=None, incoming_call_route: str=None, deployment_environment: str=None, accepted_terms: bool=None, **kwargs) -> None: 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(Model): @@ -1226,6 +1484,253 @@ def __init__(self, *, name: str=None, display=None, origin: str=None, properties self.properties = properties +class OperationResultsDescription(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 + """ + + _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) -> None: + super(OperationResultsDescription, self).__init__(**kwargs) + self.id = None + self.name = None + self.status = None + self.start_time = None + + +class PrivateEndpoint(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) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateLinkResourceBase(Model): + """Private Link Resource Base. + + 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) -> None: + 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. + + All required parameters must be populated in order to send to Azure. + + :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: Required. 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 + :param provisioning_state: The provisioning state of the private endpoint + connection resource. Possible values include: 'Succeeded', 'Creating', + 'Deleting', 'Failed' + :type provisioning_state: str or + ~azure.mgmt.botservice.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_link_service_connection_state': {'required': 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_link_service_connection_state, private_endpoint=None, provisioning_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +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=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(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=None, **kwargs) -> None: + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(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=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + class ServiceProvider(Model): """Service Provider Definition. @@ -1260,6 +1765,9 @@ class ServiceProviderParameter(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 = { @@ -1269,6 +1777,7 @@ class ServiceProviderParameter(Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1278,6 +1787,7 @@ class ServiceProviderParameter(Model): 'description': {'key': 'description', 'type': 'str'}, 'help_url': {'key': 'helpUrl', 'type': 'str'}, 'default': {'key': 'default', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'ServiceProviderParameterMetadata'}, } def __init__(self, **kwargs) -> None: @@ -1288,6 +1798,40 @@ def __init__(self, **kwargs) -> None: self.description = None self.help_url = None self.default = None + self.metadata = None + + +class ServiceProviderParameterMetadata(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=None, **kwargs) -> None: + super(ServiceProviderParameterMetadata, self).__init__(**kwargs) + self.constraints = constraints + + +class ServiceProviderParameterMetadataConstraints(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: bool=None, **kwargs) -> None: + super(ServiceProviderParameterMetadataConstraints, self).__init__(**kwargs) + self.required = required class ServiceProviderProperties(Model): @@ -1431,6 +1975,8 @@ class SkypeChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Skype channel @@ -1443,12 +1989,13 @@ class SkypeChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(SkypeChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, **kwargs) -> None: + super(SkypeChannel, self).__init__(etag=etag, **kwargs) self.properties = properties self.channel_name = 'SkypeChannel' @@ -1474,6 +2021,8 @@ class SkypeChannelProperties(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 """ @@ -1491,10 +2040,11 @@ class SkypeChannelProperties(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'}, } - def __init__(self, *, is_enabled: bool, enable_messaging: bool=None, enable_media_cards: bool=None, enable_video: bool=None, enable_calling: bool=None, enable_screen_sharing: bool=None, enable_groups: bool=None, groups_mode: str=None, calling_web_hook: str=None, **kwargs) -> None: + def __init__(self, *, is_enabled: bool, enable_messaging: bool=None, enable_media_cards: bool=None, enable_video: bool=None, enable_calling: bool=None, enable_screen_sharing: bool=None, enable_groups: bool=None, groups_mode: str=None, calling_web_hook: str=None, incoming_call_route: str=None, **kwargs) -> None: super(SkypeChannelProperties, self).__init__(**kwargs) self.enable_messaging = enable_messaging self.enable_media_cards = enable_media_cards @@ -1504,6 +2054,7 @@ def __init__(self, *, is_enabled: bool, enable_messaging: bool=None, enable_medi 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 @@ -1512,11 +2063,15 @@ class SlackChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1524,13 +2079,16 @@ class SlackChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(SlackChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, location: str=None, **kwargs) -> None: + super(SlackChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.location = location self.channel_name = 'SlackChannel' @@ -1550,6 +2108,8 @@ class SlackChannelProperties(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 @@ -1579,20 +2139,22 @@ class SlackChannelProperties(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_oauth_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'}, } - def __init__(self, *, is_enabled: bool, client_id: str=None, client_secret: str=None, verification_token: str=None, landing_page_url: str=None, signing_secret: str=None, **kwargs) -> None: + def __init__(self, *, is_enabled: bool, client_id: str=None, client_secret: str=None, verification_token: str=None, scopes: str=None, landing_page_url: str=None, signing_secret: str=None, **kwargs) -> None: super(SlackChannelProperties, self).__init__(**kwargs) 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 @@ -1607,6 +2169,8 @@ class SmsChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Sms channel resource @@ -1618,12 +2182,13 @@ class SmsChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(SmsChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, **kwargs) -> None: + super(SmsChannel, self).__init__(etag=etag, **kwargs) self.properties = properties self.channel_name = 'SmsChannel' @@ -1675,11 +2240,15 @@ class TelegramChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1687,13 +2256,16 @@ class TelegramChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(TelegramChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, provisioning_state: str=None, **kwargs) -> None: + super(TelegramChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.provisioning_state = provisioning_state self.channel_name = 'TelegramChannel' @@ -1733,11 +2305,17 @@ class WebChatChannel(Channel): All required parameters must be populated in order to send to Azure. + :param etag: Entity Tag of the resource + :type etag: str :param channel_name: Required. Constant filled by server. :type channel_name: 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 = { @@ -1745,13 +2323,18 @@ class WebChatChannel(Channel): } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(WebChatChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, properties=None, location: str=None, provisioning_state: str=None, **kwargs) -> None: + super(WebChatChannel, self).__init__(etag=etag, **kwargs) self.properties = properties + self.location = location + self.provisioning_state = provisioning_state self.channel_name = 'WebChatChannel' @@ -1803,9 +2386,9 @@ class WebChatSite(Model): :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 = { @@ -1814,7 +2397,7 @@ class WebChatSite(Model): 'key': {'readonly': True}, 'key2': {'readonly': True}, 'is_enabled': {'required': True}, - 'enable_preview': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, } _attribute_map = { @@ -1823,14 +2406,14 @@ class WebChatSite(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__(self, *, site_name: str, is_enabled: bool, enable_preview: bool, **kwargs) -> None: + def __init__(self, *, site_name: str, is_enabled: bool, is_webchat_preview_enabled: bool, **kwargs) -> None: super(WebChatSite, self).__init__(**kwargs) self.site_id = None self.site_name = site_name 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/models/_paged_models.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_paged_models.py index d169551a983b8..12d4c3b24aba1 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_paged_models.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_paged_models.py @@ -64,3 +64,16 @@ class ConnectionSettingPaged(Paged): def __init__(self, *args, **kwargs): super(ConnectionSettingPaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) 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 892f8e5743d78..d2757c60bb469 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 @@ -14,6 +14,10 @@ from ._direct_line_operations import DirectLineOperations 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', @@ -21,4 +25,8 @@ 'DirectLineOperations', '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 ed00506f04bba..347611c389caa 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 @@ -24,7 +24,7 @@ class BotConnectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-05-01-preview" self.config = config 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 5c083ba1aa781..aa7069078761c 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 @@ -24,7 +24,7 @@ class BotsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-05-01-preview" self.config = config @@ -124,7 +124,7 @@ def update( :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str 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 21d1a766a01d0..b9ba3ad7d0c41 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 @@ -24,7 +24,7 @@ class ChannelsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-05-01-preview" self.config = config @@ -136,7 +136,7 @@ def update( :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str 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 3612cf149b5a4..c9a64e2e6ebec 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 @@ -24,7 +24,7 @@ class DirectLineOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-05-01-preview" self.config = config 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 new file mode 100644 index 0000000000000..2fa36c8ad5a2e --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py @@ -0,0 +1,94 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class HostSettingsOperations(object): + """HostSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-05-01-preview" + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Get per subscription settings needed to host bot in compute resource + such as Azure App Service. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostSettingsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.HostSettingsResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + '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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostSettingsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings'} 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 0000000000000..10d9e3f00097b --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operation_results_operations.py @@ -0,0 +1,130 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class OperationResultsOperations(object): + """OperationResultsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-05-01-preview" + + self.config = config + + + def _get_initial( + self, operation_result_id, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('OperationResultsDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get( + self, operation_result_id, custom_headers=None, raw=False, polling=True, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + OperationResultsDescription or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.botservice.models.OperationResultsDescription] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.botservice.models.OperationResultsDescription]] + :raises: + :class:`ErrorException` + """ + raw_result = self._get_initial( + operation_result_id=operation_result_id, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('OperationResultsDescription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}'} 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 1489465f9e7c8..7ef3f948c1580 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 @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-05-01-preview" self.config = config 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 0000000000000..bf2c5b3226e29 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,307 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-05-01-preview" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.botservice.models.PrivateEndpointConnectionPaged[~azure.mgmt.botservice.models.PrivateEndpointConnection] + :raises: + :class:`ErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections'} + + def get( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def create( + self, resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.create.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def delete( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} 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 0000000000000..1db319186c55b --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_private_link_resources_operations.py @@ -0,0 +1,101 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-05-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-05-01-preview" + + self.config = config + + def list_by_bot_resource( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResourceListResult or ClientRawResponse if + raw=true + :rtype: ~azure.mgmt.botservice.models.PrivateLinkResourceListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_by_bot_resource.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResourceListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_by_bot_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources'}