diff --git a/sdk/botservice/azure-mgmt-botservice/MANIFEST.in b/sdk/botservice/azure-mgmt-botservice/MANIFEST.in index a3cb07df8765..3a9b6517412b 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 000000000000..fdb321ce4d23 --- /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": "8dada797091fbaa3793f9bedd3c6f1a5d19a20c6", + "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 4518da8b62a6..825b017e14fa 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 40a0bf5bf7f4..b791fb62eaac 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 @@ -16,6 +16,7 @@ from ._models_py3 import BotChannel from ._models_py3 import BotProperties from ._models_py3 import Channel + from ._models_py3 import ChannelSettings from ._models_py3 import CheckNameAvailabilityRequestBody from ._models_py3 import CheckNameAvailabilityResponseBody from ._models_py3 import ConnectionItemName @@ -34,20 +35,32 @@ 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 from ._models_py3 import LineChannelProperties from ._models_py3 import LineRegistration + from ._models_py3 import ListChannelWithKeysResponse from ._models_py3 import MsTeamsChannel 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 Site from ._models_py3 import SiteInfo from ._models_py3 import Sku from ._models_py3 import SkypeChannel @@ -68,6 +81,7 @@ from ._models import BotChannel from ._models import BotProperties from ._models import Channel + from ._models import ChannelSettings from ._models import CheckNameAvailabilityRequestBody from ._models import CheckNameAvailabilityResponseBody from ._models import ConnectionItemName @@ -86,20 +100,32 @@ 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 from ._models import LineChannelProperties from ._models import LineRegistration + from ._models import ListChannelWithKeysResponse from ._models import MsTeamsChannel 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 Site from ._models import SiteInfo from ._models import Sku from ._models import SkypeChannel @@ -117,11 +143,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, ) @@ -133,6 +165,7 @@ 'BotChannel', 'BotProperties', 'Channel', + 'ChannelSettings', 'CheckNameAvailabilityRequestBody', 'CheckNameAvailabilityResponseBody', 'ConnectionItemName', @@ -151,20 +184,32 @@ 'FacebookChannel', 'FacebookChannelProperties', 'FacebookPage', + 'HostSettingsResponse', 'KikChannel', 'KikChannelProperties', 'LineChannel', 'LineChannelProperties', 'LineRegistration', + 'ListChannelWithKeysResponse', 'MsTeamsChannel', 'MsTeamsChannelProperties', 'OperationDisplayInfo', 'OperationEntity', + 'OperationResultsDescription', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkResourceBase', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', 'Resource', 'ServiceProvider', 'ServiceProviderParameter', + 'ServiceProviderParameterMetadata', + 'ServiceProviderParameterMetadataConstraints', 'ServiceProviderProperties', 'ServiceProviderResponseList', + 'Site', 'SiteInfo', 'Sku', 'SkypeChannel', @@ -182,10 +227,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 8bf05112160a..aad54b7ecd4e 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 86dfcd16fd5c..61fac3a68e02 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 @@ -22,17 +22,30 @@ class Channel(Model): DirectLineChannel, TelegramChannel, SmsChannel, SlackChannel, LineChannel, DirectLineSpeechChannel + 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, } @@ -42,14 +55,26 @@ class Channel(Model): def __init__(self, **kwargs): super(Channel, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.provisioning_state = None + self.location = kwargs.get('location', 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Alexa channel @@ -58,10 +83,14 @@ class AlexaChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, } @@ -132,16 +161,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 +185,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 +198,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 +220,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 +234,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -209,6 +246,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 +274,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 +288,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -259,6 +300,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 +327,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 +366,42 @@ 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 + :param storage_resource_id: The storage resourceId for the bot + :type storage_resource_id: 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 +411,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 +422,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 +438,19 @@ 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'}, + 'storage_resource_id': {'key': 'storageResourceId', '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 +460,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 +476,68 @@ 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.storage_resource_id = kwargs.get('storage_resource_id', 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 ChannelSettings(Model): + """Channel settings definition. + + :param extension_key1: The extensionKey1 + :type extension_key1: str + :param extension_key2: The extensionKey2 + :type extension_key2: str + :param sites: The list of sites + :type sites: list[~azure.mgmt.botservice.models.Site] + :param channel_id: The channel id + :type channel_id: str + :param channel_display_name: The channel display name + :type channel_display_name: str + :param bot_id: The bot id + :type bot_id: str + :param bot_icon_url: The bot icon url + :type bot_icon_url: str + :param is_enabled: Whether this channel is enabled for the bot + :type is_enabled: bool + :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 + """ + + _attribute_map = { + 'extension_key1': {'key': 'extensionKey1', 'type': 'str'}, + 'extension_key2': {'key': 'extensionKey2', 'type': 'str'}, + 'sites': {'key': 'sites', 'type': '[Site]'}, + 'channel_id': {'key': 'channelId', 'type': 'str'}, + 'channel_display_name': {'key': 'channelDisplayName', 'type': 'str'}, + 'bot_id': {'key': 'botId', 'type': 'str'}, + 'bot_icon_url': {'key': 'botIconUrl', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ChannelSettings, self).__init__(**kwargs) + self.extension_key1 = kwargs.get('extension_key1', None) + self.extension_key2 = kwargs.get('extension_key2', None) + self.sites = kwargs.get('sites', None) + self.channel_id = kwargs.get('channel_id', None) + self.channel_display_name = kwargs.get('channel_display_name', None) + self.bot_id = kwargs.get('bot_id', None) + self.bot_icon_url = kwargs.get('bot_icon_url', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.disable_local_auth = kwargs.get('disable_local_auth', None) class CheckNameAvailabilityRequestBody(Model): @@ -451,10 +635,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 +650,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -475,6 +662,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'}, } @@ -510,6 +698,10 @@ class ConnectionSettingProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. + :param id: Id associated with the Connection Setting. + :type id: str + :param name: Name associated with the Connection Setting. + :type name: str :param client_id: Client Id associated with the Connection Setting. :type client_id: str :ivar setting_id: Setting Id set by the service for the Connection @@ -529,6 +721,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 = { @@ -536,6 +730,8 @@ class ConnectionSettingProperties(Model): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, 'setting_id': {'key': 'settingId', 'type': 'str'}, 'client_secret': {'key': 'clientSecret', 'type': 'str'}, @@ -543,10 +739,13 @@ 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): super(ConnectionSettingProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) self.client_id = kwargs.get('client_id', None) self.setting_id = None self.client_secret = kwargs.get('client_secret', None) @@ -554,13 +753,23 @@ 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): """Direct Line 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Direct Line channel @@ -570,10 +779,14 @@ class DirectLineChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, } @@ -589,15 +802,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 +847,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 +874,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,14 +888,24 @@ 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) class DirectLineSpeechChannel(Channel): """DirectLine Speech 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to DirectLine Speech @@ -684,10 +915,14 @@ class DirectLineSpeechChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, } @@ -703,9 +938,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 +956,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 +971,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) @@ -741,8 +982,17 @@ def __init__(self, **kwargs): class EmailChannel(Channel): """Email 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to email channel @@ -751,10 +1001,14 @@ class EmailChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, } @@ -855,8 +1109,17 @@ def __init__(self, **kwargs): class FacebookChannel(Channel): """Facebook 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to bot facebook channel @@ -864,10 +1127,14 @@ class FacebookChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, } @@ -955,11 +1222,72 @@ 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. + 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Kik channel resource @@ -967,10 +1295,14 @@ class KikChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } @@ -1020,8 +1352,17 @@ def __init__(self, **kwargs): class LineChannel(Channel): """Line 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to line channel resource @@ -1029,10 +1370,14 @@ class LineChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'LineChannelProperties'}, } @@ -1112,11 +1457,81 @@ def __init__(self, **kwargs): self.channel_access_token = kwargs.get('channel_access_token', None) +class ListChannelWithKeysResponse(BotChannel): + """The ARM channel of list channel with keys operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :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', '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 + :param resource: The set of properties specific to bot channel resource + :type resource: ~azure.mgmt.botservice.models.Channel + :param setting: Channel settings + :type setting: ~azure.mgmt.botservice.models.ChannelSettings + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + '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'}, + 'resource': {'key': 'resource', 'type': 'Channel'}, + 'setting': {'key': 'setting', 'type': 'ChannelSettings'}, + } + + def __init__(self, **kwargs): + super(ListChannelWithKeysResponse, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.setting = kwargs.get('setting', None) + + class MsTeamsChannel(Channel): """Microsoft Teams 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Microsoft Teams @@ -1125,10 +1540,14 @@ class MsTeamsChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, } @@ -1150,6 +1569,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 +1586,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 +1596,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 +1658,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 +1939,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 +1951,7 @@ class ServiceProviderParameter(Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1278,6 +1961,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 +1972,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): @@ -1366,6 +2084,95 @@ def __init__(self, **kwargs): self.value = None +class Site(Model): + """A site for the channel. + + 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 site_id: Site Id + :vartype site_id: str + :param site_name: Required. Site name + :type site_name: str + :ivar key: Primary key. Value only returned through POST to the action + Channel List API, otherwise empty. + :vartype key: str + :ivar key2: Secondary key. Value only returned through POST to the action + Channel List API, otherwise empty. + :vartype key2: str + :param is_enabled: Required. Whether this site is enabled for DirectLine + channel + :type is_enabled: bool + :param is_webchat_preview_enabled: Required. Whether this site is enabled + for preview versions of Webchat. Default value: False . + :type is_webchat_preview_enabled: bool + :param is_v1_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol. + :type is_v1_enabled: bool + :param is_v3_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol. + :type is_v3_enabled: bool + :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] + :param is_token_enabled: Whether this site is token enabled for channel + :type is_token_enabled: bool + :param e_tag: Entity Tag + :type e_tag: str + """ + + _validation = { + 'site_id': {'readonly': True}, + 'site_name': {'required': True}, + 'key': {'readonly': True}, + 'key2': {'readonly': True}, + 'is_enabled': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, + 'is_v1_enabled': {'required': True}, + 'is_v3_enabled': {'required': True}, + } + + _attribute_map = { + 'site_id': {'key': 'siteId', 'type': 'str'}, + 'site_name': {'key': 'siteName', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_webchat_preview_enabled': {'key': 'isWebchatPreviewEnabled', 'type': 'bool'}, + '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]'}, + 'is_token_enabled': {'key': 'isTokenEnabled', 'type': 'bool'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Site, self).__init__(**kwargs) + self.site_id = None + self.site_name = kwargs.get('site_name', None) + self.key = None + self.key2 = None + self.is_enabled = kwargs.get('is_enabled', None) + self.is_webchat_preview_enabled = kwargs.get('is_webchat_preview_enabled', False) + 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) + self.is_token_enabled = kwargs.get('is_token_enabled', None) + self.e_tag = kwargs.get('e_tag', None) + + class SiteInfo(Model): """Site information for WebChat or DirectLine Channels to identify which site to regenerate keys for. @@ -1429,8 +2236,17 @@ def __init__(self, **kwargs): class SkypeChannel(Channel): """Skype 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Skype channel @@ -1439,10 +2255,14 @@ class SkypeChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } @@ -1474,6 +2294,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 +2313,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,14 +2327,24 @@ 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) class SlackChannel(Channel): """Slack 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Slack channel @@ -1520,10 +2353,14 @@ class SlackChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, } @@ -1550,6 +2387,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 +2418,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 +2433,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 @@ -1605,8 +2446,17 @@ def __init__(self, **kwargs): class SmsChannel(Channel): """Sms 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Sms channel resource @@ -1614,10 +2464,14 @@ class SmsChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } @@ -1673,8 +2527,17 @@ def __init__(self, **kwargs): class TelegramChannel(Channel): """Telegram 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Telegram channel @@ -1683,10 +2546,14 @@ class TelegramChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, } @@ -1731,8 +2598,17 @@ def __init__(self, **kwargs): class WebChatChannel(Channel): """Web Chat 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Web Chat channel @@ -1741,10 +2617,14 @@ class WebChatChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, } @@ -1803,9 +2683,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. Default value: False . + :type is_webchat_preview_enabled: bool """ _validation = { @@ -1814,7 +2694,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 +2703,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 +2713,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', False) 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 8492673e2435..36e71fb3c184 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 @@ -22,17 +22,30 @@ class Channel(Model): DirectLineChannel, TelegramChannel, SmsChannel, SlackChannel, LineChannel, DirectLineSpeechChannel + 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, } @@ -40,16 +53,28 @@ 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, location: str=None, **kwargs) -> None: super(Channel, self).__init__(**kwargs) + self.etag = etag + self.provisioning_state = None + self.location = location 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Alexa channel @@ -58,16 +83,20 @@ class AlexaChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'AlexaChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(AlexaChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(AlexaChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'AlexaChannel' @@ -132,16 +161,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 +185,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 +198,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 +220,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 +234,7 @@ class Bot(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -209,6 +246,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 +274,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 +288,7 @@ class BotChannel(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -259,6 +300,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 +327,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 +366,42 @@ 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 + :param storage_resource_id: The storage resourceId for the bot + :type storage_resource_id: 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 +411,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 +422,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 +438,35 @@ 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'}, + 'storage_resource_id': {'key': 'storageResourceId', '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, storage_resource_id: 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 +476,68 @@ 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.storage_resource_id = storage_resource_id + 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 ChannelSettings(Model): + """Channel settings definition. + + :param extension_key1: The extensionKey1 + :type extension_key1: str + :param extension_key2: The extensionKey2 + :type extension_key2: str + :param sites: The list of sites + :type sites: list[~azure.mgmt.botservice.models.Site] + :param channel_id: The channel id + :type channel_id: str + :param channel_display_name: The channel display name + :type channel_display_name: str + :param bot_id: The bot id + :type bot_id: str + :param bot_icon_url: The bot icon url + :type bot_icon_url: str + :param is_enabled: Whether this channel is enabled for the bot + :type is_enabled: bool + :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 + """ + + _attribute_map = { + 'extension_key1': {'key': 'extensionKey1', 'type': 'str'}, + 'extension_key2': {'key': 'extensionKey2', 'type': 'str'}, + 'sites': {'key': 'sites', 'type': '[Site]'}, + 'channel_id': {'key': 'channelId', 'type': 'str'}, + 'channel_display_name': {'key': 'channelDisplayName', 'type': 'str'}, + 'bot_id': {'key': 'botId', 'type': 'str'}, + 'bot_icon_url': {'key': 'botIconUrl', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + } + + def __init__(self, *, extension_key1: str=None, extension_key2: str=None, sites=None, channel_id: str=None, channel_display_name: str=None, bot_id: str=None, bot_icon_url: str=None, is_enabled: bool=None, disable_local_auth: bool=None, **kwargs) -> None: + super(ChannelSettings, self).__init__(**kwargs) + self.extension_key1 = extension_key1 + self.extension_key2 = extension_key2 + self.sites = sites + self.channel_id = channel_id + self.channel_display_name = channel_display_name + self.bot_id = bot_id + self.bot_icon_url = bot_icon_url + self.is_enabled = is_enabled + self.disable_local_auth = disable_local_auth class CheckNameAvailabilityRequestBody(Model): @@ -451,10 +635,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 +650,7 @@ class ConnectionSetting(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'zones': {'readonly': True}, } _attribute_map = { @@ -475,6 +662,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'}, } @@ -510,6 +698,10 @@ class ConnectionSettingProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. + :param id: Id associated with the Connection Setting. + :type id: str + :param name: Name associated with the Connection Setting. + :type name: str :param client_id: Client Id associated with the Connection Setting. :type client_id: str :ivar setting_id: Setting Id set by the service for the Connection @@ -529,6 +721,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 = { @@ -536,6 +730,8 @@ class ConnectionSettingProperties(Model): } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, 'client_id': {'key': 'clientId', 'type': 'str'}, 'setting_id': {'key': 'settingId', 'type': 'str'}, 'client_secret': {'key': 'clientSecret', 'type': 'str'}, @@ -543,10 +739,13 @@ 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, *, id: str=None, name: str=None, 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.id = id + self.name = name self.client_id = client_id self.setting_id = None self.client_secret = client_secret @@ -554,13 +753,23 @@ 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): """Direct Line 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Direct Line channel @@ -570,16 +779,20 @@ class DirectLineChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(DirectLineChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(DirectLineChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'DirectLineChannel' @@ -589,15 +802,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 +847,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 +874,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,14 +888,24 @@ 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 class DirectLineSpeechChannel(Channel): """DirectLine Speech 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to DirectLine Speech @@ -684,16 +915,20 @@ class DirectLineSpeechChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'DirectLineSpeechChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(DirectLineSpeechChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(DirectLineSpeechChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'DirectLineSpeechChannel' @@ -703,9 +938,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 +956,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 @@ -741,8 +982,17 @@ def __init__(self, *, cognitive_services_subscription_id: str, is_enabled: bool= class EmailChannel(Channel): """Email 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to email channel @@ -751,16 +1001,20 @@ class EmailChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(EmailChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(EmailChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'EmailChannel' @@ -855,8 +1109,17 @@ def __init__(self, *, code: str, message: str, **kwargs) -> None: class FacebookChannel(Channel): """Facebook 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to bot facebook channel @@ -864,16 +1127,20 @@ class FacebookChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(FacebookChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(FacebookChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'FacebookChannel' @@ -955,11 +1222,72 @@ 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. + 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Kik channel resource @@ -967,16 +1295,20 @@ class KikChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', '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, location: str=None, properties=None, **kwargs) -> None: + super(KikChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'KikChannel' @@ -1020,8 +1352,17 @@ def __init__(self, *, user_name: str, is_enabled: bool, api_key: str=None, is_va class LineChannel(Channel): """Line 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to line channel resource @@ -1029,16 +1370,20 @@ class LineChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', '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, location: str=None, properties=None, **kwargs) -> None: + super(LineChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'LineChannel' @@ -1112,11 +1457,81 @@ def __init__(self, *, channel_secret: str=None, channel_access_token: str=None, self.channel_access_token = channel_access_token +class ListChannelWithKeysResponse(BotChannel): + """The ARM channel of list channel with keys operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :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', '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 + :param resource: The set of properties specific to bot channel resource + :type resource: ~azure.mgmt.botservice.models.Channel + :param setting: Channel settings + :type setting: ~azure.mgmt.botservice.models.ChannelSettings + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + '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'}, + 'resource': {'key': 'resource', 'type': 'Channel'}, + 'setting': {'key': 'setting', 'type': 'ChannelSettings'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, resource=None, setting=None, **kwargs) -> None: + super(ListChannelWithKeysResponse, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties, **kwargs) + self.resource = resource + self.setting = setting + + class MsTeamsChannel(Channel): """Microsoft Teams 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Microsoft Teams @@ -1125,16 +1540,20 @@ class MsTeamsChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(MsTeamsChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(MsTeamsChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'MsTeamsChannel' @@ -1150,6 +1569,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 +1586,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 +1658,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 +1939,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 +1951,7 @@ class ServiceProviderParameter(Model): 'description': {'readonly': True}, 'help_url': {'readonly': True}, 'default': {'readonly': True}, + 'metadata': {'readonly': True}, } _attribute_map = { @@ -1278,6 +1961,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 +1972,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): @@ -1366,6 +2084,95 @@ def __init__(self, *, next_link: str=None, **kwargs) -> None: self.value = None +class Site(Model): + """A site for the channel. + + 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 site_id: Site Id + :vartype site_id: str + :param site_name: Required. Site name + :type site_name: str + :ivar key: Primary key. Value only returned through POST to the action + Channel List API, otherwise empty. + :vartype key: str + :ivar key2: Secondary key. Value only returned through POST to the action + Channel List API, otherwise empty. + :vartype key2: str + :param is_enabled: Required. Whether this site is enabled for DirectLine + channel + :type is_enabled: bool + :param is_webchat_preview_enabled: Required. Whether this site is enabled + for preview versions of Webchat. Default value: False . + :type is_webchat_preview_enabled: bool + :param is_v1_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol. + :type is_v1_enabled: bool + :param is_v3_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol. + :type is_v3_enabled: bool + :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] + :param is_token_enabled: Whether this site is token enabled for channel + :type is_token_enabled: bool + :param e_tag: Entity Tag + :type e_tag: str + """ + + _validation = { + 'site_id': {'readonly': True}, + 'site_name': {'required': True}, + 'key': {'readonly': True}, + 'key2': {'readonly': True}, + 'is_enabled': {'required': True}, + 'is_webchat_preview_enabled': {'required': True}, + 'is_v1_enabled': {'required': True}, + 'is_v3_enabled': {'required': True}, + } + + _attribute_map = { + 'site_id': {'key': 'siteId', 'type': 'str'}, + 'site_name': {'key': 'siteName', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'key2': {'key': 'key2', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_webchat_preview_enabled': {'key': 'isWebchatPreviewEnabled', 'type': 'bool'}, + '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]'}, + 'is_token_enabled': {'key': 'isTokenEnabled', 'type': 'bool'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + } + + def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, is_webchat_preview_enabled: bool=False, is_secure_site_enabled: bool=None, is_block_user_upload_enabled: bool=None, trusted_origins=None, is_token_enabled: bool=None, e_tag: str=None, **kwargs) -> None: + super(Site, self).__init__(**kwargs) + self.site_id = None + self.site_name = site_name + self.key = None + self.key2 = None + self.is_enabled = is_enabled + self.is_webchat_preview_enabled = is_webchat_preview_enabled + 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 + self.is_token_enabled = is_token_enabled + self.e_tag = e_tag + + class SiteInfo(Model): """Site information for WebChat or DirectLine Channels to identify which site to regenerate keys for. @@ -1429,8 +2236,17 @@ def __init__(self, *, name, **kwargs) -> None: class SkypeChannel(Channel): """Skype 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Skype channel @@ -1439,16 +2255,20 @@ class SkypeChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', '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, location: str=None, properties=None, **kwargs) -> None: + super(SkypeChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'SkypeChannel' @@ -1474,6 +2294,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 +2313,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,14 +2327,24 @@ 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 class SlackChannel(Channel): """Slack 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Slack channel @@ -1520,16 +2353,20 @@ class SlackChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(SlackChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(SlackChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'SlackChannel' @@ -1550,6 +2387,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 +2418,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 @@ -1605,8 +2446,17 @@ def __init__(self, *, is_enabled: bool, client_id: str=None, client_secret: str= class SmsChannel(Channel): """Sms 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Sms channel resource @@ -1614,16 +2464,20 @@ class SmsChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', '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, location: str=None, properties=None, **kwargs) -> None: + super(SmsChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'SmsChannel' @@ -1673,8 +2527,17 @@ def __init__(self, *, phone: str, account_sid: str, is_enabled: bool, auth_token class TelegramChannel(Channel): """Telegram 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Telegram channel @@ -1683,16 +2546,20 @@ class TelegramChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(TelegramChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(TelegramChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'TelegramChannel' @@ -1731,8 +2598,17 @@ def __init__(self, *, is_enabled: bool, access_token: str=None, is_validated: bo class WebChatChannel(Channel): """Web Chat 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 + :ivar provisioning_state: Provisioning state of the resource + :vartype provisioning_state: str + :param location: Specifies the location of the resource. + :type location: str :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Web Chat channel @@ -1741,16 +2617,20 @@ class WebChatChannel(Channel): """ _validation = { + 'provisioning_state': {'readonly': True}, 'channel_name': {'required': True}, } _attribute_map = { + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'channel_name': {'key': 'channelName', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, } - def __init__(self, *, properties=None, **kwargs) -> None: - super(WebChatChannel, self).__init__(**kwargs) + def __init__(self, *, etag: str=None, location: str=None, properties=None, **kwargs) -> None: + super(WebChatChannel, self).__init__(etag=etag, location=location, **kwargs) self.properties = properties self.channel_name = 'WebChatChannel' @@ -1803,9 +2683,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. Default value: False . + :type is_webchat_preview_enabled: bool """ _validation = { @@ -1814,7 +2694,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 +2703,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=False, **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 d169551a983b..12d4c3b24aba 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 892f8e5743d7..d2757c60bb46 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 ed00506f04bb..347611c389ca 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 5c083ba1aa78..aa7069078761 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 21d1a766a01d..1d52b77e359f 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 @@ -344,8 +344,8 @@ def list_with_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: BotChannel or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.botservice.models.BotChannel or + :return: ListChannelWithKeysResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ListChannelWithKeysResponse or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` @@ -383,7 +383,7 @@ def list_with_keys( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BotChannel', response) + deserialized = self._deserialize('ListChannelWithKeysResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) 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 3612cf149b5a..c9a64e2e6ebe 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 000000000000..2fa36c8ad5a2 --- /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 000000000000..10d9e3f00097 --- /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 1489465f9e7c..7ef3f948c158 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 000000000000..bf2c5b3226e2 --- /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 000000000000..1db319186c55 --- /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'}