diff --git a/azure-mgmt-botservice/HISTORY.rst b/azure-mgmt-botservice/HISTORY.rst index 8924d5d6c445..01567a69d8bd 100644 --- a/azure-mgmt-botservice/HISTORY.rst +++ b/azure-mgmt-botservice/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -0.1.0 (1970-01-01) +0.1.0 (2018-08-07) ++++++++++++++++++ * Initial Release diff --git a/azure-mgmt-botservice/README.rst b/azure-mgmt-botservice/README.rst index 091ce1ab13e3..cb807305b3e8 100644 --- a/azure-mgmt-botservice/README.rst +++ b/azure-mgmt-botservice/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Bot Service Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -37,7 +37,7 @@ Usage ===== For code examples, see `Bot Service -`__ +`__ on docs.microsoft.com. diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py b/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py index a3b1f8e9e3b6..7264c073950a 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py @@ -9,14 +9,14 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.bots_operations import BotsOperations -from .operations.bot_services_operations import BotServicesOperations from .operations.channels_operations import ChannelsOperations from .operations.operations import Operations +from .operations.bot_connection_operations import BotConnectionOperations from . import models @@ -52,7 +52,7 @@ def __init__( self.subscription_id = subscription_id -class AzureBotService(object): +class AzureBotService(SDKClient): """Azure Bot Service is a platform for creating smart conversational agents. :ivar config: Configuration for client. @@ -60,12 +60,12 @@ class AzureBotService(object): :ivar bots: Bots operations :vartype bots: azure.mgmt.botservice.operations.BotsOperations - :ivar bot_services: BotServices operations - :vartype bot_services: azure.mgmt.botservice.operations.BotServicesOperations :ivar channels: Channels operations :vartype channels: azure.mgmt.botservice.operations.ChannelsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.botservice.operations.Operations + :ivar bot_connection: BotConnection operations + :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -79,18 +79,18 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = AzureBotServiceConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + 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 = '2017-12-01' + self.api_version = '2018-07-12' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self.bots = BotsOperations( self._client, self.config, self._serialize, self._deserialize) - self.bot_services = BotServicesOperations( - self._client, self.config, self._serialize, self._deserialize) self.channels = ChannelsOperations( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.bot_connection = BotConnectionOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py index 5f741876394b..d1d07d8093e7 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py @@ -9,43 +9,98 @@ # regenerated. # -------------------------------------------------------------------------- -from .sku import Sku -from .resource import Resource -from .bot_properties import BotProperties -from .bot import Bot -from .channel import Channel -from .bot_channel import BotChannel -from .facebook_channel_properties import FacebookChannelProperties -from .facebook_channel import FacebookChannel -from .email_channel_properties import EmailChannelProperties -from .email_channel import EmailChannel -from .ms_teams_channel_properties import MsTeamsChannelProperties -from .ms_teams_channel import MsTeamsChannel -from .skype_channel_properties import SkypeChannelProperties -from .skype_channel import SkypeChannel -from .kik_channel_properties import KikChannelProperties -from .kik_channel import KikChannel -from .web_chat_site import WebChatSite -from .web_chat_channel_properties import WebChatChannelProperties -from .web_chat_channel import WebChatChannel -from .direct_line_site import DirectLineSite -from .direct_line_channel_properties import DirectLineChannelProperties -from .direct_line_channel import DirectLineChannel -from .telegram_channel_properties import TelegramChannelProperties -from .telegram_channel import TelegramChannel -from .sms_channel_properties import SmsChannelProperties -from .sms_channel import SmsChannel -from .slack_channel_properties import SlackChannelProperties -from .slack_channel import SlackChannel -from .error_body import ErrorBody -from .error import Error, ErrorException -from .operation_display_info import OperationDisplayInfo -from .operation_entity import OperationEntity -from .check_name_availability_request_body import CheckNameAvailabilityRequestBody -from .check_name_availability_response_body import CheckNameAvailabilityResponseBody +try: + from .sku_py3 import Sku + from .resource_py3 import Resource + from .bot_properties_py3 import BotProperties + from .bot_py3 import Bot + from .channel_py3 import Channel + from .bot_channel_py3 import BotChannel + from .facebook_page_py3 import FacebookPage + from .facebook_channel_properties_py3 import FacebookChannelProperties + from .facebook_channel_py3 import FacebookChannel + from .email_channel_properties_py3 import EmailChannelProperties + from .email_channel_py3 import EmailChannel + from .ms_teams_channel_properties_py3 import MsTeamsChannelProperties + from .ms_teams_channel_py3 import MsTeamsChannel + from .skype_channel_properties_py3 import SkypeChannelProperties + from .skype_channel_py3 import SkypeChannel + from .kik_channel_properties_py3 import KikChannelProperties + from .kik_channel_py3 import KikChannel + from .web_chat_site_py3 import WebChatSite + from .web_chat_channel_properties_py3 import WebChatChannelProperties + from .web_chat_channel_py3 import WebChatChannel + from .direct_line_site_py3 import DirectLineSite + from .direct_line_channel_properties_py3 import DirectLineChannelProperties + from .direct_line_channel_py3 import DirectLineChannel + from .telegram_channel_properties_py3 import TelegramChannelProperties + from .telegram_channel_py3 import TelegramChannel + from .sms_channel_properties_py3 import SmsChannelProperties + from .sms_channel_py3 import SmsChannel + from .slack_channel_properties_py3 import SlackChannelProperties + from .slack_channel_py3 import SlackChannel + from .connection_item_name_py3 import ConnectionItemName + from .connection_setting_parameter_py3 import ConnectionSettingParameter + from .connection_setting_properties_py3 import ConnectionSettingProperties + from .connection_setting_py3 import ConnectionSetting + from .service_provider_parameter_py3 import ServiceProviderParameter + from .service_provider_properties_py3 import ServiceProviderProperties + from .service_provider_py3 import ServiceProvider + from .service_provider_response_list_py3 import ServiceProviderResponseList + from .error_body_py3 import ErrorBody + from .error_py3 import Error, ErrorException + from .operation_display_info_py3 import OperationDisplayInfo + from .operation_entity_py3 import OperationEntity + from .check_name_availability_request_body_py3 import CheckNameAvailabilityRequestBody + from .check_name_availability_response_body_py3 import CheckNameAvailabilityResponseBody +except (SyntaxError, ImportError): + from .sku import Sku + from .resource import Resource + from .bot_properties import BotProperties + from .bot import Bot + from .channel import Channel + from .bot_channel import BotChannel + from .facebook_page import FacebookPage + from .facebook_channel_properties import FacebookChannelProperties + from .facebook_channel import FacebookChannel + from .email_channel_properties import EmailChannelProperties + from .email_channel import EmailChannel + from .ms_teams_channel_properties import MsTeamsChannelProperties + from .ms_teams_channel import MsTeamsChannel + from .skype_channel_properties import SkypeChannelProperties + from .skype_channel import SkypeChannel + from .kik_channel_properties import KikChannelProperties + from .kik_channel import KikChannel + from .web_chat_site import WebChatSite + from .web_chat_channel_properties import WebChatChannelProperties + from .web_chat_channel import WebChatChannel + from .direct_line_site import DirectLineSite + from .direct_line_channel_properties import DirectLineChannelProperties + from .direct_line_channel import DirectLineChannel + from .telegram_channel_properties import TelegramChannelProperties + from .telegram_channel import TelegramChannel + from .sms_channel_properties import SmsChannelProperties + from .sms_channel import SmsChannel + from .slack_channel_properties import SlackChannelProperties + from .slack_channel import SlackChannel + from .connection_item_name import ConnectionItemName + from .connection_setting_parameter import ConnectionSettingParameter + from .connection_setting_properties import ConnectionSettingProperties + from .connection_setting import ConnectionSetting + from .service_provider_parameter import ServiceProviderParameter + from .service_provider_properties import ServiceProviderProperties + from .service_provider import ServiceProvider + from .service_provider_response_list import ServiceProviderResponseList + from .error_body import ErrorBody + from .error import Error, ErrorException + from .operation_display_info import OperationDisplayInfo + from .operation_entity import OperationEntity + from .check_name_availability_request_body import CheckNameAvailabilityRequestBody + from .check_name_availability_response_body import CheckNameAvailabilityResponseBody from .bot_paged import BotPaged from .bot_channel_paged import BotChannelPaged from .operation_entity_paged import OperationEntityPaged +from .connection_setting_paged import ConnectionSettingPaged from .azure_bot_service_enums import ( SkuName, SkuTier, @@ -60,6 +115,7 @@ 'Bot', 'Channel', 'BotChannel', + 'FacebookPage', 'FacebookChannelProperties', 'FacebookChannel', 'EmailChannelProperties', @@ -82,6 +138,14 @@ 'SmsChannel', 'SlackChannelProperties', 'SlackChannel', + 'ConnectionItemName', + 'ConnectionSettingParameter', + 'ConnectionSettingProperties', + 'ConnectionSetting', + 'ServiceProviderParameter', + 'ServiceProviderProperties', + 'ServiceProvider', + 'ServiceProviderResponseList', 'ErrorBody', 'Error', 'ErrorException', 'OperationDisplayInfo', @@ -91,6 +155,7 @@ 'BotPaged', 'BotChannelPaged', 'OperationEntityPaged', + 'ConnectionSettingPaged', 'SkuName', 'SkuTier', 'Kind', diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/azure_bot_service_enums.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/azure_bot_service_enums.py index 7c7077a9a3a2..5e38bd762700 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/azure_bot_service_enums.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/azure_bot_service_enums.py @@ -12,19 +12,19 @@ from enum import Enum -class SkuName(Enum): +class SkuName(str, Enum): f0 = "F0" s1 = "S1" -class SkuTier(Enum): +class SkuTier(str, Enum): free = "Free" standard = "Standard" -class Kind(Enum): +class Kind(str, Enum): sdk = "sdk" designer = "designer" @@ -32,7 +32,15 @@ class Kind(Enum): function = "function" -class ChannelName(Enum): +class ChannelName(str, Enum): facebook_channel = "FacebookChannel" email_channel = "EmailChannel" + kik_channel = "KikChannel" + telegram_channel = "TelegramChannel" + slack_channel = "SlackChannel" + ms_teams_channel = "MsTeamsChannel" + skype_channel = "SkypeChannel" + web_chat_channel = "WebChatChannel" + direct_line_channel = "DirectLineChannel" + sms_channel = "SmsChannel" diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py index ec00bdc15815..3a43ec5e6e95 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py @@ -57,6 +57,6 @@ class Bot(Resource): 'properties': {'key': 'properties', 'type': 'BotProperties'}, } - def __init__(self, location=None, tags=None, sku=None, kind=None, etag=None, properties=None): - super(Bot, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag) - self.properties = properties + def __init__(self, **kwargs): + super(Bot, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py index 78b6439dcb7f..3211c236f2cf 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py @@ -57,6 +57,6 @@ class BotChannel(Resource): 'properties': {'key': 'properties', 'type': 'Channel'}, } - def __init__(self, location=None, tags=None, sku=None, kind=None, etag=None, properties=None): - super(BotChannel, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag) - self.properties = properties + def __init__(self, **kwargs): + super(BotChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py new file mode 100644 index 000000000000..430d49a369de --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class BotChannel(Resource): + """Bot channel resource definition. + + 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' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot channel resource + :type properties: ~azure.mgmt.botservice.models.Channel + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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'}, + 'properties': {'key': 'properties', 'type': 'Channel'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, **kwargs) -> None: + super(BotChannel, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py index 4b7e4251db5e..7a91b2e87f38 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py @@ -18,17 +18,19 @@ class BotProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param display_name: The Name of the bot + All required parameters must be populated in order to send to Azure. + + :param display_name: Required. The Name of the bot :type display_name: str :param description: The description of the bot :type description: str :param icon_url: The Icon Url of the bot :type icon_url: str - :param endpoint: The bot's endpoint + :param endpoint: Required. The bot's endpoint :type endpoint: str :ivar endpoint_version: The bot's endpoint version :vartype endpoint_version: str - :param msa_app_id: Microsoft App Id for the bot + :param msa_app_id: Required. Microsoft App Id for the bot :type msa_app_id: str :ivar configured_channels: Collection of channels for which the bot is configured @@ -74,17 +76,18 @@ class BotProperties(Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, } - def __init__(self, display_name, endpoint, msa_app_id, description=None, icon_url=None, developer_app_insight_key=None, developer_app_insights_api_key=None, developer_app_insights_application_id=None, luis_app_ids=None, luis_key=None): - self.display_name = display_name - self.description = description - self.icon_url = icon_url - self.endpoint = endpoint + def __init__(self, **kwargs): + super(BotProperties, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.icon_url = kwargs.get('icon_url', None) + self.endpoint = kwargs.get('endpoint', None) self.endpoint_version = None - self.msa_app_id = msa_app_id + self.msa_app_id = kwargs.get('msa_app_id', None) self.configured_channels = None self.enabled_channels = None - self.developer_app_insight_key = developer_app_insight_key - self.developer_app_insights_api_key = developer_app_insights_api_key - self.developer_app_insights_application_id = developer_app_insights_application_id - self.luis_app_ids = luis_app_ids - self.luis_key = luis_key + self.developer_app_insight_key = kwargs.get('developer_app_insight_key', None) + self.developer_app_insights_api_key = kwargs.get('developer_app_insights_api_key', None) + self.developer_app_insights_application_id = kwargs.get('developer_app_insights_application_id', None) + self.luis_app_ids = kwargs.get('luis_app_ids', None) + self.luis_key = kwargs.get('luis_key', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py new file mode 100644 index 000000000000..d96dbadf231a --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BotProperties(Model): + """The parameters to provide for the Bot. + + 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 display_name: Required. The Name of the bot + :type display_name: str + :param description: The description of the bot + :type description: str + :param icon_url: The Icon Url of the bot + :type icon_url: str + :param endpoint: Required. The bot's endpoint + :type endpoint: str + :ivar endpoint_version: The bot's endpoint version + :vartype endpoint_version: str + :param msa_app_id: Required. Microsoft App Id for the bot + :type msa_app_id: str + :ivar configured_channels: Collection of channels for which the bot is + configured + :vartype configured_channels: list[str] + :ivar enabled_channels: Collection of channels for which the bot is + enabled + :vartype enabled_channels: list[str] + :param developer_app_insight_key: The Application Insights key + :type developer_app_insight_key: str + :param developer_app_insights_api_key: The Application Insights Api Key + :type developer_app_insights_api_key: str + :param developer_app_insights_application_id: The Application Insights App + Id + :type developer_app_insights_application_id: str + :param luis_app_ids: Collection of LUIS App Ids + :type luis_app_ids: list[str] + :param luis_key: The LUIS Key + :type luis_key: str + """ + + _validation = { + 'display_name': {'required': True}, + 'endpoint': {'required': True}, + 'endpoint_version': {'readonly': True}, + 'msa_app_id': {'required': True}, + 'configured_channels': {'readonly': True}, + 'enabled_channels': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'endpoint_version': {'key': 'endpointVersion', 'type': 'str'}, + 'msa_app_id': {'key': 'msaAppId', 'type': 'str'}, + 'configured_channels': {'key': 'configuredChannels', 'type': '[str]'}, + 'enabled_channels': {'key': 'enabledChannels', 'type': '[str]'}, + 'developer_app_insight_key': {'key': 'developerAppInsightKey', 'type': 'str'}, + 'developer_app_insights_api_key': {'key': 'developerAppInsightsApiKey', 'type': 'str'}, + 'developer_app_insights_application_id': {'key': 'developerAppInsightsApplicationId', 'type': 'str'}, + 'luis_app_ids': {'key': 'luisAppIds', 'type': '[str]'}, + 'luis_key': {'key': 'luisKey', '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, **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.msa_app_id = msa_app_id + self.configured_channels = None + self.enabled_channels = None + self.developer_app_insight_key = developer_app_insight_key + self.developer_app_insights_api_key = developer_app_insights_api_key + self.developer_app_insights_application_id = developer_app_insights_application_id + self.luis_app_ids = luis_app_ids + self.luis_key = luis_key diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py new file mode 100644 index 000000000000..c68447077439 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class Bot(Resource): + """Bot resource definition. + + 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' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot resource + :type properties: ~azure.mgmt.botservice.models.BotProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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'}, + 'properties': {'key': 'properties', 'type': 'BotProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, **kwargs) -> None: + super(Bot, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/channel.py index d6b04cf2f463..fb953483c7d5 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/channel.py @@ -20,7 +20,9 @@ class Channel(Model): SkypeChannel, KikChannel, WebChatChannel, DirectLineChannel, TelegramChannel, SmsChannel, SlackChannel - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str """ @@ -36,5 +38,6 @@ class Channel(Model): 'channel_name': {'FacebookChannel': 'FacebookChannel', 'EmailChannel': 'EmailChannel', 'MsTeamsChannel': 'MsTeamsChannel', 'SkypeChannel': 'SkypeChannel', 'KikChannel': 'KikChannel', 'WebChatChannel': 'WebChatChannel', 'DirectLineChannel': 'DirectLineChannel', 'TelegramChannel': 'TelegramChannel', 'SmsChannel': 'SmsChannel', 'SlackChannel': 'SlackChannel'} } - def __init__(self): + def __init__(self, **kwargs): + super(Channel, self).__init__(**kwargs) self.channel_name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/channel_py3.py new file mode 100644 index 000000000000..a1194366b5b8 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/channel_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Channel(Model): + """Channel definition. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FacebookChannel, EmailChannel, MsTeamsChannel, + SkypeChannel, KikChannel, WebChatChannel, DirectLineChannel, + TelegramChannel, SmsChannel, SlackChannel + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + } + + _subtype_map = { + 'channel_name': {'FacebookChannel': 'FacebookChannel', 'EmailChannel': 'EmailChannel', 'MsTeamsChannel': 'MsTeamsChannel', 'SkypeChannel': 'SkypeChannel', 'KikChannel': 'KikChannel', 'WebChatChannel': 'WebChatChannel', 'DirectLineChannel': 'DirectLineChannel', 'TelegramChannel': 'TelegramChannel', 'SmsChannel': 'SmsChannel', 'SlackChannel': 'SlackChannel'} + } + + def __init__(self, **kwargs) -> None: + super(Channel, self).__init__(**kwargs) + self.channel_name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py index 7c78f2e00d5a..ff60cb427088 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py @@ -29,6 +29,7 @@ class CheckNameAvailabilityRequestBody(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, name=None, type=None): - self.name = name - self.type = type + def __init__(self, **kwargs): + super(CheckNameAvailabilityRequestBody, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py new file mode 100644 index 000000000000..809427793ead --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityRequestBody(Model): + """The request body for a request to Bot Service Management to check + availability of a bot name. + + :param name: the name of the bot for which availability needs to be + checked. + :type name: str + :param type: the type of the bot for which availability needs to be + checked + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: + super(CheckNameAvailabilityRequestBody, self).__init__(**kwargs) + self.name = name + self.type = type diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body.py index 4e1313f2f5e3..093eef2cc2aa 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body.py @@ -28,6 +28,7 @@ class CheckNameAvailabilityResponseBody(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, valid=None, message=None): - self.valid = valid - self.message = message + def __init__(self, **kwargs): + super(CheckNameAvailabilityResponseBody, self).__init__(**kwargs) + self.valid = kwargs.get('valid', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body_py3.py new file mode 100644 index 000000000000..0978b932dd61 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_response_body_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class CheckNameAvailabilityResponseBody(Model): + """The response body returned for a request to Bot Service Management to check + availability of a bot name. + + :param valid: indicates if the bot name is valid. + :type valid: bool + :param message: additional message from the bot management api showing why + a bot name is not available + :type message: str + """ + + _attribute_map = { + 'valid': {'key': 'valid', 'type': 'bool'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, valid: bool=None, message: str=None, **kwargs) -> None: + super(CheckNameAvailabilityResponseBody, self).__init__(**kwargs) + self.valid = valid + self.message = message diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py new file mode 100644 index 000000000000..bcf5c18f0e66 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionItemName(Model): + """The display name of a connection Item Setting registered with the Bot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Connection Item name that has been added in the API + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionItemName, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py new file mode 100644 index 000000000000..90a58e610be9 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionItemName(Model): + """The display name of a connection Item Setting registered with the Bot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Connection Item name that has been added in the API + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectionItemName, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py new file mode 100644 index 000000000000..dec1cdc63118 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ConnectionSetting(Resource): + """Bot channel resource definition. + + 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' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot channel resource + :type properties: + ~azure.mgmt.botservice.models.ConnectionSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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'}, + 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, + } + + def __init__(self, **kwargs): + super(ConnectionSetting, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py new file mode 100644 index 000000000000..5708e4ee7ee3 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConnectionSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectionSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectionSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectionSettingPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py new file mode 100644 index 000000000000..b0fb3703d0a7 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingParameter(Model): + """Extra Parameter in a Connection Setting Properties to indicate service + provider specific properties. + + :param key: Key for the Connection Setting Parameter. + :type key: str + :param value: Value associated with the Connection Setting Parameter. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionSettingParameter, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py new file mode 100644 index 000000000000..9126c281f852 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingParameter(Model): + """Extra Parameter in a Connection Setting Properties to indicate service + provider specific properties. + + :param key: Key for the Connection Setting Parameter. + :type key: str + :param value: Value associated with the Connection Setting Parameter. + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None: + super(ConnectionSettingParameter, self).__init__(**kwargs) + self.key = key + self.value = value diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py new file mode 100644 index 000000000000..fca31c7edef0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingProperties(Model): + """Properties for a Connection Setting Item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 + Setting. + :vartype setting_id: str + :param client_secret: Client Secret associated with the Connection Setting + :type client_secret: str + :param scopes: Scopes associated with the Connection Setting + :type scopes: str + :param service_provider_id: Service Provider Id associated with the + Connection Setting + :type service_provider_id: str + :param service_provider_display_name: Service Provider Display Name + associated with the Connection Setting + :type service_provider_display_name: str + :param parameters: Service Provider Parameters associated with the + Connection Setting + :type parameters: + list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + """ + + _validation = { + 'setting_id': {'readonly': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'setting_id': {'key': 'settingId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, + 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, + 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + } + + def __init__(self, **kwargs): + super(ConnectionSettingProperties, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.setting_id = None + self.client_secret = kwargs.get('client_secret', None) + self.scopes = kwargs.get('scopes', None) + 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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py new file mode 100644 index 000000000000..89613382f22a --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py @@ -0,0 +1,64 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingProperties(Model): + """Properties for a Connection Setting Item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 + Setting. + :vartype setting_id: str + :param client_secret: Client Secret associated with the Connection Setting + :type client_secret: str + :param scopes: Scopes associated with the Connection Setting + :type scopes: str + :param service_provider_id: Service Provider Id associated with the + Connection Setting + :type service_provider_id: str + :param service_provider_display_name: Service Provider Display Name + associated with the Connection Setting + :type service_provider_display_name: str + :param parameters: Service Provider Parameters associated with the + Connection Setting + :type parameters: + list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + """ + + _validation = { + 'setting_id': {'readonly': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'setting_id': {'key': 'settingId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, + 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, + 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + } + + 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: + super(ConnectionSettingProperties, self).__init__(**kwargs) + self.client_id = client_id + self.setting_id = None + self.client_secret = client_secret + self.scopes = scopes + self.service_provider_id = service_provider_id + self.service_provider_display_name = service_provider_display_name + self.parameters = parameters diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py new file mode 100644 index 000000000000..12ab93de6219 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ConnectionSetting(Resource): + """Bot channel resource definition. + + 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' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot channel resource + :type properties: + ~azure.mgmt.botservice.models.ConnectionSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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'}, + 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, **kwargs) -> None: + super(ConnectionSetting, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.py index 43af144b6f01..dc1ed1782c6a 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.py @@ -15,7 +15,9 @@ class DirectLineChannel(Channel): """Direct Line channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Direct Line channel resource @@ -32,7 +34,7 @@ class DirectLineChannel(Channel): 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, } - def __init__(self, properties=None): - super(DirectLineChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(DirectLineChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'DirectLineChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.py index 537e8b44ea9c..67bcd592ff78 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.py @@ -23,5 +23,6 @@ class DirectLineChannelProperties(Model): 'sites': {'key': 'sites', 'type': '[DirectLineSite]'}, } - def __init__(self, sites=None): - self.sites = sites + def __init__(self, **kwargs): + super(DirectLineChannelProperties, self).__init__(**kwargs) + self.sites = kwargs.get('sites', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties_py3.py new file mode 100644 index 000000000000..a3741aa64ab3 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DirectLineChannelProperties(Model): + """The parameters to provide for the Direct Line channel. + + :param sites: The list of Direct Line sites + :type sites: list[~azure.mgmt.botservice.models.DirectLineSite] + """ + + _attribute_map = { + 'sites': {'key': 'sites', 'type': '[DirectLineSite]'}, + } + + def __init__(self, *, sites=None, **kwargs) -> None: + super(DirectLineChannelProperties, self).__init__(**kwargs) + self.sites = sites diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py new file mode 100644 index 000000000000..069885574a54 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class DirectLineChannel(Channel): + """Direct Line channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Direct Line channel + resource + :type properties: + ~azure.mgmt.botservice.models.DirectLineChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DirectLineChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(DirectLineChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'DirectLineChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py index 3cf031dbf261..402594c1d43c 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py @@ -18,21 +18,26 @@ class DirectLineSite(Model): 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: Site name + :param site_name: Required. Site name :type site_name: str - :ivar key: Primary key + :ivar key: Primary key. Value only returned through POST to the action + Channel List API, otherwise empty. :vartype key: str - :ivar key2: Secondary key + :ivar key2: Secondary key. Value only returned through POST to the action + Channel List API, otherwise empty. :vartype key2: str - :param is_enabled: Whether this site is enabled for DirectLine channel + :param is_enabled: Required. Whether this site is enabled for DirectLine + channel :type is_enabled: bool - :param is_v1_enabled: Whether this site is enabled for Bot Framework V1 - protocol + :param is_v1_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol :type is_v1_enabled: bool - :param is_v3_enabled: Whether this site is enabled for Bot Framework V1 - protocol + :param is_v3_enabled: Required. Whether this site is enabled for Bot + Framework V1 protocol :type is_v3_enabled: bool """ @@ -56,11 +61,12 @@ class DirectLineSite(Model): 'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'}, } - def __init__(self, site_name, is_enabled, is_v1_enabled, is_v3_enabled): + def __init__(self, **kwargs): + super(DirectLineSite, self).__init__(**kwargs) self.site_id = None - self.site_name = site_name + self.site_name = kwargs.get('site_name', None) self.key = None self.key2 = None - self.is_enabled = is_enabled - self.is_v1_enabled = is_v1_enabled - self.is_v3_enabled = is_v3_enabled + self.is_enabled = kwargs.get('is_enabled', None) + self.is_v1_enabled = kwargs.get('is_v1_enabled', None) + self.is_v3_enabled = kwargs.get('is_v3_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site_py3.py new file mode 100644 index 000000000000..d73e6d401e53 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site_py3.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DirectLineSite(Model): + """A site for the Direct Line 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_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 + """ + + _validation = { + 'site_id': {'readonly': True}, + 'site_name': {'required': True}, + 'key': {'readonly': True}, + 'key2': {'readonly': True}, + 'is_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_v1_enabled': {'key': 'isV1Enabled', 'type': 'bool'}, + 'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'}, + } + + def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, **kwargs) -> None: + super(DirectLineSite, 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_v1_enabled = is_v1_enabled + self.is_v3_enabled = is_v3_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.py index d8b1cf9f46a9..d398a52ffcbe 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.py @@ -15,7 +15,9 @@ class EmailChannel(Channel): """Email channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to email channel resource @@ -31,7 +33,7 @@ class EmailChannel(Channel): 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, } - def __init__(self, properties=None): - super(EmailChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(EmailChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'EmailChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.py index cbf2197c474b..3c970507b075 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.py @@ -15,11 +15,14 @@ class EmailChannelProperties(Model): """The parameters to provide for the Email channel. - :param email_address: The email address + All required parameters must be populated in order to send to Azure. + + :param email_address: Required. The email address :type email_address: str - :param password: The password for the email address + :param password: Required. The password for the email address. Value only + returned through POST to the action Channel List API, otherwise empty. :type password: str - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -35,7 +38,8 @@ class EmailChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, email_address, password, is_enabled): - self.email_address = email_address - self.password = password - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(EmailChannelProperties, self).__init__(**kwargs) + self.email_address = kwargs.get('email_address', None) + self.password = kwargs.get('password', None) + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties_py3.py new file mode 100644 index 000000000000..b4fd0ddcb684 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class EmailChannelProperties(Model): + """The parameters to provide for the Email channel. + + All required parameters must be populated in order to send to Azure. + + :param email_address: Required. The email address + :type email_address: str + :param password: Required. The password for the email address. Value only + returned through POST to the action Channel List API, otherwise empty. + :type password: str + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'email_address': {'required': True}, + 'password': {'required': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, email_address: str, password: str, is_enabled: bool, **kwargs) -> None: + super(EmailChannelProperties, self).__init__(**kwargs) + self.email_address = email_address + self.password = password + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py new file mode 100644 index 000000000000..7a9e9af59e74 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class EmailChannel(Channel): + """Email channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to email channel + resource + :type properties: ~azure.mgmt.botservice.models.EmailChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'EmailChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(EmailChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'EmailChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/error.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/error.py index 019e466cd621..5e0c7ee93e3f 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/error.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/error.py @@ -24,8 +24,9 @@ class Error(Model): 'error': {'key': 'error', 'type': 'ErrorBody'}, } - def __init__(self, error=None): - self.error = error + def __init__(self, **kwargs): + super(Error, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorException(HttpOperationError): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body.py index 926be9c3b948..f10254873280 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body.py @@ -15,9 +15,11 @@ class ErrorBody(Model): """Bot Service error body. - :param code: error code + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code :type code: str - :param message: error message + :param message: Required. error message :type message: str """ @@ -31,6 +33,7 @@ class ErrorBody(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code, message): - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body_py3.py new file mode 100644 index 000000000000..3b3f878af285 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_body_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ErrorBody(Model): + """Bot Service error body. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code + :type code: str + :param message: Required. error message + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/error_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_py3.py new file mode 100644 index 000000000000..cee9d2eb7904 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/error_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class Error(Model): + """Bot Service error object. + + :param error: The error body. + :type error: ~azure.mgmt.botservice.models.ErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(Error, self).__init__(**kwargs) + self.error = error + + +class ErrorException(HttpOperationError): + """Server responsed with exception of type: 'Error'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorException, self).__init__(deserialize, response, 'Error', *args) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py index b253e2fb1f49..fbb18f5a8cd9 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py @@ -15,7 +15,9 @@ class FacebookChannel(Channel): """Facebook channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to bot facebook channel :type properties: ~azure.mgmt.botservice.models.FacebookChannelProperties @@ -30,7 +32,7 @@ class FacebookChannel(Channel): 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, } - def __init__(self, properties=None): - super(FacebookChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(FacebookChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'FacebookChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.py index d37ace5ab6aa..934885b5b4f9 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.py @@ -18,25 +18,26 @@ class FacebookChannelProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar verify_token: Verify token + All required parameters must be populated in order to send to Azure. + + :ivar verify_token: Verify token. Value only returned through POST to the + action Channel List API, otherwise empty. :vartype verify_token: str - :param page_id: Page id - :type page_id: str - :param app_id: Facebook application id + :param pages: The list of Facebook pages + :type pages: list[~azure.mgmt.botservice.models.FacebookPage] + :param app_id: Required. Facebook application id :type app_id: str - :param app_secret: Facebook application secret + :param app_secret: Required. Facebook application secret. Value only + returned through POST to the action Channel List API, otherwise empty. :type app_secret: str - :param access_token: Facebook application access token - :type access_token: str :ivar callback_url: Callback Url :vartype callback_url: str - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ _validation = { 'verify_token': {'readonly': True}, - 'page_id': {'required': True}, 'app_id': {'required': True}, 'app_secret': {'required': True}, 'callback_url': {'readonly': True}, @@ -45,19 +46,18 @@ class FacebookChannelProperties(Model): _attribute_map = { 'verify_token': {'key': 'verifyToken', 'type': 'str'}, - 'page_id': {'key': 'pageId', 'type': 'str'}, + 'pages': {'key': 'pages', 'type': '[FacebookPage]'}, 'app_id': {'key': 'appId', 'type': 'str'}, 'app_secret': {'key': 'appSecret', 'type': 'str'}, - 'access_token': {'key': 'accessToken', 'type': 'str'}, 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, page_id, app_id, app_secret, is_enabled, access_token=None): + def __init__(self, **kwargs): + super(FacebookChannelProperties, self).__init__(**kwargs) self.verify_token = None - self.page_id = page_id - self.app_id = app_id - self.app_secret = app_secret - self.access_token = access_token + self.pages = kwargs.get('pages', None) + self.app_id = kwargs.get('app_id', None) + self.app_secret = kwargs.get('app_secret', None) self.callback_url = None - self.is_enabled = is_enabled + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties_py3.py new file mode 100644 index 000000000000..3dd59c2216be --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FacebookChannelProperties(Model): + """The parameters to provide for the Facebook 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 verify_token: Verify token. Value only returned through POST to the + action Channel List API, otherwise empty. + :vartype verify_token: str + :param pages: The list of Facebook pages + :type pages: list[~azure.mgmt.botservice.models.FacebookPage] + :param app_id: Required. Facebook application id + :type app_id: str + :param app_secret: Required. Facebook application secret. Value only + returned through POST to the action Channel List API, otherwise empty. + :type app_secret: str + :ivar callback_url: Callback Url + :vartype callback_url: str + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'verify_token': {'readonly': True}, + 'app_id': {'required': True}, + 'app_secret': {'required': True}, + 'callback_url': {'readonly': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'verify_token': {'key': 'verifyToken', 'type': 'str'}, + 'pages': {'key': 'pages', 'type': '[FacebookPage]'}, + 'app_id': {'key': 'appId', 'type': 'str'}, + 'app_secret': {'key': 'appSecret', 'type': 'str'}, + 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, app_id: str, app_secret: str, is_enabled: bool, pages=None, **kwargs) -> None: + super(FacebookChannelProperties, self).__init__(**kwargs) + self.verify_token = None + self.pages = pages + self.app_id = app_id + self.app_secret = app_secret + self.callback_url = None + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py new file mode 100644 index 000000000000..ec43910d6288 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class FacebookChannel(Channel): + """Facebook channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to bot facebook channel + :type properties: ~azure.mgmt.botservice.models.FacebookChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'FacebookChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(FacebookChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'FacebookChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page.py new file mode 100644 index 000000000000..d166751656d2 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FacebookPage(Model): + """A Facebook page for Facebook channel registration. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Page id + :type id: str + :param access_token: Required. Facebook application access token. Value + only returned through POST to the action Channel List API, otherwise + empty. + :type access_token: str + """ + + _validation = { + 'id': {'required': True}, + 'access_token': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(FacebookPage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.access_token = kwargs.get('access_token', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page_py3.py new file mode 100644 index 000000000000..a0045ba8c742 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_page_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FacebookPage(Model): + """A Facebook page for Facebook channel registration. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Page id + :type id: str + :param access_token: Required. Facebook application access token. Value + only returned through POST to the action Channel List API, otherwise + empty. + :type access_token: str + """ + + _validation = { + 'id': {'required': True}, + 'access_token': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'access_token': {'key': 'accessToken', 'type': 'str'}, + } + + def __init__(self, *, id: str, access_token: str, **kwargs) -> None: + super(FacebookPage, self).__init__(**kwargs) + self.id = id + self.access_token = access_token diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py index e3fe47a1b214..491802b33a1e 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py @@ -15,7 +15,9 @@ class KikChannel(Channel): """Kik channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Kik channel resource :type properties: ~azure.mgmt.botservice.models.KikChannelProperties @@ -30,7 +32,7 @@ class KikChannel(Channel): 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, } - def __init__(self, properties=None): - super(KikChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(KikChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'KikChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py index 8a12161f37c1..63a07f3ee87e 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py @@ -15,13 +15,16 @@ class KikChannelProperties(Model): """The parameters to provide for the Kik channel. - :param user_name: The Kik user name + All required parameters must be populated in order to send to Azure. + + :param user_name: Required. The Kik user name :type user_name: str - :param api_key: Kik API key + :param api_key: Required. Kik API key. Value only returned through POST to + the action Channel List API, otherwise empty. :type api_key: str :param is_validated: Whether this channel is validated for the bot :type is_validated: bool - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -38,8 +41,9 @@ class KikChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, user_name, api_key, is_enabled, is_validated=None): - self.user_name = user_name - self.api_key = api_key - self.is_validated = is_validated - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(KikChannelProperties, self).__init__(**kwargs) + self.user_name = kwargs.get('user_name', None) + self.api_key = kwargs.get('api_key', None) + self.is_validated = kwargs.get('is_validated', None) + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties_py3.py new file mode 100644 index 000000000000..ee17a9af670b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class KikChannelProperties(Model): + """The parameters to provide for the Kik channel. + + All required parameters must be populated in order to send to Azure. + + :param user_name: Required. The Kik user name + :type user_name: str + :param api_key: Required. Kik API key. Value only returned through POST to + the action Channel List API, otherwise empty. + :type api_key: str + :param is_validated: Whether this channel is validated for the bot + :type is_validated: bool + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'user_name': {'required': True}, + 'api_key': {'required': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'api_key': {'key': 'apiKey', 'type': 'str'}, + 'is_validated': {'key': 'isValidated', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, user_name: str, api_key: str, is_enabled: bool, is_validated: bool=None, **kwargs) -> None: + super(KikChannelProperties, self).__init__(**kwargs) + self.user_name = user_name + self.api_key = api_key + self.is_validated = is_validated + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py new file mode 100644 index 000000000000..9cfbff1611bf --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class KikChannel(Channel): + """Kik channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Kik channel resource + :type properties: ~azure.mgmt.botservice.models.KikChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'KikChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(KikChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'KikChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.py index c5a9c0b932e0..9ae44eaa130b 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.py @@ -15,7 +15,9 @@ class MsTeamsChannel(Channel): """Microsoft Teams channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Microsoft Teams channel resource @@ -31,7 +33,7 @@ class MsTeamsChannel(Channel): 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, } - def __init__(self, properties=None): - super(MsTeamsChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(MsTeamsChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'MsTeamsChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py index 51bbe2bbed2f..8662da90b46c 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py @@ -15,17 +15,13 @@ class MsTeamsChannelProperties(Model): """The parameters to provide for the Microsoft Teams channel. - :param enable_messaging: Enable messaging for Microsoft Teams channel - :type enable_messaging: bool - :param enable_media_cards: Enable media cards for Microsoft Teams channel - :type enable_media_cards: bool - :param enable_video: Enable video for Microsoft Teams channel - :type enable_video: bool + All required parameters must be populated in order to send to Azure. + :param enable_calling: Enable calling for Microsoft Teams channel :type enable_calling: bool - :param call_mode: Enable messaging for Microsoft Teams channel - :type call_mode: str - :param is_enabled: Whether this channel is enabled for the bot + :param calling_web_hook: Webhook for Microsoft Teams channel calls + :type calling_web_hook: str + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -34,18 +30,13 @@ class MsTeamsChannelProperties(Model): } _attribute_map = { - 'enable_messaging': {'key': 'enableMessaging', 'type': 'bool'}, - 'enable_media_cards': {'key': 'enableMediaCards', 'type': 'bool'}, - 'enable_video': {'key': 'enableVideo', 'type': 'bool'}, 'enable_calling': {'key': 'enableCalling', 'type': 'bool'}, - 'call_mode': {'key': 'callMode', 'type': 'str'}, + 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, is_enabled, enable_messaging=None, enable_media_cards=None, enable_video=None, enable_calling=None, call_mode=None): - self.enable_messaging = enable_messaging - self.enable_media_cards = enable_media_cards - self.enable_video = enable_video - self.enable_calling = enable_calling - self.call_mode = call_mode - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(MsTeamsChannelProperties, self).__init__(**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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties_py3.py new file mode 100644 index 000000000000..5051297c3e63 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties_py3.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class MsTeamsChannelProperties(Model): + """The parameters to provide for the Microsoft Teams channel. + + All required parameters must be populated in order to send to Azure. + + :param enable_calling: Enable calling for Microsoft Teams channel + :type enable_calling: bool + :param calling_web_hook: Webhook for Microsoft Teams channel calls + :type calling_web_hook: str + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'enable_calling': {'key': 'enableCalling', 'type': 'bool'}, + 'calling_web_hook': {'key': 'callingWebHook', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, is_enabled: bool, enable_calling: bool=None, calling_web_hook: str=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 diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_py3.py new file mode 100644 index 000000000000..b683d051282b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class MsTeamsChannel(Channel): + """Microsoft Teams channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Microsoft Teams + channel resource + :type properties: ~azure.mgmt.botservice.models.MsTeamsChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'MsTeamsChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(MsTeamsChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'MsTeamsChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info.py index 4be59cd2d4b6..33cad37365ce 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info.py @@ -33,8 +33,9 @@ class OperationDisplayInfo(Model): 'resource': {'key': 'resource', 'type': 'str'}, } - def __init__(self, description=None, operation=None, provider=None, resource=None): - self.description = description - self.operation = operation - self.provider = provider - self.resource = resource + def __init__(self, **kwargs): + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info_py3.py new file mode 100644 index 000000000000..b136b8bdccf0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_display_info_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplayInfo(Model): + """The operation supported by Bot Service Management. + + :param description: The description of the operation. + :type description: str + :param operation: The action that users can perform, based on their + permission level. + :type operation: str + :param provider: Service provider: Microsoft Bot Service. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__(self, *, description: str=None, operation: str=None, provider: str=None, resource: str=None, **kwargs) -> None: + super(OperationDisplayInfo, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity.py index 37922e24676b..bb886b0f762b 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity.py @@ -32,8 +32,9 @@ class OperationEntity(Model): 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, name=None, display=None, origin=None, properties=None): - self.name = name - self.display = display - self.origin = origin - self.properties = properties + def __init__(self, **kwargs): + super(OperationEntity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity_py3.py new file mode 100644 index 000000000000..95bff1f76590 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/operation_entity_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationEntity(Model): + """The operations supported by Bot Service Management. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The operation supported by Bot Service Management. + :type display: ~azure.mgmt.botservice.models.OperationDisplayInfo + :param origin: The origin of the operation. + :type origin: str + :param properties: Additional properties. + :type properties: object + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayInfo'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(OperationEntity, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/resource.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/resource.py index 668f18a1c16c..cf9218331460 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/resource.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/resource.py @@ -54,12 +54,13 @@ class Resource(Model): 'etag': {'key': 'etag', 'type': 'str'}, } - def __init__(self, location=None, tags=None, sku=None, kind=None, etag=None): + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.location = location + self.location = kwargs.get('location', None) self.type = None - self.tags = tags - self.sku = sku - self.kind = kind - self.etag = etag + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.kind = kwargs.get('kind', None) + self.etag = kwargs.get('etag', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/resource_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/resource_py3.py new file mode 100644 index 000000000000..ee1377c1ce4b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/resource_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """Azure resource. + + 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' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'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'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = location + self.type = None + self.tags = tags + self.sku = sku + self.kind = kind + self.etag = etag diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py new file mode 100644 index 000000000000..cf50bec2ae1f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProvider(Model): + """Service Provider Definition. + + :param properties: The Properties of a Service Provider Object + :type properties: ~azure.mgmt.botservice.models.ServiceProviderProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceProviderProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceProvider, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py new file mode 100644 index 000000000000..e72f95f1b8e8 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderParameter(Model): + """Extra Parameters specific to each Service Provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the Service Provider + :vartype name: str + :ivar type: Type of the Service Provider + :vartype type: str + :ivar display_name: Display Name of the Service Provider + :vartype display_name: str + :ivar description: Description of the Service Provider + :vartype description: str + :ivar help_url: Help Url for the Service Provider + :vartype help_url: str + :ivar default: Default Name for the Service Provider + :vartype default: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'help_url': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderParameter, self).__init__(**kwargs) + self.name = None + self.type = None + self.display_name = None + self.description = None + self.help_url = None + self.default = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py new file mode 100644 index 000000000000..7d1f5664af8c --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderParameter(Model): + """Extra Parameters specific to each Service Provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the Service Provider + :vartype name: str + :ivar type: Type of the Service Provider + :vartype type: str + :ivar display_name: Display Name of the Service Provider + :vartype display_name: str + :ivar description: Description of the Service Provider + :vartype description: str + :ivar help_url: Help Url for the Service Provider + :vartype help_url: str + :ivar default: Default Name for the Service Provider + :vartype default: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'help_url': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceProviderParameter, self).__init__(**kwargs) + self.name = None + self.type = None + self.display_name = None + self.description = None + self.help_url = None + self.default = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py new file mode 100644 index 000000000000..4062224d5c7d --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderProperties(Model): + """The Object used to describe a Service Provider supported by Bot Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id for Service Provider + :vartype id: str + :ivar display_name: Diplay Name of the Service Provider + :vartype display_name: str + :ivar service_provider_name: Diplay Name of the Service Provider + :vartype service_provider_name: str + :ivar dev_portal_url: Diplay Name of the Service Provider + :vartype dev_portal_url: str + :ivar icon_url: Diplay Name of the Service Provider + :vartype icon_url: str + :param parameters: The list of parameters for the Service Provider + :type parameters: + list[~azure.mgmt.botservice.models.ServiceProviderParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'service_provider_name': {'readonly': True}, + 'dev_portal_url': {'readonly': True}, + 'icon_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'dev_portal_url': {'key': 'devPortalUrl', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ServiceProviderParameter]'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderProperties, self).__init__(**kwargs) + self.id = None + self.display_name = None + self.service_provider_name = None + self.dev_portal_url = None + self.icon_url = None + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py new file mode 100644 index 000000000000..7272cb31422f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderProperties(Model): + """The Object used to describe a Service Provider supported by Bot Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id for Service Provider + :vartype id: str + :ivar display_name: Diplay Name of the Service Provider + :vartype display_name: str + :ivar service_provider_name: Diplay Name of the Service Provider + :vartype service_provider_name: str + :ivar dev_portal_url: Diplay Name of the Service Provider + :vartype dev_portal_url: str + :ivar icon_url: Diplay Name of the Service Provider + :vartype icon_url: str + :param parameters: The list of parameters for the Service Provider + :type parameters: + list[~azure.mgmt.botservice.models.ServiceProviderParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'service_provider_name': {'readonly': True}, + 'dev_portal_url': {'readonly': True}, + 'icon_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'dev_portal_url': {'key': 'devPortalUrl', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ServiceProviderParameter]'}, + } + + def __init__(self, *, parameters=None, **kwargs) -> None: + super(ServiceProviderProperties, self).__init__(**kwargs) + self.id = None + self.display_name = None + self.service_provider_name = None + self.dev_portal_url = None + self.icon_url = None + self.parameters = parameters diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py new file mode 100644 index 000000000000..86ee2d94e5d0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProvider(Model): + """Service Provider Definition. + + :param properties: The Properties of a Service Provider Object + :type properties: ~azure.mgmt.botservice.models.ServiceProviderProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceProviderProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(ServiceProvider, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py new file mode 100644 index 000000000000..4d2ab214edb0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderResponseList(Model): + """The list of bot service service providers response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param next_link: The link used to get the next page of bot service + service providers. + :type next_link: str + :ivar value: Gets the list of bot service service providers and their + properties. + :vartype value: list[~azure.mgmt.botservice.models.ServiceProvider] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ServiceProvider]'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderResponseList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py new file mode 100644 index 000000000000..207afd213bc6 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderResponseList(Model): + """The list of bot service service providers response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param next_link: The link used to get the next page of bot service + service providers. + :type next_link: str + :ivar value: Gets the list of bot service service providers and their + properties. + :vartype value: list[~azure.mgmt.botservice.models.ServiceProvider] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ServiceProvider]'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(ServiceProviderResponseList, self).__init__(**kwargs) + self.next_link = next_link + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py index 35fa9c142249..e06cf94ad50c 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py @@ -18,7 +18,9 @@ class Sku(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param name: The sku name. Possible values include: 'F0', 'S1' + All required parameters must be populated in order to send to Azure. + + :param name: Required. The sku name. Possible values include: 'F0', 'S1' :type name: str or ~azure.mgmt.botservice.models.SkuName :ivar tier: Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard' @@ -35,6 +37,7 @@ class Sku(Model): 'tier': {'key': 'tier', 'type': 'str'}, } - def __init__(self, name): - self.name = name + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) self.tier = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py new file mode 100644 index 000000000000..76b5c0fc7993 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Sku(Model): + """The SKU of the cognitive services account. + + 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 name: Required. The sku name. Possible values include: 'F0', 'S1' + :type name: str or ~azure.mgmt.botservice.models.SkuName + :ivar tier: Gets the sku tier. This is based on the SKU name. Possible + values include: 'Free', 'Standard' + :vartype tier: str or ~azure.mgmt.botservice.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__(self, *, name, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.py index f9c12c31dd01..4c30e874de49 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.py @@ -15,7 +15,9 @@ class SkypeChannel(Channel): """Skype channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Skype channel resource @@ -31,7 +33,7 @@ class SkypeChannel(Channel): 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, } - def __init__(self, properties=None): - super(SkypeChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(SkypeChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'SkypeChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.py index 582d94c48697..aa9c20f0b6cd 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.py @@ -15,6 +15,8 @@ class SkypeChannelProperties(Model): """The parameters to provide for the Microsoft Teams channel. + All required parameters must be populated in order to send to Azure. + :param enable_messaging: Enable messaging for Skype channel :type enable_messaging: bool :param enable_media_cards: Enable media cards for Skype channel @@ -31,7 +33,7 @@ class SkypeChannelProperties(Model): :type groups_mode: str :param calling_web_hook: Calling web hook for Skype channel :type calling_web_hook: str - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -51,13 +53,14 @@ class SkypeChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, is_enabled, enable_messaging=None, enable_media_cards=None, enable_video=None, enable_calling=None, enable_screen_sharing=None, enable_groups=None, groups_mode=None, calling_web_hook=None): - self.enable_messaging = enable_messaging - self.enable_media_cards = enable_media_cards - self.enable_video = enable_video - self.enable_calling = enable_calling - self.enable_screen_sharing = enable_screen_sharing - self.enable_groups = enable_groups - self.groups_mode = groups_mode - self.calling_web_hook = calling_web_hook - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(SkypeChannelProperties, self).__init__(**kwargs) + self.enable_messaging = kwargs.get('enable_messaging', None) + self.enable_media_cards = kwargs.get('enable_media_cards', None) + self.enable_video = kwargs.get('enable_video', None) + self.enable_calling = kwargs.get('enable_calling', None) + self.enable_screen_sharing = kwargs.get('enable_screen_sharing', None) + 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.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties_py3.py new file mode 100644 index 000000000000..9cefa0d127ec --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SkypeChannelProperties(Model): + """The parameters to provide for the Microsoft Teams channel. + + All required parameters must be populated in order to send to Azure. + + :param enable_messaging: Enable messaging for Skype channel + :type enable_messaging: bool + :param enable_media_cards: Enable media cards for Skype channel + :type enable_media_cards: bool + :param enable_video: Enable video for Skype channel + :type enable_video: bool + :param enable_calling: Enable calling for Skype channel + :type enable_calling: bool + :param enable_screen_sharing: Enable screen sharing for Skype channel + :type enable_screen_sharing: bool + :param enable_groups: Enable groups for Skype channel + :type enable_groups: bool + :param groups_mode: Group mode for Skype channel + :type groups_mode: str + :param calling_web_hook: Calling web hook for Skype channel + :type calling_web_hook: str + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'enable_messaging': {'key': 'enableMessaging', 'type': 'bool'}, + 'enable_media_cards': {'key': 'enableMediaCards', 'type': 'bool'}, + 'enable_video': {'key': 'enableVideo', 'type': 'bool'}, + 'enable_calling': {'key': 'enableCalling', 'type': 'bool'}, + 'enable_screen_sharing': {'key': 'enableScreenSharing', 'type': 'bool'}, + 'enable_groups': {'key': 'enableGroups', 'type': 'bool'}, + 'groups_mode': {'key': 'groupsMode', 'type': 'str'}, + 'calling_web_hook': {'key': 'callingWebHook', '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: + super(SkypeChannelProperties, self).__init__(**kwargs) + self.enable_messaging = enable_messaging + self.enable_media_cards = enable_media_cards + self.enable_video = enable_video + self.enable_calling = enable_calling + self.enable_screen_sharing = enable_screen_sharing + self.enable_groups = enable_groups + self.groups_mode = groups_mode + self.calling_web_hook = calling_web_hook + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py new file mode 100644 index 000000000000..e14a4d01fffb --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class SkypeChannel(Channel): + """Skype channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Skype channel + resource + :type properties: ~azure.mgmt.botservice.models.SkypeChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SkypeChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SkypeChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'SkypeChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.py index 7be5bd512b2e..102b7c5c4860 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.py @@ -15,7 +15,9 @@ class SlackChannel(Channel): """Slack channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Slack channel resource @@ -31,7 +33,7 @@ class SlackChannel(Channel): 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, } - def __init__(self, properties=None): - super(SlackChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(SlackChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'SlackChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py index 7c0f60cb0b5c..f9ff04d41cf8 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py @@ -18,11 +18,16 @@ class SlackChannelProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param client_id: The Slack client id + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The Slack client id :type client_id: str - :param client_secret: The Slack client secret + :param client_secret: Required. The Slack client secret. Value only + returned through POST to the action Channel List API, otherwise empty. :type client_secret: str - :param verification_token: The Slack verification token + :param verification_token: Required. The Slack verification token. Value + only returned through POST to the action Channel List API, otherwise + empty. :type verification_token: str :param landing_page_url: The Slack landing page Url :type landing_page_url: str @@ -35,7 +40,7 @@ class SlackChannelProperties(Model): :vartype register_before_oauth_flow: bool :ivar is_validated: Whether this channel is validated for the bot :vartype is_validated: bool - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -62,13 +67,14 @@ class SlackChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, client_id, client_secret, verification_token, is_enabled, landing_page_url=None): - self.client_id = client_id - self.client_secret = client_secret - self.verification_token = verification_token - self.landing_page_url = landing_page_url + def __init__(self, **kwargs): + super(SlackChannelProperties, self).__init__(**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.landing_page_url = kwargs.get('landing_page_url', None) self.redirect_action = None self.last_submission_id = None self.register_before_oauth_flow = None self.is_validated = None - self.is_enabled = is_enabled + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties_py3.py new file mode 100644 index 000000000000..424ed52760fa --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties_py3.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SlackChannelProperties(Model): + """The parameters to provide for the Slack 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. + + :param client_id: Required. The Slack client id + :type client_id: str + :param client_secret: Required. The Slack client secret. Value only + returned through POST to the action Channel List API, otherwise empty. + :type client_secret: str + :param verification_token: Required. The Slack verification token. Value + only returned through POST to the action Channel List API, otherwise + empty. + :type verification_token: str + :param landing_page_url: The Slack landing page Url + :type landing_page_url: str + :ivar redirect_action: The Slack redirect action + :vartype redirect_action: str + :ivar last_submission_id: The Sms auth token + :vartype last_submission_id: str + :ivar register_before_oauth_flow: Whether to register the settings before + OAuth validation is performed. Recommended to True. + :vartype register_before_oauth_flow: bool + :ivar is_validated: Whether this channel is validated for the bot + :vartype is_validated: bool + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'client_id': {'required': True}, + 'client_secret': {'required': True}, + 'verification_token': {'required': True}, + 'redirect_action': {'readonly': True}, + 'last_submission_id': {'readonly': True}, + 'register_before_oauth_flow': {'readonly': True}, + 'is_validated': {'readonly': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'verification_token': {'key': 'verificationToken', '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_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, client_id: str, client_secret: str, verification_token: str, is_enabled: bool, landing_page_url: 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.landing_page_url = landing_page_url + self.redirect_action = None + self.last_submission_id = None + self.register_before_oauth_flow = None + self.is_validated = None + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py new file mode 100644 index 000000000000..0b3f5af0c1fc --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class SlackChannel(Channel): + """Slack channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Slack channel + resource + :type properties: ~azure.mgmt.botservice.models.SlackChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SlackChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SlackChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'SlackChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.py index dba9ebc83637..9a4f908ab007 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.py @@ -15,7 +15,9 @@ class SmsChannel(Channel): """Sms channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Sms channel resource :type properties: ~azure.mgmt.botservice.models.SmsChannelProperties @@ -30,7 +32,7 @@ class SmsChannel(Channel): 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, } - def __init__(self, properties=None): - super(SmsChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(SmsChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'SmsChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py index 45898f7a9e30..4a094296451a 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py @@ -15,15 +15,19 @@ class SmsChannelProperties(Model): """The parameters to provide for the Sms channel. - :param phone: The Sms phone + All required parameters must be populated in order to send to Azure. + + :param phone: Required. The Sms phone :type phone: str - :param account_sid: The Sms account SID + :param account_sid: Required. The Sms account SID. Value only returned + through POST to the action Channel List API, otherwise empty. :type account_sid: str - :param auth_token: The Sms auth token + :param auth_token: Required. The Sms auth token. Value only returned + through POST to the action Channel List API, otherwise empty. :type auth_token: str :param is_validated: Whether this channel is validated for the bot :type is_validated: bool - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -42,9 +46,10 @@ class SmsChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, phone, account_sid, auth_token, is_enabled, is_validated=None): - self.phone = phone - self.account_sid = account_sid - self.auth_token = auth_token - self.is_validated = is_validated - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(SmsChannelProperties, self).__init__(**kwargs) + self.phone = kwargs.get('phone', None) + self.account_sid = kwargs.get('account_sid', None) + self.auth_token = kwargs.get('auth_token', None) + self.is_validated = kwargs.get('is_validated', None) + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties_py3.py new file mode 100644 index 000000000000..60d8e2329989 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties_py3.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SmsChannelProperties(Model): + """The parameters to provide for the Sms channel. + + All required parameters must be populated in order to send to Azure. + + :param phone: Required. The Sms phone + :type phone: str + :param account_sid: Required. The Sms account SID. Value only returned + through POST to the action Channel List API, otherwise empty. + :type account_sid: str + :param auth_token: Required. The Sms auth token. Value only returned + through POST to the action Channel List API, otherwise empty. + :type auth_token: str + :param is_validated: Whether this channel is validated for the bot + :type is_validated: bool + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'phone': {'required': True}, + 'account_sid': {'required': True}, + 'auth_token': {'required': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'phone': {'key': 'phone', 'type': 'str'}, + 'account_sid': {'key': 'accountSID', 'type': 'str'}, + 'auth_token': {'key': 'authToken', 'type': 'str'}, + 'is_validated': {'key': 'isValidated', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, phone: str, account_sid: str, auth_token: str, is_enabled: bool, is_validated: bool=None, **kwargs) -> None: + super(SmsChannelProperties, self).__init__(**kwargs) + self.phone = phone + self.account_sid = account_sid + self.auth_token = auth_token + self.is_validated = is_validated + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py new file mode 100644 index 000000000000..2e5589ec2dba --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py @@ -0,0 +1,38 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class SmsChannel(Channel): + """Sms channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Sms channel resource + :type properties: ~azure.mgmt.botservice.models.SmsChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SmsChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SmsChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'SmsChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.py index eb2afc7e87bd..5b13451c4b06 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.py @@ -15,7 +15,9 @@ class TelegramChannel(Channel): """Telegram channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Telegram channel resource @@ -31,7 +33,7 @@ class TelegramChannel(Channel): 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, } - def __init__(self, properties=None): - super(TelegramChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(TelegramChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'TelegramChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.py index 9430466c7a60..368bfe11b06d 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.py @@ -15,11 +15,14 @@ class TelegramChannelProperties(Model): """The parameters to provide for the Telegram channel. - :param access_token: The Telegram access token + All required parameters must be populated in order to send to Azure. + + :param access_token: Required. The Telegram access token. Value only + returned through POST to the action Channel List API, otherwise empty. :type access_token: str :param is_validated: Whether this channel is validated for the bot :type is_validated: bool - :param is_enabled: Whether this channel is enabled for the bot + :param is_enabled: Required. Whether this channel is enabled for the bot :type is_enabled: bool """ @@ -34,7 +37,8 @@ class TelegramChannelProperties(Model): 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, } - def __init__(self, access_token, is_enabled, is_validated=None): - self.access_token = access_token - self.is_validated = is_validated - self.is_enabled = is_enabled + def __init__(self, **kwargs): + super(TelegramChannelProperties, self).__init__(**kwargs) + self.access_token = kwargs.get('access_token', None) + self.is_validated = kwargs.get('is_validated', None) + self.is_enabled = kwargs.get('is_enabled', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties_py3.py new file mode 100644 index 000000000000..d9db39e8d283 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class TelegramChannelProperties(Model): + """The parameters to provide for the Telegram channel. + + All required parameters must be populated in order to send to Azure. + + :param access_token: Required. The Telegram access token. Value only + returned through POST to the action Channel List API, otherwise empty. + :type access_token: str + :param is_validated: Whether this channel is validated for the bot + :type is_validated: bool + :param is_enabled: Required. Whether this channel is enabled for the bot + :type is_enabled: bool + """ + + _validation = { + 'access_token': {'required': True}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'is_validated': {'key': 'isValidated', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, *, access_token: str, is_enabled: bool, is_validated: bool=None, **kwargs) -> None: + super(TelegramChannelProperties, self).__init__(**kwargs) + self.access_token = access_token + self.is_validated = is_validated + self.is_enabled = is_enabled diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py new file mode 100644 index 000000000000..8928c50d2958 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class TelegramChannel(Channel): + """Telegram channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Telegram channel + resource + :type properties: ~azure.mgmt.botservice.models.TelegramChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'TelegramChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(TelegramChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'TelegramChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.py index e2fc362fdb69..15b28e507c8d 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.py @@ -15,7 +15,9 @@ class WebChatChannel(Channel): """Web Chat channel definition. - :param channel_name: Constant filled by server. + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. :type channel_name: str :param properties: The set of properties specific to Web Chat channel resource @@ -31,7 +33,7 @@ class WebChatChannel(Channel): 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, } - def __init__(self, properties=None): - super(WebChatChannel, self).__init__() - self.properties = properties + def __init__(self, **kwargs): + super(WebChatChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) self.channel_name = 'WebChatChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.py index 144b64707a65..e1984da8ad00 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.py @@ -33,6 +33,7 @@ class WebChatChannelProperties(Model): 'sites': {'key': 'sites', 'type': '[WebChatSite]'}, } - def __init__(self, sites=None): + def __init__(self, **kwargs): + super(WebChatChannelProperties, self).__init__(**kwargs) self.web_chat_embed_code = None - self.sites = sites + self.sites = kwargs.get('sites', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties_py3.py new file mode 100644 index 000000000000..5a59da35bf19 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebChatChannelProperties(Model): + """The parameters to provide for the Web Chat channel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar web_chat_embed_code: Web chat control embed code + :vartype web_chat_embed_code: str + :param sites: The list of Web Chat sites + :type sites: list[~azure.mgmt.botservice.models.WebChatSite] + """ + + _validation = { + 'web_chat_embed_code': {'readonly': True}, + } + + _attribute_map = { + 'web_chat_embed_code': {'key': 'webChatEmbedCode', 'type': 'str'}, + 'sites': {'key': 'sites', 'type': '[WebChatSite]'}, + } + + def __init__(self, *, sites=None, **kwargs) -> None: + super(WebChatChannelProperties, self).__init__(**kwargs) + self.web_chat_embed_code = None + self.sites = sites diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_py3.py new file mode 100644 index 000000000000..dd3564eac32b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .channel_py3 import Channel + + +class WebChatChannel(Channel): + """Web Chat channel definition. + + All required parameters must be populated in order to send to Azure. + + :param channel_name: Required. Constant filled by server. + :type channel_name: str + :param properties: The set of properties specific to Web Chat channel + resource + :type properties: ~azure.mgmt.botservice.models.WebChatChannelProperties + """ + + _validation = { + 'channel_name': {'required': True}, + } + + _attribute_map = { + 'channel_name': {'key': 'channelName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'WebChatChannelProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(WebChatChannel, self).__init__(**kwargs) + self.properties = properties + self.channel_name = 'WebChatChannel' diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.py index bcee7b9bddc5..4b7beef1d6e7 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.py @@ -18,18 +18,23 @@ class WebChatSite(Model): 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: Site name + :param site_name: Required. Site name :type site_name: str - :ivar key: Primary key + :ivar key: Primary key. Value only returned through POST to the action + Channel List API, otherwise empty. :vartype key: str - :ivar key2: Secondary key + :ivar key2: Secondary key. Value only returned through POST to the action + Channel List API, otherwise empty. :vartype key2: str - :param is_enabled: Whether this site is enabled for DirectLine channel + :param is_enabled: Required. Whether this site is enabled for DirectLine + channel :type is_enabled: bool - :param enable_preview: Whether this site is enabled for preview versions - of Webchat + :param enable_preview: Required. Whether this site is enabled for preview + versions of Webchat :type enable_preview: bool """ @@ -51,10 +56,11 @@ class WebChatSite(Model): 'enable_preview': {'key': 'enablePreview', 'type': 'bool'}, } - def __init__(self, site_name, is_enabled, enable_preview): + def __init__(self, **kwargs): + super(WebChatSite, self).__init__(**kwargs) self.site_id = None - self.site_name = site_name + self.site_name = kwargs.get('site_name', None) self.key = None self.key2 = None - self.is_enabled = is_enabled - self.enable_preview = enable_preview + self.is_enabled = kwargs.get('is_enabled', None) + self.enable_preview = kwargs.get('enable_preview', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site_py3.py new file mode 100644 index 000000000000..a35ecac57f8b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WebChatSite(Model): + """A site for the Webchat 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 enable_preview: Required. Whether this site is enabled for preview + versions of Webchat + :type enable_preview: bool + """ + + _validation = { + 'site_id': {'readonly': True}, + 'site_name': {'required': True}, + 'key': {'readonly': True}, + 'key2': {'readonly': True}, + 'is_enabled': {'required': True}, + 'enable_preview': {'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'}, + 'enable_preview': {'key': 'enablePreview', 'type': 'bool'}, + } + + def __init__(self, *, site_name: str, is_enabled: bool, enable_preview: bool, **kwargs) -> None: + super(WebChatSite, self).__init__(**kwargs) + self.site_id = None + self.site_name = site_name + self.key = None + self.key2 = None + self.is_enabled = is_enabled + self.enable_preview = enable_preview diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py index f36f516ecc3f..c52c36afa15f 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py @@ -10,13 +10,13 @@ # -------------------------------------------------------------------------- from .bots_operations import BotsOperations -from .bot_services_operations import BotServicesOperations from .channels_operations import ChannelsOperations from .operations import Operations +from .bot_connection_operations import BotConnectionOperations __all__ = [ 'BotsOperations', - 'BotServicesOperations', 'ChannelsOperations', 'Operations', + 'BotConnectionOperations', ] diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py new file mode 100644 index 000000000000..b2c010012ba3 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py @@ -0,0 +1,502 @@ +# 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 BotConnectionOperations(object): + """BotConnectionOperations operations. + + :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. Current version is 2017-12-01. Constant value: "2018-07-12". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-07-12" + + self.config = config + + def list_service_providers( + self, custom_headers=None, raw=False, **operation_config): + """Lists the available Service Providers for creating Connection Settings. + + :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: ServiceProviderResponseList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ServiceProviderResponseList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_service_providers.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.post(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('ServiceProviderResponseList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_service_providers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders'} + + def list_with_secrets( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Get a Connection Setting registration for a Bot Service. + + :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 connection_name: The name of the Bot Service Connection Setting + resource + :type 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: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_with_secrets.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_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_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.post(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('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets'} + + def create( + self, resource_group_name, resource_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Register a new Auth Connection for a Bot Service. + + :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 connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param parameters: The parameters to provide for creating the + Connection Setting. + :type parameters: ~azure.mgmt.botservice.models.ConnectionSetting + :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: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting 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_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_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' + 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(parameters, 'ConnectionSetting') + + # 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, 201]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionSetting', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSetting', 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}/Connections/{connectionName}'} + + def update( + self, resource_group_name, resource_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a Connection Setting registration for a Bot Service. + + :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 connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param parameters: The parameters to provide for updating the + Connection Setting. + :type parameters: ~azure.mgmt.botservice.models.ConnectionSetting + :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: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.update.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_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_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' + 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(parameters, 'ConnectionSetting') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectionSetting', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'} + + def get( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Get a Connection Setting registration for a Bot Service. + + :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 connection_name: The name of the Bot Service Connection Setting + resource + :type 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: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting 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_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_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('ConnectionSetting', 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}/Connections/{connectionName}'} + + def delete( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Deletes a Connection Setting registration for a Bot Service. + + :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 connection_name: The name of the Bot Service Connection Setting + resource + :type 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_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_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 = {} + 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}/Connections/{connectionName}'} + + def list_by_bot_service( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns all the Connection Settings registered to a particular + BotService resource. + + :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 ConnectionSetting + :rtype: + ~azure.mgmt.botservice.models.ConnectionSettingPaged[~azure.mgmt.botservice.models.ConnectionSetting] + :raises: + :class:`ErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_bot_service.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) + 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 + deserialized = models.ConnectionSettingPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectionSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_bot_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections'} diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py index 5ad70b3168b3..e3daba7bbe6e 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py @@ -21,8 +21,8 @@ class BotsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2017-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2018-07-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01" + self.api_version = "2018-07-12" self.config = config @@ -41,8 +41,8 @@ def create( """Creates a Bot Service. Bot Service is a resource group wide resource type. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -60,9 +60,9 @@ def create( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}' + url = self.create.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') } @@ -74,6 +74,7 @@ def create( # 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()) @@ -86,9 +87,8 @@ def create( body_content = self._serialize.body(parameters, 'Bot') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + 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, 201]: raise models.ErrorException(self._deserialize, response) @@ -105,13 +105,14 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}'} def update( self, resource_group_name, resource_name, location=None, tags=None, sku=None, kind=None, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -142,9 +143,9 @@ def update( parameters = models.Bot(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}' + url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') } @@ -156,6 +157,7 @@ def update( # 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()) @@ -168,9 +170,8 @@ def update( body_content = self._serialize.body(parameters, 'Bot') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorException(self._deserialize, response) @@ -187,13 +188,14 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Deletes a Bot Service from the resource group. . - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -208,9 +210,9 @@ def delete( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}' + url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') } @@ -222,7 +224,6 @@ def delete( # Construct headers header_parameters = {} - 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: @@ -231,8 +232,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, **operation_config) + 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) @@ -240,13 +241,14 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Returns a BotService specified by the parameters. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -262,9 +264,9 @@ def get( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}' + url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') } @@ -276,7 +278,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -285,8 +287,8 @@ def get( 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) - response = self._client.send(request, header_parameters, **operation_config) + 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) @@ -301,14 +303,15 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): """Returns all the resources of a particular type belonging to a resource group. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -325,9 +328,73 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices' + url = self.list_by_resource_group.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_.-]*$'), + '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) + 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 + deserialized = models.BotPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BotPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Returns all the resources of a particular type belonging to a + subscription. + + :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 Bot + :rtype: + ~azure.mgmt.botservice.models.BotPaged[~azure.mgmt.botservice.models.Bot] + :raises: + :class:`ErrorException` + """ + def internal_paging(next_link=None, raw=False): + + 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'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -342,7 +409,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -351,9 +418,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, **operation_config) + 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) @@ -369,6 +435,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/botServices'} def get_check_name_availability( self, name=None, type=None, custom_headers=None, raw=False, **operation_config): @@ -396,7 +463,7 @@ def get_check_name_availability( parameters = models.CheckNameAvailabilityRequestBody(name=name, type=type) # Construct URL - url = '/providers/Microsoft.BotService/botServices/checkNameAvailability' + url = self.get_check_name_availability.metadata['url'] # Construct parameters query_parameters = {} @@ -404,6 +471,7 @@ def get_check_name_availability( # 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()) @@ -416,9 +484,8 @@ def get_check_name_availability( body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestBody') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(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) @@ -433,3 +500,4 @@ def get_check_name_availability( return client_raw_response return deserialized + get_check_name_availability.metadata = {'url': '/providers/Microsoft.BotService/checkNameAvailability'} diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py index 4c17ba4c21d7..961b8d39f311 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py @@ -21,8 +21,8 @@ class ChannelsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2017-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2018-07-12". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01" + self.api_version = "2018-07-12" self.config = config @@ -40,15 +40,16 @@ def create( self, resource_group_name, resource_name, channel_name, parameters, custom_headers=None, raw=False, **operation_config): """Creates a Channel registration for a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 channel_name: The name of the Bot resource. Possible values + :param channel_name: The name of the Channel resource. Possible values include: 'FacebookChannel', 'EmailChannel', 'KikChannel', - 'TelegramChannel', 'SlackChannel' - :type channel_name: str + 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', + 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + :type channel_name: str or ~azure.mgmt.botservice.models.ChannelName :param parameters: The parameters to provide for the created bot. :type parameters: ~azure.mgmt.botservice.models.BotChannel :param dict custom_headers: headers that will be added to the request @@ -63,11 +64,11 @@ def create( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}' + url = self.create.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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_.-]*$'), - 'channelName': self._serialize.url("channel_name", channel_name, 'str'), + 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +79,7 @@ def create( # 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()) @@ -90,9 +92,8 @@ def create( body_content = self._serialize.body(parameters, 'BotChannel') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + 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, 201]: raise models.ErrorException(self._deserialize, response) @@ -109,20 +110,22 @@ def create( return client_raw_response return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}'} def update( self, resource_group_name, resource_name, channel_name, location=None, tags=None, sku=None, kind=None, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a Channel registration for a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 channel_name: The name of the Bot resource. Possible values + :param channel_name: The name of the Channel resource. Possible values include: 'FacebookChannel', 'EmailChannel', 'KikChannel', - 'TelegramChannel', 'SlackChannel' - :type channel_name: str + 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', + 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + :type channel_name: str or ~azure.mgmt.botservice.models.ChannelName :param location: Specifies the location of the resource. :type location: str :param tags: Contains resource tags defined as key/value pairs. @@ -151,11 +154,11 @@ def update( parameters = models.BotChannel(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}' + url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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_.-]*$'), - 'channelName': self._serialize.url("channel_name", channel_name, 'str'), + 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -166,6 +169,7 @@ def update( # 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()) @@ -178,9 +182,8 @@ def update( body_content = self._serialize.body(parameters, 'BotChannel') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorException(self._deserialize, response) @@ -197,13 +200,14 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}'} def delete( self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): """Deletes a Channel registration from a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -220,9 +224,9 @@ def delete( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}' + url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_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') @@ -235,7 +239,6 @@ def delete( # Construct headers header_parameters = {} - 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: @@ -244,8 +247,8 @@ def delete( 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) - response = self._client.send(request, header_parameters, **operation_config) + 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) @@ -253,13 +256,14 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}'} def get( self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): """Returns a BotService Channel registration specified by the parameters. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -277,9 +281,9 @@ def get( :class:`ErrorException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}' + url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_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') @@ -292,7 +296,75 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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('BotChannel', 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}/channels/{channelName}'} + + def list_with_keys( + self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): + """Lists a Channel registration for a Bot Service including secrets. + + :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 channel_name: The name of the Channel resource. Possible values + include: 'FacebookChannel', 'EmailChannel', 'KikChannel', + 'TelegramChannel', 'SlackChannel', 'MsTeamsChannel', 'SkypeChannel', + 'WebChatChannel', 'DirectLineChannel', 'SmsChannel' + :type channel_name: str or ~azure.mgmt.botservice.models.ChannelName + :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: BotChannel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.BotChannel or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_with_keys.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_.-]*$'), + 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), + '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: @@ -301,8 +373,8 @@ def get( 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) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.post(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) @@ -317,14 +389,15 @@ def get( return client_raw_response return deserialized + list_with_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/listChannelWithKeys'} def list_by_resource_group( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Returns all the Channel registrations of a particular BotService resource. - :param resource_group_name: The name of the resource group within the - user's subscription. + :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 @@ -343,9 +416,9 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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') } @@ -361,7 +434,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -370,9 +443,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, **operation_config) + 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) @@ -388,3 +460,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels'} diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/operations.py index 87663ae547e2..d0d7a9bd632f 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/operations.py @@ -22,8 +22,8 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. - :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2017-12-01". + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "2018-07-12". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2017-12-01" + self.api_version = "2018-07-12" self.config = config @@ -55,7 +55,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/providers/Microsoft.BotService/operations' + url = self.list.metadata['url'] # Construct parameters query_parameters = {} @@ -67,7 +67,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -76,9 +76,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, **operation_config) + 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]: exp = CloudError(response) @@ -96,3 +95,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list.metadata = {'url': '/providers/Microsoft.BotService/operations'} diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/version.py b/azure-mgmt-botservice/azure/mgmt/botservice/version.py index e0ec669828cb..fb0159ed93d7 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/version.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/version.py @@ -10,4 +10,3 @@ # -------------------------------------------------------------------------- VERSION = "0.1.0" - diff --git a/azure-mgmt-botservice/azure_bdist_wheel.py b/azure-mgmt-botservice/azure_bdist_wheel.py index 61ec571a9743..8a81d1b61775 100644 --- a/azure-mgmt-botservice/azure_bdist_wheel.py +++ b/azure-mgmt-botservice/azure_bdist_wheel.py @@ -1,486 +1,3 @@ -""" -"wheel" copyright (c) 2012-2017 Daniel Holth and -contributors. - -The MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Create a Azure wheel (.whl) distribution (a wheel is a built archive format). - -This file is a copy of the official bdist_wheel file from wheel 0.30.0a0, enhanced -of the bottom with some Microsoft extension for Azure SDK for Python - -""" - -import csv -import hashlib -import os -import subprocess -import warnings -import shutil -import json -import sys - -try: - import sysconfig -except ImportError: # pragma nocover - # Python < 2.7 - import distutils.sysconfig as sysconfig - -import pkg_resources - -safe_name = pkg_resources.safe_name -safe_version = pkg_resources.safe_version - -from shutil import rmtree -from email.generator import Generator - -from distutils.core import Command -from distutils.sysconfig import get_python_version - -from distutils import log as logger - -from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag, get_platform -from wheel.util import native, open_for_csv -from wheel.archive import archive_wheelfile -from wheel.pkginfo import read_pkg_info, write_pkg_info -from wheel.metadata import pkginfo_to_dict -from wheel import pep425tags, metadata -from wheel import __version__ as wheel_version - -def safer_name(name): - return safe_name(name).replace('-', '_') - -def safer_version(version): - return safe_version(version).replace('-', '_') - -class bdist_wheel(Command): - - description = 'create a wheel distribution' - - user_options = [('bdist-dir=', 'b', - "temporary directory for creating the distribution"), - ('plat-name=', 'p', - "platform name to embed in generated filenames " - "(default: %s)" % get_platform()), - ('keep-temp', 'k', - "keep the pseudo-installation tree around after " + - "creating the distribution archive"), - ('dist-dir=', 'd', - "directory to put final built distributions in"), - ('skip-build', None, - "skip rebuilding everything (for testing/debugging)"), - ('relative', None, - "build the archive using relative paths" - "(default: false)"), - ('owner=', 'u', - "Owner name used when creating a tar file" - " [default: current user]"), - ('group=', 'g', - "Group name used when creating a tar file" - " [default: current group]"), - ('universal', None, - "make a universal wheel" - " (default: false)"), - ('python-tag=', None, - "Python implementation compatibility tag" - " (default: py%s)" % get_impl_ver()[0]), - ] - - boolean_options = ['keep-temp', 'skip-build', 'relative', 'universal'] - - def initialize_options(self): - self.bdist_dir = None - self.data_dir = None - self.plat_name = None - self.plat_tag = None - self.format = 'zip' - self.keep_temp = False - self.dist_dir = None - self.distinfo_dir = None - self.egginfo_dir = None - self.root_is_pure = None - self.skip_build = None - self.relative = False - self.owner = None - self.group = None - self.universal = False - self.python_tag = 'py' + get_impl_ver()[0] - self.plat_name_supplied = False - - def finalize_options(self): - if self.bdist_dir is None: - bdist_base = self.get_finalized_command('bdist').bdist_base - self.bdist_dir = os.path.join(bdist_base, 'wheel') - - self.data_dir = self.wheel_dist_name + '.data' - self.plat_name_supplied = self.plat_name is not None - - need_options = ('dist_dir', 'plat_name', 'skip_build') - - self.set_undefined_options('bdist', - *zip(need_options, need_options)) - - self.root_is_pure = not (self.distribution.has_ext_modules() - or self.distribution.has_c_libraries()) - - # Support legacy [wheel] section for setting universal - wheel = self.distribution.get_option_dict('wheel') - if 'universal' in wheel: - # please don't define this in your global configs - val = wheel['universal'][1].strip() - if val.lower() in ('1', 'true', 'yes'): - self.universal = True - - @property - def wheel_dist_name(self): - """Return distribution full name with - replaced with _""" - return '-'.join((safer_name(self.distribution.get_name()), - safer_version(self.distribution.get_version()))) - - def get_tag(self): - # bdist sets self.plat_name if unset, we should only use it for purepy - # wheels if the user supplied it. - if self.plat_name_supplied: - plat_name = self.plat_name - elif self.root_is_pure: - plat_name = 'any' - else: - plat_name = self.plat_name or get_platform() - if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647: - plat_name = 'linux_i686' - plat_name = plat_name.replace('-', '_').replace('.', '_') - - - if self.root_is_pure: - if self.universal: - impl = 'py2.py3' - else: - impl = self.python_tag - tag = (impl, 'none', plat_name) - else: - impl_name = get_abbr_impl() - impl_ver = get_impl_ver() - # PEP 3149 - abi_tag = str(get_abi_tag()).lower() - tag = (impl_name + impl_ver, abi_tag, plat_name) - supported_tags = pep425tags.get_supported( - supplied_platform=plat_name if self.plat_name_supplied else None) - # XXX switch to this alternate implementation for non-pure: - assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0]) - return tag - - def get_archive_basename(self): - """Return archive name without extension""" - - impl_tag, abi_tag, plat_tag = self.get_tag() - - archive_basename = "%s-%s-%s-%s" % ( - self.wheel_dist_name, - impl_tag, - abi_tag, - plat_tag) - return archive_basename - - def run(self): - build_scripts = self.reinitialize_command('build_scripts') - build_scripts.executable = 'python' - - if not self.skip_build: - self.run_command('build') - - install = self.reinitialize_command('install', - reinit_subcommands=True) - install.root = self.bdist_dir - install.compile = False - install.skip_build = self.skip_build - install.warn_dir = False - - # A wheel without setuptools scripts is more cross-platform. - # Use the (undocumented) `no_ep` option to setuptools' - # install_scripts command to avoid creating entry point scripts. - install_scripts = self.reinitialize_command('install_scripts') - install_scripts.no_ep = True - - # Use a custom scheme for the archive, because we have to decide - # at installation time which scheme to use. - for key in ('headers', 'scripts', 'data', 'purelib', 'platlib'): - setattr(install, - 'install_' + key, - os.path.join(self.data_dir, key)) - - basedir_observed = '' - - if os.name == 'nt': - # win32 barfs if any of these are ''; could be '.'? - # (distutils.command.install:change_roots bug) - basedir_observed = os.path.normpath(os.path.join(self.data_dir, '..')) - self.install_libbase = self.install_lib = basedir_observed - - setattr(install, - 'install_purelib' if self.root_is_pure else 'install_platlib', - basedir_observed) - - logger.info("installing to %s", self.bdist_dir) - - self.run_command('install') - - archive_basename = self.get_archive_basename() - - pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) - if not self.relative: - archive_root = self.bdist_dir - else: - archive_root = os.path.join( - self.bdist_dir, - self._ensure_relative(install.install_base)) - - self.set_undefined_options( - 'install_egg_info', ('target', 'egginfo_dir')) - self.distinfo_dir = os.path.join(self.bdist_dir, - '%s.dist-info' % self.wheel_dist_name) - self.egg2dist(self.egginfo_dir, - self.distinfo_dir) - - self.write_wheelfile(self.distinfo_dir) - - self.write_record(self.bdist_dir, self.distinfo_dir) - - # Make the archive - if not os.path.exists(self.dist_dir): - os.makedirs(self.dist_dir) - wheel_name = archive_wheelfile(pseudoinstall_root, archive_root) - - # Sign the archive - if 'WHEEL_TOOL' in os.environ: - subprocess.call([os.environ['WHEEL_TOOL'], 'sign', wheel_name]) - - # Add to 'Distribution.dist_files' so that the "upload" command works - getattr(self.distribution, 'dist_files', []).append( - ('bdist_wheel', get_python_version(), wheel_name)) - - if not self.keep_temp: - if self.dry_run: - logger.info('removing %s', self.bdist_dir) - else: - rmtree(self.bdist_dir) - - def write_wheelfile(self, wheelfile_base, generator='bdist_wheel (' + wheel_version + ')'): - from email.message import Message - msg = Message() - msg['Wheel-Version'] = '1.0' # of the spec - msg['Generator'] = generator - msg['Root-Is-Purelib'] = str(self.root_is_pure).lower() - - # Doesn't work for bdist_wininst - impl_tag, abi_tag, plat_tag = self.get_tag() - for impl in impl_tag.split('.'): - for abi in abi_tag.split('.'): - for plat in plat_tag.split('.'): - msg['Tag'] = '-'.join((impl, abi, plat)) - - wheelfile_path = os.path.join(wheelfile_base, 'WHEEL') - logger.info('creating %s', wheelfile_path) - with open(wheelfile_path, 'w') as f: - Generator(f, maxheaderlen=0).flatten(msg) - - def _ensure_relative(self, path): - # copied from dir_util, deleted - drive, path = os.path.splitdrive(path) - if path[0:1] == os.sep: - path = drive + path[1:] - return path - - def _pkginfo_to_metadata(self, egg_info_path, pkginfo_path): - return metadata.pkginfo_to_metadata(egg_info_path, pkginfo_path) - - def license_file(self): - """Return license filename from a license-file key in setup.cfg, or None.""" - metadata = self.distribution.get_option_dict('metadata') - if not 'license_file' in metadata: - return None - return metadata['license_file'][1] - - def setupcfg_requirements(self): - """Generate requirements from setup.cfg as - ('Requires-Dist', 'requirement; qualifier') tuples. From a metadata - section in setup.cfg: - - [metadata] - provides-extra = extra1 - extra2 - requires-dist = requirement; qualifier - another; qualifier2 - unqualified - - Yields - - ('Provides-Extra', 'extra1'), - ('Provides-Extra', 'extra2'), - ('Requires-Dist', 'requirement; qualifier'), - ('Requires-Dist', 'another; qualifier2'), - ('Requires-Dist', 'unqualified') - """ - metadata = self.distribution.get_option_dict('metadata') - - # our .ini parser folds - to _ in key names: - for key, title in (('provides_extra', 'Provides-Extra'), - ('requires_dist', 'Requires-Dist')): - if not key in metadata: - continue - field = metadata[key] - for line in field[1].splitlines(): - line = line.strip() - if not line: - continue - yield (title, line) - - def add_requirements(self, metadata_path): - """Add additional requirements from setup.cfg to file metadata_path""" - additional = list(self.setupcfg_requirements()) - if not additional: return - pkg_info = read_pkg_info(metadata_path) - if 'Provides-Extra' in pkg_info or 'Requires-Dist' in pkg_info: - warnings.warn('setup.cfg requirements overwrite values from setup.py') - del pkg_info['Provides-Extra'] - del pkg_info['Requires-Dist'] - for k, v in additional: - pkg_info[k] = v - write_pkg_info(metadata_path, pkg_info) - - def egg2dist(self, egginfo_path, distinfo_path): - """Convert an .egg-info directory into a .dist-info directory""" - def adios(p): - """Appropriately delete directory, file or link.""" - if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p): - shutil.rmtree(p) - elif os.path.exists(p): - os.unlink(p) - - adios(distinfo_path) - - if not os.path.exists(egginfo_path): - # There is no egg-info. This is probably because the egg-info - # file/directory is not named matching the distribution name used - # to name the archive file. Check for this case and report - # accordingly. - import glob - pat = os.path.join(os.path.dirname(egginfo_path), '*.egg-info') - possible = glob.glob(pat) - err = "Egg metadata expected at %s but not found" % (egginfo_path,) - if possible: - alt = os.path.basename(possible[0]) - err += " (%s found - possible misnamed archive file?)" % (alt,) - - raise ValueError(err) - - if os.path.isfile(egginfo_path): - # .egg-info is a single file - pkginfo_path = egginfo_path - pkg_info = self._pkginfo_to_metadata(egginfo_path, egginfo_path) - os.mkdir(distinfo_path) - else: - # .egg-info is a directory - pkginfo_path = os.path.join(egginfo_path, 'PKG-INFO') - pkg_info = self._pkginfo_to_metadata(egginfo_path, pkginfo_path) - - # ignore common egg metadata that is useless to wheel - shutil.copytree(egginfo_path, distinfo_path, - ignore=lambda x, y: set(('PKG-INFO', - 'requires.txt', - 'SOURCES.txt', - 'not-zip-safe',))) - - # delete dependency_links if it is only whitespace - dependency_links_path = os.path.join(distinfo_path, 'dependency_links.txt') - with open(dependency_links_path, 'r') as dependency_links_file: - dependency_links = dependency_links_file.read().strip() - if not dependency_links: - adios(dependency_links_path) - - write_pkg_info(os.path.join(distinfo_path, 'METADATA'), pkg_info) - - # XXX deprecated. Still useful for current distribute/setuptools. - metadata_path = os.path.join(distinfo_path, 'METADATA') - self.add_requirements(metadata_path) - - # XXX intentionally a different path than the PEP. - metadata_json_path = os.path.join(distinfo_path, 'metadata.json') - pymeta = pkginfo_to_dict(metadata_path, - distribution=self.distribution) - - if 'description' in pymeta: - description_filename = 'DESCRIPTION.rst' - description_text = pymeta.pop('description') - description_path = os.path.join(distinfo_path, - description_filename) - with open(description_path, "wb") as description_file: - description_file.write(description_text.encode('utf-8')) - pymeta['extensions']['python.details']['document_names']['description'] = description_filename - - # XXX heuristically copy any LICENSE/LICENSE.txt? - license = self.license_file() - if license: - license_filename = 'LICENSE.txt' - shutil.copy(license, os.path.join(self.distinfo_dir, license_filename)) - pymeta['extensions']['python.details']['document_names']['license'] = license_filename - - with open(metadata_json_path, "w") as metadata_json: - json.dump(pymeta, metadata_json, sort_keys=True) - - adios(egginfo_path) - - def write_record(self, bdist_dir, distinfo_dir): - from wheel.util import urlsafe_b64encode - - record_path = os.path.join(distinfo_dir, 'RECORD') - record_relpath = os.path.relpath(record_path, bdist_dir) - - def walk(): - for dir, dirs, files in os.walk(bdist_dir): - dirs.sort() - for f in sorted(files): - yield os.path.join(dir, f) - - def skip(path): - """Wheel hashes every possible file.""" - return (path == record_relpath) - - with open_for_csv(record_path, 'w+') as record_file: - writer = csv.writer(record_file) - for path in walk(): - relpath = os.path.relpath(path, bdist_dir) - if skip(relpath): - hash = '' - size = '' - else: - with open(path, 'rb') as f: - data = f.read() - digest = hashlib.sha256(data).digest() - hash = 'sha256=' + native(urlsafe_b64encode(digest)) - size = len(data) - record_path = os.path.relpath( - path, bdist_dir).replace(os.path.sep, '/') - writer.writerow((record_path, hash, size)) - - #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -490,8 +7,12 @@ def skip(path): from distutils import log as logger import os.path -#from wheel.bdist_wheel import bdist_wheel +from wheel.bdist_wheel import bdist_wheel class azure_bdist_wheel(bdist_wheel): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ description = "Create an Azure wheel distribution" diff --git a/azure-mgmt-botservice/sdk_packaging.toml b/azure-mgmt-botservice/sdk_packaging.toml new file mode 100644 index 000000000000..5094b5ce21b1 --- /dev/null +++ b/azure-mgmt-botservice/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-botservice" +package_pprint_name = "Bot Service" +package_doc_id = "" +is_stable = false +is_arm = true diff --git a/azure-mgmt-botservice/setup.py b/azure-mgmt-botservice/setup.py index 628663c84c75..55d4f7b6312e 100644 --- a/azure-mgmt-botservice/setup.py +++ b/azure-mgmt-botservice/setup.py @@ -19,7 +19,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-botservice" -PACKAGE_PPRINT_NAME = "Bot Service Management" +PACKAGE_PPRINT_NAME = "Bot Service" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.20,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_directline_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_directline_channel.yaml new file mode 100644 index 000000000000..2312e0de0b1a --- /dev/null +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_directline_channel.yaml @@ -0,0 +1,231 @@ +interactions: +- request: + body: '{"location": "global", "sku": {"name": "Free"}, "kind": "Bot", "properties": + {"displayName": "this is a test bot", "description": "this is a description + for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "056d9ad9-17a9-4cc7-aebb-43bf6f293a08", + "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af511", "developerAppInsightsApiKey": + "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11", "developerAppInsightsApplicationId": + "cf03484e-3fdb-4b5e-9ad7-94bde32e5a19"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['481'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd","name":"azurebotservice4f7115bd","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-07-31T20%3A45%3A36.2560922Z''\"","location":"global","sku":{"name":""},"kind":"Bot","tags":{},"properties":{"displayName":"this + is a test bot","description":"this is a description for a test bot","iconUrl":"//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a19","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['957'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 31 Jul 2018 20:45:41 GMT'] + etag: [W/"datetime'2018-07-31T20%3A45%3A36.2560922Z'"] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-powered-by: [ASP.NET] + status: {code: 201, message: Created} +- request: + body: '{"location": "global", "properties": {"channelName": "DirectLineChannel", + "properties": {"sites": [{"siteName": "default", "isEnabled": true, "isV1Enabled": + false, "isV3Enabled": true}]}}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['188'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel","name":"azurebotservice4f7115bd/DirectLineChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"2b47e15fbec0d1d1b222623dda5d66307/31/2018 + 8:45:44 PM\"","location":"global","properties":{"properties":{"DirectLineEmbedCode":null,"sites":[{"siteId":"3tzNpMpYn-k","siteName":"default","key":"3tzNpMpYn-k.cwA.rQk.ZU7eLP6D3DvlcRAf_0ZUQXn_hnyZ-2L-w3V3JEMmFm4","key2":"3tzNpMpYn-k.cwA.Dy8.BdYdlVv68RdNBvrLC2y69Yi5vkE4KsQbOv2voUzn2lI","isEnabled":true,"isV1Enabled":true,"isV3Enabled":true}]},"etag":"W/\"2b47e15fbec0d1d1b222623dda5d66307/31/2018 + 8:45:44 PM\"","channelName":"DirectLineChannel","location":"global","provisioningState":"Accepted"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['846'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 31 Jul 2018 20:45:44 GMT'] + etag: ['W/"2b47e15fbec0d1d1b222623dda5d66307/31/2018 8:45:44 PM"'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel","name":"azurebotservice4f7115bd/DirectLineChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"d1d47c925d692cda5e3914543f8978407/31/2018 + 8:45:45 PM\"","location":"global","properties":{"properties":{"DirectLineEmbedCode":null,"sites":[{"siteId":"3tzNpMpYn-k","siteName":"default","key":"","key2":"","isEnabled":true,"isV1Enabled":true,"isV3Enabled":true}]},"etag":"W/\"d1d47c925d692cda5e3914543f8978407/31/2018 + 8:45:45 PM\"","channelName":"DirectLineChannel","location":"global","provisioningState":"Succeeded"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['721'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 31 Jul 2018 20:45:44 GMT'] + etag: ['W/"d1d47c925d692cda5e3914543f8978407/31/2018 8:45:45 PM"'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel/listChannelWithKeys?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel","location":"global","properties":{"properties":{"DirectLineEmbedCode":null,"sites":[{"siteId":"3tzNpMpYn-k","siteName":"default","key":"3tzNpMpYn-k.cwA.rQk.ZU7eLP6D3DvlcRAf_0ZUQXn_hnyZ-2L-w3V3JEMmFm4","key2":"3tzNpMpYn-k.cwA.Dy8.BdYdlVv68RdNBvrLC2y69Yi5vkE4KsQbOv2voUzn2lI","isEnabled":true,"isV1Enabled":true,"isV3Enabled":true}]},"etag":"W/\"2b47e15fbec0d1d1b222623dda5d66307/31/2018 + 8:45:46 PM\"","channelName":"DirectLineChannel","location":"global"},"provisioningState":"Succeeded","entityTag":"W/\"222fd4d12b031d841b4b6be1ee3a6bcd7/31/2018 + 8:45:46 PM\"","changedTime":"0001-01-01T00:00:00Z"}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['787'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 31 Jul 2018 20:45:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel?api-version=2018-07-12 + response: + body: {string: ''} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 31 Jul 2018 20:45:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14997'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel?api-version=2018-07-12 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The resource with + identifier ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd/channels/DirectLineChannel'' + is not found."}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['276'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 31 Jul 2018 20:45:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot4f7115bd/providers/Microsoft.BotService/botServices/azurebotservice4f7115bd?api-version=2018-07-12 + response: + body: {string: ''} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 31 Jul 2018 20:45:55 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_email_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_email_channel.yaml index 52fe6b4d20b2..238a153ea2fe 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_email_channel.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_email_channel.yaml @@ -16,7 +16,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2","name":"azurebotservicee60013a2","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T18%3A36%3A34.9983667Z''\"","location":"global","sku":{"name":""},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a11","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -49,7 +49,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel","name":"azurebotservicee60013a2/EmailChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"8148c55803b448c0dab50af27c73b1084/2/2018 6:36:42 PM\"","location":"global","properties":{"properties":{"emailAddress":"swagatm2@outlook.com","password":"Botuser123@","isEnabled":true},"etag":"W/\"8148c55803b448c0dab50af27c73b1084/2/2018 @@ -80,7 +80,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel","name":"azurebotservicee60013a2/EmailChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"c319754c4cd79482a41125d9543e108b4/2/2018 6:36:43 PM\"","location":"global","properties":{"properties":{"emailAddress":"swagatm2@outlook.com","password":"Botuser123@","isEnabled":true},"etag":"W/\"c319754c4cd79482a41125d9543e108b4/2/2018 @@ -113,7 +113,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2018-07-12 response: body: {string: ''} headers: @@ -140,7 +140,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel?api-version=2018-07-12 response: body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/azurebotservicee60013a2/channels/EmailChannel'' under resource group ''pythonsdkbote60013a2'' was not found."}}'} @@ -167,7 +167,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2018-07-12 response: body: {string: '{"error":{"code":"UnknownError","message":"message: The remote server returned an error: (412) Precondition Failed. original trace: at @@ -237,7 +237,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote60013a2/providers/Microsoft.BotService/botServices/azurebotservicee60013a2?api-version=2018-07-12 response: body: {string: ''} headers: diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_msteams_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_msteams_channel.yaml index 92c6d3d74efb..27c0093b6c67 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_msteams_channel.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_msteams_channel.yaml @@ -2,33 +2,34 @@ interactions: - request: body: '{"location": "global", "sku": {"name": "Free"}, "kind": "Bot", "properties": {"displayName": "this is a test bot", "description": "this is a description - for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "41a220b9-6571-4f0b-bbd2-43f1c1d82f53", - "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af52a", "developerAppInsightsApiKey": - "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv2r", "developerAppInsightsApplicationId": - "cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b"}}' + for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "056d9ad9-17a9-4cc7-aebb-43bf6f293a08", + "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af511", "developerAppInsightsApiKey": + "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11", "developerAppInsightsApplicationId": + "cf03484e-3fdb-4b5e-9ad7-94bde32e5a19"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['481'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13","name":"testpythonbot13","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-01T03%3A44%3A25.9372046Z''\"","location":"global","sku":{"name":""},"kind":"Bot","properties":{"displayName":"this - is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f53","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494","name":"azurebotservice104a1494","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-07-31T20%3A29%3A19.6567255Z''\"","location":"global","sku":{"name":""},"kind":"Bot","tags":{},"properties":{"displayName":"this + is a test bot","description":"this is a description for a test bot","iconUrl":"//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a19","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['926'] + content-length: ['957'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 03:44:26 GMT'] - etag: [W/"datetime'2018-04-01T03%3A44%3A25.9372046Z'"] + date: ['Tue, 31 Jul 2018 20:29:19 GMT'] + etag: [W/"datetime'2018-07-31T20%3A29%3A19.6567255Z'"] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] @@ -37,37 +38,40 @@ interactions: status: {code: 201, message: Created} - request: body: '{"location": "global", "properties": {"channelName": "MsTeamsChannel", - "properties": {"enableMessaging": true, "isEnabled": true}}}' + "properties": {"isEnabled": true}}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Length: ['131'] + Content-Length: ['106'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494/channels/MsTeamsChannel?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel","name":"testpythonbot13/MsTeamsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"05f9ab1b3ec654ae06838944f06d7bdc4/1/2018 - 3:45:13 AM\"","location":"global","properties":{"properties":{"enableMessaging":true,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"callMode":null,"isEnabled":true},"etag":"W/\"05f9ab1b3ec654ae06838944f06d7bdc4/1/2018 - 3:45:13 AM\"","channelName":"MsTeamsChannel","location":"global","provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494/channels/MsTeamsChannel","name":"azurebotservice104a1494/MsTeamsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"19ecb95fcfc74f02ef33405013e352a47/31/2018 + 8:29:23 PM\"","location":"global","properties":{"properties":{"enableCalling":false,"callingWebhook":null,"isEnabled":true},"etag":"W/\"19ecb95fcfc74f02ef33405013e352a47/31/2018 + 8:29:23 PM\"","channelName":"MsTeamsChannel","location":"global","provisioningState":"Accepted"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['652'] + content-length: ['615'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 03:45:13 GMT'] - etag: ['W/"05f9ab1b3ec654ae06838944f06d7bdc4/1/2018 3:45:13 AM"'] + date: ['Tue, 31 Jul 2018 20:29:23 GMT'] + etag: ['W/"19ecb95fcfc74f02ef33405013e352a47/31/2018 8:29:23 PM"'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] x-ms-ratelimit-remaining-subscription-writes: ['1199'] x-powered-by: [ASP.NET] - status: {code: 201, message: Created} + status: {code: 200, message: OK} - request: body: null headers: @@ -75,28 +79,29 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494/channels/MsTeamsChannel?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel","name":"testpythonbot13/MsTeamsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"0a4cd16bd516f5a97993fcf633be366b4/1/2018 - 3:45:45 AM\"","location":"global","properties":{"properties":{"enableMessaging":false,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"callMode":null,"isEnabled":true},"etag":"W/\"0a4cd16bd516f5a97993fcf633be366b4/1/2018 - 3:45:45 AM\"","channelName":"MsTeamsChannel","location":"global","provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494/channels/MsTeamsChannel","name":"azurebotservice104a1494/MsTeamsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"19ecb95fcfc74f02ef33405013e352a47/31/2018 + 8:29:25 PM\"","location":"global","properties":{"properties":{"enableCalling":false,"callingWebhook":null,"isEnabled":true},"etag":"W/\"19ecb95fcfc74f02ef33405013e352a47/31/2018 + 8:29:25 PM\"","channelName":"MsTeamsChannel","location":"global","provisioningState":"Succeeded"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['653'] + content-length: ['616'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 03:45:45 GMT'] - etag: ['W/"0a4cd16bd516f5a97993fcf633be366b4/1/2018 3:45:45 AM"'] + date: ['Tue, 31 Jul 2018 20:29:24 GMT'] + etag: ['W/"19ecb95fcfc74f02ef33405013e352a47/31/2018 8:29:25 PM"'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] - vary: [Accept-Encoding] + vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] x-powered-by: [ASP.NET] status: {code: 200, message: OK} @@ -108,52 +113,27 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494/channels/MsTeamsChannel?api-version=2018-07-12 response: body: {string: ''} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] content-length: ['0'] - date: ['Sun, 01 Apr 2018 03:46:36 GMT'] + date: ['Tue, 31 Jul 2018 20:29:27 GMT'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel?api-version=2017-12-01 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/testpythonbot13/channels/MsTeamsChannel'' - under resource group ''testpythonrg'' was not found."}}'} - headers: - cache-control: [no-cache] - content-length: ['188'] - content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 03:46:37 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-failure-cause: [gateway] - status: {code: 404, message: Not Found} - request: body: null headers: @@ -162,24 +142,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot104a1494/providers/Microsoft.BotService/botServices/azurebotservice104a1494?api-version=2018-07-12 response: body: {string: ''} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] content-length: ['0'] - date: ['Sun, 01 Apr 2018 03:47:24 GMT'] + date: ['Tue, 31 Jul 2018 20:29:33 GMT'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_skype_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_skype_channel.yaml index fd75574952fb..4676d6098fb6 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_skype_channel.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_skype_channel.yaml @@ -2,33 +2,34 @@ interactions: - request: body: '{"location": "global", "sku": {"name": "Free"}, "kind": "Bot", "properties": {"displayName": "this is a test bot", "description": "this is a description - for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "41a220b9-6571-4f0b-bbd2-43f1c1d82f53", - "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af52a", "developerAppInsightsApiKey": - "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv2r", "developerAppInsightsApplicationId": - "cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b"}}' + for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "056d9ad9-17a9-4cc7-aebb-43bf6f293a08", + "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af511", "developerAppInsightsApiKey": + "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11", "developerAppInsightsApplicationId": + "cf03484e-3fdb-4b5e-9ad7-94bde32e5a19"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Length: ['481'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13","name":"testpythonbot13","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-01T04%3A05%3A31.6306037Z''\"","location":"global","sku":{"name":""},"kind":"Bot","properties":{"displayName":"this - is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f53","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6","name":"azurebotservicee7ad13c6","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-07-31T20%3A30%3A02.433121Z''\"","location":"global","sku":{"name":""},"kind":"Bot","tags":{},"properties":{"displayName":"this + is a test bot","description":"this is a description for a test bot","iconUrl":"//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a19","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['926'] + content-length: ['956'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 04:05:31 GMT'] - etag: [W/"datetime'2018-04-01T04%3A05%3A31.6306037Z'"] + date: ['Tue, 31 Jul 2018 20:30:02 GMT'] + etag: [W/"datetime'2018-07-31T20%3A30%3A02.433121Z'"] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] @@ -44,28 +45,29 @@ interactions: Connection: [keep-alive] Content-Length: ['129'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6/channels/SkypeChannel?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel","name":"testpythonbot13/SkypeChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"e1bfa1407ed0ebd0a745ef8d8872541c4/1/2018 - 4:06:02 AM\"","location":"global","properties":{"properties":{"enableMessaging":true,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"enableScreenSharing":false,"enableGroups":false,"groupsMode":null,"callingWebHook":null,"isEnabled":true},"etag":"W/\"e1bfa1407ed0ebd0a745ef8d8872541c4/1/2018 - 4:06:02 AM\"","channelName":"SkypeChannel","location":"global","provisioningState":"Accepted"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6/channels/SkypeChannel","name":"azurebotservicee7ad13c6/SkypeChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"e1bfa1407ed0ebd0a745ef8d8872541c7/31/2018 + 8:30:05 PM\"","location":"global","properties":{"properties":{"enableMessaging":true,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"enableScreenSharing":false,"enableGroups":false,"groupsMode":null,"callingWebHook":null,"isEnabled":true},"etag":"W/\"e1bfa1407ed0ebd0a745ef8d8872541c7/31/2018 + 8:30:05 PM\"","channelName":"SkypeChannel","location":"global","provisioningState":"Accepted"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['718'] + content-length: ['744'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 04:06:02 GMT'] - etag: ['W/"e1bfa1407ed0ebd0a745ef8d8872541c4/1/2018 4:06:02 AM"'] + date: ['Tue, 31 Jul 2018 20:30:05 GMT'] + etag: ['W/"e1bfa1407ed0ebd0a745ef8d8872541c7/31/2018 8:30:05 PM"'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] - vary: [Accept-Encoding] + vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] x-ms-ratelimit-remaining-subscription-writes: ['1199'] x-powered-by: [ASP.NET] @@ -77,28 +79,29 @@ interactions: Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6/channels/SkypeChannel?api-version=2018-07-12 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel","name":"testpythonbot13/SkypeChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"a9c9d34a8f5e09c02779a2a247318e994/1/2018 - 4:06:19 AM\"","location":"global","properties":{"properties":{"enableMessaging":true,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"enableScreenSharing":false,"enableGroups":false,"groupsMode":null,"callingWebHook":"","isEnabled":true},"etag":"W/\"a9c9d34a8f5e09c02779a2a247318e994/1/2018 - 4:06:19 AM\"","channelName":"SkypeChannel","location":"global","provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6/channels/SkypeChannel","name":"azurebotservicee7ad13c6/SkypeChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"a9c9d34a8f5e09c02779a2a247318e997/31/2018 + 8:30:06 PM\"","location":"global","properties":{"properties":{"enableMessaging":true,"enableMediaCards":false,"enableVideo":false,"enableCalling":false,"enableScreenSharing":false,"enableGroups":false,"groupsMode":null,"callingWebHook":"","isEnabled":true},"etag":"W/\"a9c9d34a8f5e09c02779a2a247318e997/31/2018 + 8:30:06 PM\"","channelName":"SkypeChannel","location":"global","provisioningState":"Succeeded"}}'} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] - content-length: ['717'] + content-length: ['743'] content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 04:06:18 GMT'] - etag: ['W/"a9c9d34a8f5e09c02779a2a247318e994/1/2018 4:06:19 AM"'] + date: ['Tue, 31 Jul 2018 20:30:05 GMT'] + etag: ['W/"a9c9d34a8f5e09c02779a2a247318e997/31/2018 8:30:06 PM"'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] - vary: [Accept-Encoding] + vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] x-powered-by: [ASP.NET] status: {code: 200, message: OK} @@ -110,109 +113,27 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6/channels/SkypeChannel?api-version=2018-07-12 response: body: {string: ''} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] content-length: ['0'] - date: ['Sun, 01 Apr 2018 04:06:23 GMT'] + date: ['Tue, 31 Jul 2018 20:30:07 GMT'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel?api-version=2017-12-01 - response: - body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/testpythonbot13/channels/SkypeChannel'' - under resource group ''testpythonrg'' was not found."}}'} - headers: - cache-control: [no-cache] - content-length: ['186'] - content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 04:06:24 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-failure-cause: [gateway] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] - accept-language: [en-US] - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13?api-version=2017-12-01 - response: - body: {string: '{"error":{"code":"UnknownError","message":"message: Unable to - connect to the remote server original trace: at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndExecuteAsync[T](IAsyncResult - result) in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Core\\Executor\\Executor.cs:line - 50\r\n at Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.<>c__DisplayClass2`1.b__0(IAsyncResult - ar) in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Core\\Util\\AsyncExtensions.cs:line - 69\r\n--- End of stack trace from previous location where exception was thrown - ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task - task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n at - Intercom.Models.Storage.d__56.MoveNext() in E:\\_work\\3\\s\\Intercom.Models\\Storage\\BotLogOperators.cs:line - 42\r\n--- End of stack trace from previous location where exception was thrown - ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task - task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n at - Intercom.Models.Storage.d__59.MoveNext() in E:\\_work\\3\\s\\Intercom.Models\\Storage\\BotLogOperators.cs:line - 67\r\n--- End of stack trace from previous location where exception was thrown - ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task - task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n at - DevPortalLib.Helpers.BotHelper.d__16.MoveNext() in E:\\_work\\3\\s\\DevPortalLib\\Helpers\\BotHelper.cs:line - 222\r\n--- End of stack trace from previous location where exception was thrown - ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at - System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task - task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n at - Intercom.ResourceProvider.DataProviders.ResourceDataProvider.d__3.MoveNext() - in E:\\_work\\3\\s\\Intercom.ResourceProvider\\DataProviders\\ResourceDataProvider.cs:line - 203"}}'} - headers: - cache-control: [no-cache] - connection: [close] - content-length: ['2648'] - content-type: [application/json; charset=utf-8] - date: ['Sun, 01 Apr 2018 04:07:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] - server: [Microsoft-IIS/10.0] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-failure-cause: [service] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-powered-by: [ASP.NET] - status: {code: 500, message: Internal Server Error} - request: body: null headers: @@ -221,24 +142,25 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.26 - msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testpythonrg/providers/Microsoft.BotService/botServices/testpythonbot13?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbote7ad13c6/providers/Microsoft.BotService/botServices/azurebotservicee7ad13c6?api-version=2018-07-12 response: body: {string: ''} headers: + access-control-expose-headers: [Request-Context] cache-control: [no-cache] content-length: ['0'] - date: ['Sun, 01 Apr 2018 04:08:11 GMT'] + date: ['Tue, 31 Jul 2018 20:30:13 GMT'] expires: ['-1'] pragma: [no-cache] - request-context: ['appId=cid-v1:bb9497da-769a-4aa5-9960-4ba1cbfd7df7'] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] server: [Microsoft-IIS/10.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] x-powered-by: [ASP.NET] status: {code: 200, message: OK} version: 1 diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_sms_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_sms_channel.yaml index ccf3e816a2e3..1ce032da0b92 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_sms_channel.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_sms_channel.yaml @@ -16,7 +16,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed","name":"azurebotservicec02c12ed","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T18%3A49%3A28.0293013Z''\"","location":"global","sku":{"name":""},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a11","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -50,7 +50,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel","name":"azurebotservicec02c12ed/SmsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"e2377294dce6f2292077ed4a9d0518214/2/2018 6:49:32 PM\"","location":"global","properties":{"properties":{"phone":"+15153258725","accountSID":"AC421cab6999e0c8c0d1a90c6643db8f05","authToken":"507d2f4f9a832fdd042d05c500b3a88f","isValidated":true,"isEnabled":true},"etag":"W/\"e2377294dce6f2292077ed4a9d0518214/2/2018 @@ -81,7 +81,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel","name":"azurebotservicec02c12ed/SmsChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"c4d7157ef33c98d6ef63afaabc8b220a4/2/2018 6:49:33 PM\"","location":"global","properties":{"properties":{"phone":"+15153258725","accountSID":"AC421cab6999e0c8c0d1a90c6643db8f05","authToken":"507d2f4f9a832fdd042d05c500b3a88f","isValidated":true,"isEnabled":true},"etag":"W/\"c4d7157ef33c98d6ef63afaabc8b220a4/2/2018 @@ -114,7 +114,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2018-07-12 response: body: {string: ''} headers: @@ -141,7 +141,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel?api-version=2018-07-12 response: body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/azurebotservicec02c12ed/channels/SmsChannel'' under resource group ''pythonsdkbotc02c12ed'' was not found."}}'} @@ -168,7 +168,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbotc02c12ed/providers/Microsoft.BotService/botServices/azurebotservicec02c12ed?api-version=2018-07-12 response: body: {string: ''} headers: diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_telegram_channel.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_telegram_channel.yaml index 9c50fa04f545..1d112e7b7bd2 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_telegram_channel.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_channels.test_telegram_channel.yaml @@ -16,7 +16,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb","name":"azurebotservice247414eb","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T18%3A49%3A49.1365318Z''\"","location":"global","sku":{"name":""},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af511","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a11","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -49,7 +49,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel","name":"azurebotservice247414eb/TelegramChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"2f68e80acd919f46f3fa3489e9ee9d974/2/2018 6:50:01 PM\"","location":"global","properties":{"properties":{"accessToken":"520413022:AAF12lBf6s4tSqntaXEZnvrn6XOVrjQ6YN4","isValidated":true,"isEnabled":true},"etag":"W/\"2f68e80acd919f46f3fa3489e9ee9d974/2/2018 @@ -80,7 +80,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel","name":"azurebotservice247414eb/TelegramChannel","type":"Microsoft.BotService/botServices/channels","etag":"W/\"bf7d8f5819a02ef6633eaa8074317d124/2/2018 6:50:02 PM\"","location":"global","properties":{"properties":{"accessToken":"520413022:AAF12lBf6s4tSqntaXEZnvrn6XOVrjQ6YN4","isValidated":true,"isEnabled":true},"etag":"W/\"bf7d8f5819a02ef6633eaa8074317d124/2/2018 @@ -113,7 +113,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2018-07-12 response: body: {string: ''} headers: @@ -140,7 +140,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel?api-version=2018-07-12 response: body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/azurebotservice247414eb/channels/TelegramChannel'' under resource group ''pythonsdkbot247414eb'' was not found."}}'} @@ -167,7 +167,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pythonsdkbot247414eb/providers/Microsoft.BotService/botServices/azurebotservice247414eb?api-version=2018-07-12 response: body: {string: ''} headers: diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_operations.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_operations.yaml new file mode 100644 index 000000000000..d3e9c37da176 --- /dev/null +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_operations.yaml @@ -0,0 +1,195 @@ +interactions: +- request: + body: '{"location": "global", "sku": {"name": "Free"}, "kind": "Bot", "properties": + {"displayName": "this is a test bot", "description": "this is a description + for a test bot", "endpoint": "https://bing.com/messages/", "msaAppId": "056d9ad9-17a9-4cc7-aebb-43bf6f293a08", + "developerAppInsightKey": "59513bad-10a7-4d41-b4d0-b1c34c6af512", "developerAppInsightsApiKey": + "w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11", "developerAppInsightsApplicationId": + "cf03484e-3fdb-4b5e-9ad7-94bde32e5a11"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['481'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30","name":"azurebot45e81a30","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-07-30T22%3A59%3A55.0881078Z''\"","location":"global","sku":{"name":""},"kind":"Bot","tags":{},"properties":{"displayName":"this + is a test bot","description":"this is a description for a test bot","iconUrl":"//bot-framework.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"056d9ad9-17a9-4cc7-aebb-43bf6f293a08","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af512","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a11","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['942'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 22:59:54 GMT'] + etag: [W/"datetime'2018-07-30T22%3A59%3A55.0881078Z'"] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-powered-by: [ASP.NET] + status: {code: 201, message: Created} +- request: + body: '{"location": "global", "properties": {"clientId": "clientId", "clientSecret": + "clientSecret", "scopes": "read,write", "serviceProviderId": "00ea67de-bfc6-4f45-9ede-083899596b7b", + "parameters": [{"key": "key1", "value": "value1"}]}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['231'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/Connections/myconnection45e81a30?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/connections/myconnection45e81a30","name":"azurebot45e81a30/myconnection45e81a30","type":"Microsoft.BotService/botServices/connections","etag":"W/\"84ec112cb25f40b6dbc750b05a030e167/30/2018 + 11:00:18 PM\"","location":"global","properties":{"settingId":"b81b1e53-eafd-ba84-0dc0-fe4c07e72950_c1776b78-b6b0-4f60-07e3","clientId":"clientId","clientSecret":"clientSecret","scopes":"read,write","serviceProviderId":"00ea67de-bfc6-4f45-9ede-083899596b7b","serviceProviderDisplayName":null,"parameters":[{"key":"key1","value":"value1"}],"provisioningState":"Succeeded"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['714'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 23:00:18 GMT'] + etag: ['W/"84ec112cb25f40b6dbc750b05a030e167/30/2018 11:00:18 PM"'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-powered-by: [ASP.NET] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/Connections/myconnection45e81a30?api-version=2018-07-12 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/connections/myconnection45e81a30","name":"azurebot45e81a30/myconnection45e81a30","type":"Microsoft.BotService/botServices/connections","etag":"W/\"84ec112cb25f40b6dbc750b05a030e167/30/2018 + 11:00:24 PM\"","location":"global","properties":{"settingId":"b81b1e53-eafd-ba84-0dc0-fe4c07e72950_c1776b78-b6b0-4f60-07e3","clientId":"clientId","clientSecret":"clientSecret","scopes":"read,write","serviceProviderId":"00ea67de-bfc6-4f45-9ede-083899596b7b","serviceProviderDisplayName":null,"parameters":[{"key":"key1","value":"value1"}],"provisioningState":"Succeeded"}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['714'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 23:00:24 GMT'] + etag: ['W/"84ec112cb25f40b6dbc750b05a030e167/30/2018 11:00:24 PM"'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/connections?api-version=2018-07-12 + response: + body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/connections/myconnection45e81a30","name":"azurebot45e81a30/myconnection45e81a30","type":"Microsoft.BotService/botServices/connections","etag":"W/\"4cdcedef2fd8a61ec29a17aa74d29be87/30/2018 + 11:00:32 PM\"","location":"global","properties":{"serviceProviderDisplayName":"Wunderlist","id":"b81b1e53-eafd-ba84-0dc0-fe4c07e72950_c1776b78-b6b0-4f60-07e3","name":"myconnection45e81a30","serviceProviderId":"00ea67de-bfc6-4f45-9ede-083899596b7b","provisioningState":"Succeeded"}}]}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['636'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 23:00:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/Connections/myconnection45e81a30?api-version=2018-07-12 + response: + body: {string: ''} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['0'] + date: ['Mon, 30 Jul 2018 23:00:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/Connections/myconnection45e81a30?api-version=2018-07-12 + response: + body: {string: '{"error":{"code":"ResourceNotFound","message":"The resource with + identifier ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_conn45e81a30/providers/Microsoft.BotService/botServices/azurebot45e81a30/connections/myconnection45e81a30'' + is not found."}}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['274'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 23:00:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-powered-by: [ASP.NET] + status: {code: 404, message: Not Found} +version: 1 diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_serviceproviders.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_serviceproviders.yaml new file mode 100644 index 000000000000..ef4d7dfbca02 --- /dev/null +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_connections.test_bot_connection_serviceproviders.yaml @@ -0,0 +1,307 @@ +interactions: +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-botservice/0.2.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.BotService/listAuthServiceProviders?api-version=2018-07-12 + response: + body: {string: '{"value":[{"properties":{"id":"00ea67de-bfc6-4f45-9ede-083899596b7b","displayName":"Wunderlist","serviceProviderName":"wunderlist","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"01340562-8c8f-4892-abd4-90daf0e5face","displayName":"Google","serviceProviderName":"google","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"05a2de0b-ca79-456d-835f-bebef60a18fd","displayName":"Pinterest","serviceProviderName":"pinterest","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"0ea750dc-3d8f-4093-874d-ab68298299d4","displayName":"appFigures","serviceProviderName":"appFigures","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Consumer + Key (API Key)","description":"The id used to identify this application with + the service provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"0f1a8ee8-cb00-4b10-97db-045c404a239f","displayName":"Facebook","serviceProviderName":"facebook","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"26311afb-ebf0-49fa-90a3-a0a0366923f7","displayName":"Skype + For Business","serviceProviderName":"SkypeForBusiness","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The client ID of the AAD application with permissions to + the Skype tenant.","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The client secret of the AAD application with permissions + to the Skype tenant.","helpUrl":null,"default":null},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"ResourceUri","type":"string","displayName":"Resource + URI","description":"The URI for the discovery endpoint. Need an AAD token + to access this endpoint.","helpUrl":"https://msdn.microsoft.com/en-us/skype/ucwa/authenticationusingazuread","default":"https://webdir.online.lync.com/"},{"name":"LoginUriAAD","type":"string","displayName":"Login + URI for AAD","description":"The URI for the AAD login endpoint.","helpUrl":null,"default":"https://login.microsoftonline.com"}]}},{"properties":{"id":"29d6ab23-bb51-4e91-a010-d38c1e30d1c4","displayName":"Outlook","serviceProviderName":"outlook","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"307d995f-f1ce-4918-bd3f-037685e9d241","displayName":"SharePoint + Online","serviceProviderName":"SharePointOnline","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"GrantType","type":"string","displayName":"Grant + Type","description":"Oauth2 grant type to use.","helpUrl":null,"default":"Code"},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"DiscoveryUri","type":"string","displayName":"Discovery + URL","description":"The Sharepoint Online Azure Active Directory discovery + URL.","helpUrl":null,"default":"https://api.office.com/discovery/"},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"Capability","type":"string","displayName":"Capability","description":"Resource + for which AccessToken needs to be obtained.","helpUrl":"http://msdn.microsoft.com/en-us/office/office365/howto/discover-service-endpoints","default":"RootSite"},{"name":"ResourceUri","type":"string","displayName":"Resource + URL","description":"The resource to get authorization for.","helpUrl":null,"default":null}]}},{"properties":{"id":"30dd229c-58e3-4a48-bdfd-91ec48eb906c","displayName":"Azure + Active Directory v2","serviceProviderName":"Aadv2","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"}]}},{"properties":{"id":"38b67016-73e2-4102-9fad-e348607cc800","displayName":"LinkedIn","serviceProviderName":"linkedin","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"407d4275-4e43-4fc9-b179-a1022492fa23","displayName":"Trello","serviceProviderName":"trello","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Consumer + Key (API Key)","description":"The id used to identify this application with + the service provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null},{"name":"ApplicationDisplayName","type":"string","displayName":"Application + Display Name","description":"The name of the application showed during authorization","helpUrl":null,"default":"Unnamed + Application"}]}},{"properties":{"id":"42525a7c-c853-4d4e-9032-deaa67f3de8e","displayName":"Sharepoint + Server","serviceProviderName":"SharepointServer","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"ResourceUri","type":"string","displayName":"ResourceUri","description":"The + resource URI for AAD.","helpUrl":null,"default":null},{"name":"TenantId","type":"string","displayName":"TenantId","description":"The + AAD tenant ID for this application.","helpUrl":null,"default":null}]}},{"properties":{"id":"48588eaf-3c7A-46db-88B9-0ea77d6C451a","displayName":"Workday","serviceProviderName":"workday","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Workday login URL.","helpUrl":null,"default":null},{"name":"TokenUri","type":"string","displayName":"Token + URL","description":"The Workday token URL.","helpUrl":null,"default":null},{"name":"InstanceName","type":"string","displayName":"Instance + Name","description":"The Workday instance name specific for your tenant.","helpUrl":null,"default":null}]}},{"properties":{"id":"4b5c96f6-cca7-4048-bfd2-53e850a183f1","displayName":"Generic + Oauth 2","serviceProviderName":"oauth2","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"AuthorizationUrl","type":"string","displayName":"Authorization + URL","description":"The authorization endpoint URL","helpUrl":null,"default":null},{"name":"TokenUrl","type":"string","displayName":"Token + URL","description":"The token endpoint URL","helpUrl":null,"default":null},{"name":"RefreshUrl","type":"string","displayName":"Refresh + URL","description":"The token refresh endpoint URL","helpUrl":null,"default":null}]}},{"properties":{"id":"4b7816ab-ea29-487a-96a5-1918b5661d8e","displayName":"Slack","serviceProviderName":"slack","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"4f349199-7980-48f0-9b1b-282347f5de2a","displayName":"Zendesk","serviceProviderName":"zendesk","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"SubDomain","type":"string","displayName":"Subdomain","description":"The + subdomain name used to identify the Zendesk Site URL","helpUrl":null,"default":null},{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"51dd6264-6d45-4e46-b720-5ff7e8c28873","displayName":"Dynamics + CRM Online","serviceProviderName":"DynamicsCrmOnline","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"GrantType","type":"string","displayName":"Grant + Type","description":"Oauth2 grant type to use.","helpUrl":null,"default":"Code"},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"ResourceUriAAD","type":"string","displayName":"Resource + URL","description":"The Azure Active Directory discovery URL.","helpUrl":null,"default":"https://api.office.com/discovery/"},{"name":"DiscoveryUri","type":"string","displayName":"Full + Discovery URL","description":"TEST ONLY discovery URL. This isn''t needed + for this setting to function.","helpUrl":null,"default":"about:blank"},{"name":"ResourceUri","type":"string","displayName":"Resource + URL","description":"The resource to get authorization for.","helpUrl":null,"default":null}]}},{"properties":{"id":"5232e24f-b6c6-4920-b09d-d93a520c92e9","displayName":"Azure + Active Directory","serviceProviderName":"Aad","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"GrantType","type":"string","displayName":"Grant + Type","description":"Oauth2 grant type to use.","helpUrl":null,"default":"Code"},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"ResourceUri","type":"string","displayName":"Resource + URL","description":"The resource to get authorization for.","helpUrl":null,"default":null}]}},{"properties":{"id":"549dcd43-e619-4a19-8bb1-83524a472646","displayName":"Smartsheet","serviceProviderName":"smartsheet","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"58189554-6279-4b11-97c8-e3d8245da5ef","displayName":"Flickr","serviceProviderName":"flickr","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"596e594f-7212-43a8-8e14-4e5a1fb086cb","displayName":"Visual + Studio Online","serviceProviderName":"visualstudio","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"6587ef92-9050-4699-832a-a263aed32448","displayName":"Office + 365 (Discovery)","serviceProviderName":"Office365","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"GrantType","type":"string","displayName":"Grant + Type","description":"Oauth2 grant type to use.","helpUrl":null,"default":"Code"},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"DiscoveryUri","type":"string","displayName":"Discovery + URL","description":"The Office365 Azure Active Directory discovery URL.","helpUrl":null,"default":"https://api.office.com/discovery/"},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"Capability","type":"string","displayName":"Capability","description":"Resource + for which AccessToken needs to be obtained.","helpUrl":"http://msdn.microsoft.com/en-us/office/office365/howto/discover-service-endpoints","default":"Contacts"},{"name":"ResourceUri","type":"string","displayName":"Resource + URL","description":"The resource to get authorization for.","helpUrl":null,"default":null}]}},{"properties":{"id":"65d314ec-3b66-4021-b2c9-6d8c2f7148ff","displayName":"OneDrive","serviceProviderName":"onedrive","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"68d0136a-6396-41d8-9dbf-1b2843ed1ff7","displayName":"Basecamp","serviceProviderName":"basecamp","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"6b6010fd-266b-492a-b150-c87b9bad7339","displayName":"Instagram","serviceProviderName":"instagram","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"6b9e493f-950f-4451-85d6-0fc7c0f2c9b1","displayName":"MailChimp","serviceProviderName":"mailchimp","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"719a075e-37f9-4c6b-9633-e6167c12536e","displayName":"Office + 365","serviceProviderName":"Office365User","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The Active Active Directory client ID","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The Azure Active Directory secret","helpUrl":null,"default":null},{"name":"LoginUri","type":"string","displayName":"Login + URL","description":"The Azure Active Directory login URL.","helpUrl":null,"default":"https://login.windows.net"},{"name":"TenantId","type":"string","displayName":"Tenant + ID","description":"The tenant ID of your Azure Active Directory application.","helpUrl":null,"default":"common"},{"name":"ResourceUri","type":"string","displayName":"Resource + URL","description":"The Azure Active Directory resource URL.","helpUrl":null,"default":"https://graph.microsoft.com"}]}},{"properties":{"id":"7be3563f-3072-4846-ad8f-09e5fa685c65","displayName":"Adobe + EchoSign","serviceProviderName":"echosign","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"7dda6125-c4c2-4591-96c9-cf7ab657dcf6","displayName":"Live","serviceProviderName":"live","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"8379c6d2-b262-4d4f-b89b-68dc5b5f5482","displayName":"Oauth + 2 Generic Provider","serviceProviderName":"oauth2generic","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"ScopeListDelimiter","type":"string","displayName":"Scope + List Delimiter","description":"Character to delimit the scope list","helpUrl":null,"default":" + "},{"name":"AuthorizationUrlTemplate","type":"string","displayName":"Authorization + URL Template","description":"The authorization endpoint URL. Example: https://login.acme.com/oauth2/authorize","helpUrl":null,"default":null},{"name":"AuthorizationUrlQueryStringTemplate","type":"string","displayName":"Authorization + URL Query String Template","description":"The authorization endpoint URL query + string. Example: ?client_id={ClientId}&response_type=code&redirect_uri={RedirectUrl}&scope={Scopes}&state={State}","helpUrl":null,"default":"?client_id={ClientId}&response_type=code&redirect_uri={RedirectUrl}&scope={Scopes}&state={State}"},{"name":"TokenUrlTemplate","type":"string","displayName":"Token + URL Template","description":"The token conversion endpoint URL. Example value + would be https://api.acme.com/oauth2/token","helpUrl":null,"default":null},{"name":"TokenUrlQueryStringTemplate","type":"string","displayName":"Token + URL Query String Template","description":"The token conversion endpoint URL + query string. Example: ?client_secret={ClientSecret}","helpUrl":null,"default":""},{"name":"TokenBodyTemplate","type":"string","displayName":"Token + Body Template","description":"The token conversion body.","helpUrl":null,"default":"code={Code}&grant_type=authorization_code&redirect_uri={RedirectUrl}&client_id={ClientId}&client_secret={ClientSecret}"},{"name":"RefreshUrlTemplate","type":"string","displayName":"Refresh + URL Template","description":"The token refresh endpoint URL. Example value + would be https://api.acme.com/oauth2/token","helpUrl":null,"default":null},{"name":"RefreshUrlQueryStringTemplate","type":"string","displayName":"Refresh + URL Query String Template","description":"The token refresh endpoint URL query + string. Example: ?client_secret={ClientSecret}","helpUrl":null,"default":""},{"name":"RefreshBodyTemplate","type":"string","displayName":"Refresh + Body Template","description":"The token refresh body","helpUrl":null,"default":"refresh_token={RefreshToken}&grant_type=refresh_token&client_id={ClientId}&client_secret={ClientSecret}"}]}},{"properties":{"id":"900b8f4a-9cb3-420d-85df-ba9f8f285c20","displayName":"Spotify","serviceProviderName":"spotify","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"979935d1-226c-4ed0-95c6-f13c0ac7e1c4","displayName":"Tumblr","serviceProviderName":"tumblr","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"99b51571-bd21-4124-abf2-1ef32c90cb07","displayName":"AWeber","serviceProviderName":"AWeber","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Consumer + Key (API Key)","description":"The id used to identify this application with + the service provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"a5e55046-6a2e-446e-8d5e-4b61cca91968","displayName":"Marketo","serviceProviderName":"marketo","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"BaseUrl","type":"string","displayName":"BaseUrl","description":"Marketo + Instance BaseUrl","helpUrl":null,"default":null}]}},{"properties":{"id":"b7e2a8c4-ce26-4a94-aeeb-f203ed505fa4","displayName":"DropBox","serviceProviderName":"dropbox","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"b8491b1f-e709-4c3d-8339-5ba2182b46ee","displayName":"Box","serviceProviderName":"box","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"bb097393-2a3c-4048-b3c6-1ce9fa90a537","displayName":"Yammer","serviceProviderName":"yammer","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"bb1dc32d-85e0-4607-a511-bc77ddd414b7","displayName":"Quickbooks","serviceProviderName":"intuit","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"bcdbb5a4-d571-473b-9821-0e969a044f7d","displayName":"UserVoice","serviceProviderName":"uservoice","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"SubDomain","type":"string","displayName":"UserVoice + site Subdomain name","description":"The subdomain name used to identify the + UserVoice Site URL","helpUrl":null,"default":null},{"name":"ClientId","type":"string","displayName":"Consumer + Key (API Key)","description":"The id used to identify this application with + the service provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"bf58b8fb-74ea-4a84-8e68-03573ac9be2a","displayName":"Salesforce","serviceProviderName":"salesforce","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"LoginUri","type":"string","displayName":"Login + URL to be used","description":null,"helpUrl":null,"default":"https://login.salesforce.com"}]}},{"properties":{"id":"c676c4c4-e36b-46b2-9ff0-027a50c4e53f","displayName":"Todoist","serviceProviderName":"todoist","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"cb4103d0-e5e7-4c7A-9712-eea4edf5b5be","displayName":"Fitbit","serviceProviderName":"fitbit","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"d05eaacf-1593-4603-9c6c-d4d8fffa46cb","displayName":"GitHub","serviceProviderName":"github","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"e39b675b-2e60-4c7c-80da-ed69d6fe2dbc","displayName":"DocuSign","serviceProviderName":"docusign","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"LoginUri","type":"string","displayName":"Login + URL to be used","description":null,"helpUrl":null,"default":"https://account.docusign.com"}]}},{"properties":{"id":"e3b751a6-87f2-42df-8ccb-7bfad739c68e","displayName":"Stripe","serviceProviderName":"stripe","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"ef5d1787-3321-4a0a-b3d2-cdfe73a2f81d","displayName":"Bitly","serviceProviderName":"bitly","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"f2c897ca-64ed-4e5a-9985-00b6e29eb0ef","displayName":"Lithium","serviceProviderName":"lithium","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"LoginUrl","type":"string","displayName":"Community + URL to use","description":null,"helpUrl":null,"default":"https://lithium.com"},{"name":"ApiUrl","type":"string","displayName":"API + URL to use","description":null,"helpUrl":null,"default":"https://api.lithium.com"}]}},{"properties":{"id":"f339f995-4ac5-4ca1-b363-8492dba8be56","displayName":"Twitter","serviceProviderName":"twitter","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Consumer + Key (API Key)","description":"The id used to identify this application with + the service provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Consumer + Secret (API Secret)","description":"The shared secret used to authenticate + this application with the service provider","helpUrl":null,"default":null}]}},{"properties":{"id":"fe787ac8-1611-4192-9d8c-4b2c6bb8a533","displayName":"SugarCRM","serviceProviderName":"sugarcrm","devPortalUrl":null,"iconUrl":null,"parameters":[{"name":"ClientId","type":"string","displayName":"Client + id","description":"The id used to identify this application with the service + provider","helpUrl":null,"default":null},{"name":"ClientSecret","type":"securestring","displayName":"Client + secret","description":"The shared secret used to authenticate this application + with the service provider","helpUrl":null,"default":null},{"name":"InstanceName","type":"string","displayName":"InstanceName","description":"Sugar + CRM Site InstanceName","helpUrl":null,"default":null}]}}]}'} + headers: + access-control-expose-headers: [Request-Context] + cache-control: [no-cache] + content-length: ['37146'] + content-type: [application/json; charset=utf-8] + date: ['Mon, 30 Jul 2018 22:59:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + request-context: ['appId=cid-v1:073a6f92-8483-496a-9629-2ea276066cce'] + server: [Microsoft-IIS/10.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-powered-by: [ASP.NET] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_crud.test_bot_operations.yaml b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_crud.test_bot_operations.yaml index c12e4fac4179..584358f442e4 100644 --- a/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_crud.test_bot_operations.yaml +++ b/azure-mgmt-botservice/tests/recordings/test_mgmt_botservice_crud.test_bot_operations.yaml @@ -16,7 +16,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac","name":"azurebotserviceadda12ac","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T21%3A45%3A10.3812781Z''\"","location":"global","sku":{"name":"F0"},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f51","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -46,7 +46,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac","name":"azurebotserviceadda12ac","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T21%3A45%3A10.3812781Z''\"","location":"global","sku":{"name":"F0"},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is a description for a test bot","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f51","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -82,7 +82,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2018-07-12 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac","name":"azurebotserviceadda12ac","type":"Microsoft.BotService/botServices","etag":"W/\"datetime''2018-04-02T21%3A45%3A15.0887934Z''\"","location":"global","sku":{"name":"F0"},"kind":"Bot","properties":{"displayName":"this is a test bot","description":"this is another description","iconUrl":"//intercom-scratch.azureedge.net/bot-icons-v1/bot-framework-default.png","endpoint":"https://bing.com/messages/","msaAppId":"41a220b9-6571-4f0b-bbd2-43f1c1d82f51","developerAppInsightKey":"59513bad-10a7-4d41-b4d0-b1c34c6af52a","developerAppInsightsApplicationId":"cf03484e-3fdb-4b5e-9ad7-94bde32e5a2b","luisAppIds":[],"endpointVersion":"3.0","configuredChannels":["webchat"],"enabledChannels":["webchat","directline"],"isDeveloperAppInsightsApiKeySet":true,"provisioningState":"Succeeded"}}'} @@ -115,7 +115,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2018-07-12 response: body: {string: ''} headers: @@ -142,7 +142,7 @@ interactions: msrest_azure/0.4.21 azure-mgmt-botservice/0.1.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2017-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python_test_botadda12ac/providers/Microsoft.BotService/botServices/azurebotserviceadda12ac?api-version=2018-07-12 response: body: {string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.BotService/botServices/azurebotserviceadda12ac'' under resource group ''python_test_botadda12ac'' was not found."}}'} diff --git a/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py b/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py index cb5aded2d875..c315282be82f 100644 --- a/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py +++ b/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py @@ -25,13 +25,13 @@ def createBot(self): msa_app_id = "056d9ad9-17a9-4cc7-aebb-43bf6f293a08" developer_app_insight_key = '59513bad-10a7-4d41-b4d0-b1c34c6af511' developer_app_insights_api_key = 'w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11' - developer_app_insights_application_id = 'cf03484e-3fdb-4b5e-9ad7-94bde32e5a11' + developer_app_insights_application_id = 'cf03484e-3fdb-4b5e-9ad7-94bde32e5a19' bot = self.client.bots.create( resource_group_name = self.resource_group_name, resource_name = self.resource_name, parameters = Bot( location= location, - sku = sku.Sku(sku_name), + sku = sku.Sku(name=sku_name), kind= kind, properties= BotProperties( display_name = display_name, @@ -52,7 +52,7 @@ def tearDown(self): resource_name = self.resource_name ) - def validateCreateGetAndDeleteChannel(self, channel_name, channel_properties): + def validateCreateGetAndDeleteChannel(self, channel_name, channel_properties, run_exist_check=True, validate=None): self.createBot() botChannel = BotChannel( @@ -80,17 +80,25 @@ def validateCreateGetAndDeleteChannel(self, channel_name, channel_properties): else: self.assertTrue(channel.properties.properties.is_enabled) + if validate: + validate( + resource_group_name=self.resource_group_name, + resource_name=self.resource_name, + assertIsNotNone=self.assertIsNotNone + ) + channel = self.client.channels.delete( resource_group_name = self.resource_group_name, resource_name = self.resource_name, channel_name = channel_name ) - with self.assertRaises(ErrorException): - channel = self.client.channels.get( - resource_group_name = self.resource_group_name, - resource_name = self.resource_name, - channel_name = channel_name - ) + if run_exist_check: + with self.assertRaises(ErrorException): + channel = self.client.channels.get( + resource_group_name = self.resource_group_name, + resource_name = self.resource_name, + channel_name = channel_name + ) @ResourceGroupPreparer(name_prefix='pythonsdkbot') def test_email_channel(self, resource_group): @@ -109,37 +117,6 @@ def test_email_channel(self, resource_group): channel_properties = channel ) - # @ResourceGroupPreparer(name_prefix='pythonsdkbot') - # def test_msteams_channel(self, resource_group): - # from azure.mgmt.botservice.models import MsTeamsChannel,MsTeamsChannelProperties - # self.resource_group_name = resource_group.name - # channel = MsTeamsChannel( - # properties = MsTeamsChannelProperties( - # is_enabled = True, - # enable_messaging = True, - # ) - # ) - - # self.validateCreateGetAndDeleteChannel( - # channel_name = 'MsTeamsChannel', - # channel_properties = channel - # ) - - # @ResourceGroupPreparer(name_prefix='pythonsdkbot') - # def test_skype_channel(self, resource_group): - # from azure.mgmt.botservice.models import SkypeChannel,SkypeChannelProperties - # self.resource_group_name = resource_group.name - # channel = SkypeChannel( - # properties = SkypeChannelProperties( - # is_enabled = True, - # enable_messaging = True, - # ) - # ) - - # self.validateCreateGetAndDeleteChannel( - # channel_name = 'SkypeChannel', - # channel_properties = channel - # ) @ResourceGroupPreparer(name_prefix='pythonsdkbot') def test_telegram_channel(self, resource_group): @@ -175,3 +152,68 @@ def test_sms_channel(self, resource_group): channel_name = 'SmsChannel', channel_properties = channel ) + + @ResourceGroupPreparer(name_prefix='pythonsdkbot') + def test_msteams_channel(self, resource_group): + from azure.mgmt.botservice.models import MsTeamsChannel,MsTeamsChannelProperties + self.resource_group_name = resource_group.name + channel = MsTeamsChannel( + properties = MsTeamsChannelProperties( + is_enabled = True, + ) + ) + + self.validateCreateGetAndDeleteChannel( + channel_name = 'MsTeamsChannel', + channel_properties = channel, + run_exist_check=False + ) + + @ResourceGroupPreparer(name_prefix='pythonsdkbot') + def test_skype_channel(self, resource_group): + from azure.mgmt.botservice.models import SkypeChannel,SkypeChannelProperties + self.resource_group_name = resource_group.name + channel = SkypeChannel( + properties = SkypeChannelProperties( + is_enabled = True, + enable_messaging = True, + ) + ) + + self.validateCreateGetAndDeleteChannel( + channel_name = 'SkypeChannel', + channel_properties = channel, + run_exist_check=False + ) + + + @ResourceGroupPreparer(name_prefix='pythonsdkbot') + def test_directline_channel(self, resource_group): + # also test secrets api + def validate_directline(resource_group_name, resource_name, assertIsNotNone): + settings = self.client.channels.list_with_keys( + resource_group_name=resource_group_name, + resource_name=resource_name, + channel_name='DirectLineChannel', + ) + assertIsNotNone(settings) + assertIsNotNone(settings.properties.properties.sites[0].key) + + + from azure.mgmt.botservice.models import DirectLineChannel,DirectLineChannelProperties,DirectLineSite + self.resource_group_name = resource_group.name + channel = DirectLineChannel( + properties=DirectLineChannelProperties( + sites=[DirectLineSite( + site_name='default', + is_enabled=True, + is_v1_enabled=False, + is_v3_enabled=True)] + ) + ) + + self.validateCreateGetAndDeleteChannel( + channel_name = 'DirectLineChannel', + channel_properties = channel, + validate=validate_directline + ) \ No newline at end of file diff --git a/azure-mgmt-botservice/tests/test_mgmt_botservice_connections.py b/azure-mgmt-botservice/tests/test_mgmt_botservice_connections.py new file mode 100644 index 000000000000..ba656b59ade3 --- /dev/null +++ b/azure-mgmt-botservice/tests/test_mgmt_botservice_connections.py @@ -0,0 +1,108 @@ +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from azure.mgmt.botservice import AzureBotService +from azure.mgmt.botservice.models import ( + Bot, + BotProperties, + ErrorException, + sku +) + +class BotServiceConnectionsTestCase(AzureMgmtTestCase): + def setUp(self): + super(BotServiceConnectionsTestCase, self).setUp() + #create a bot here + self.client = self.create_mgmt_client(AzureBotService) + self.resource_name = self.get_resource_name('azurebot') + + def createBot(self): + location = 'global' + sku_name = 'Free' + kind= 'Bot' + display_name = "this is a test bot" + description= "this is a description for a test bot" + endpoint = "https://bing.com/messages/" + msa_app_id = "056d9ad9-17a9-4cc7-aebb-43bf6f293a08" + developer_app_insight_key = '59513bad-10a7-4d41-b4d0-b1c34c6af512' + developer_app_insights_api_key = 'w24iw5ocbhcig71su7ibaj63hey5ieaozeuwdv11' + developer_app_insights_application_id = 'cf03484e-3fdb-4b5e-9ad7-94bde32e5a11' + bot = self.client.bots.create( + resource_group_name = self.resource_group_name, + resource_name = self.resource_name, + parameters = Bot( + location= location, + sku = sku.Sku(name=sku_name), + kind= kind, + properties= BotProperties( + display_name = display_name, + description= description, + endpoint = endpoint, + msa_app_id = msa_app_id, + developer_app_insight_key = developer_app_insight_key, + developer_app_insights_api_key = developer_app_insights_api_key, + developer_app_insights_application_id = developer_app_insights_application_id, + ) + ) + ) + + def tearDown(self): + super(BotServiceConnectionsTestCase, self).tearDown() + + + @ResourceGroupPreparer(name_prefix='python_conn') + def test_bot_connection_operations(self, resource_group): + self.resource_group_name = resource_group.name + self.createBot() + from azure.mgmt.botservice.models import ConnectionSetting, ConnectionSettingProperties, ConnectionSettingParameter + connection_resource_name = self.get_resource_name('myconnection') + # create a connection + setting_payload = ConnectionSetting( + location='global', + properties=ConnectionSettingProperties( + client_id='clientId', + client_secret='clientSecret', + scopes='read,write', + service_provider_id='00ea67de-bfc6-4f45-9ede-083899596b7b', + parameters=[ConnectionSettingParameter(key='key1', value='value1')] + ) + ) + setting = self.client.bot_connection.create( + resource_group_name=resource_group.name, + resource_name=self.resource_name, + connection_name=connection_resource_name, + parameters=setting_payload + ) + self.assertIsNotNone(setting) + self.assertEqual(setting.properties.client_id, 'clientId') + + # get a connection + setting = self.client.bot_connection.get( + resource_group_name=resource_group.name, + resource_name=self.resource_name, + connection_name=connection_resource_name + ) + self.assertIsNotNone(setting) + #list all connections + settings = self.client.bot_connection.list_by_bot_service( + resource_group_name = resource_group.name, + resource_name=self.resource_name + ) + self.assertIsNotNone(setting) + self.assertTrue(len(list(settings)) == 1) + + # delete a connection + setting = self.client.bot_connection.delete( + resource_group_name=resource_group.name, + resource_name=self.resource_name, + connection_name=connection_resource_name + ) + with self.assertRaises(ErrorException): + setting = self.client.bot_connection.get( + resource_group_name=resource_group.name, + resource_name=self.resource_name, + connection_name=connection_resource_name + ) + + + def test_bot_connection_serviceproviders(self): + service_provider_responses = self.client.bot_connection.list_service_providers() + self.assertTrue(len(service_provider_responses.value) > 0) \ No newline at end of file diff --git a/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py b/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py index 4d5f979012be..7342439da6f7 100644 --- a/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py +++ b/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py @@ -45,7 +45,7 @@ def test_bot_operations(self, resource_group): resource_name = self.resource_name, parameters = Bot( location= self.location, - sku = sku.Sku(self.sku_name), + sku = sku.Sku(name=self.sku_name), kind= self.kind, properties= BotProperties( display_name = self.display_name, @@ -84,4 +84,4 @@ def test_bot_operations(self, resource_group): bot = self.client.bots.get( resource_group_name = self.resource_group_name, resource_name = self.resource_name - ) + ) \ No newline at end of file