From 0a39c2af6d3fd99fd32d858133bf87759b5de124 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 3 Apr 2018 17:27:32 +0000 Subject: [PATCH 1/2] Generated from 7383f8e27f9ce7c42aa84f41a0b1be62fc4a5ce6 Merge branch 'master' into master --- .../mgmt/botservice/azure_bot_service.py | 13 +- .../azure/mgmt/botservice/models/__init__.py | 98 ++++- .../models/azure_bot_service_enums.py | 7 +- .../models/{bot_resource.py => bot.py} | 8 +- .../mgmt/botservice/models/bot_channel.py | 62 +++ ...resource_paged.py => bot_channel_paged.py} | 8 +- .../mgmt/botservice/models/bot_channel_py3.py | 62 +++ .../azure/mgmt/botservice/models/bot_paged.py | 27 ++ ...source_properties.py => bot_properties.py} | 4 +- ...roperties_py3.py => bot_properties_py3.py} | 4 +- .../{bot_resource_py3.py => bot_py3.py} | 8 +- .../azure/mgmt/botservice/models/channel.py | 43 ++ .../mgmt/botservice/models/channel_py3.py | 43 ++ ...> check_name_availability_request_body.py} | 14 +- ...eck_name_availability_request_body_py3.py} | 14 +- .../check_name_availability_response_body.py | 11 +- ...eck_name_availability_response_body_py3.py | 11 +- .../botservice/models/direct_line_channel.py | 40 ++ .../models/direct_line_channel_properties.py | 28 ++ .../direct_line_channel_properties_py3.py | 28 ++ .../models/direct_line_channel_py3.py | 40 ++ .../botservice/models/direct_line_site.py | 70 ++++ .../botservice/models/direct_line_site_py3.py | 70 ++++ .../mgmt/botservice/models/email_channel.py | 39 ++ .../models/email_channel_properties.py | 44 ++ .../models/email_channel_properties_py3.py | 44 ++ .../botservice/models/email_channel_py3.py | 39 ++ .../botservice/models/facebook_channel.py | 38 ++ .../models/facebook_channel_properties.py | 66 +++ .../models/facebook_channel_properties_py3.py | 66 +++ .../botservice/models/facebook_channel_py3.py | 38 ++ .../mgmt/botservice/models/kik_channel.py | 38 ++ .../models/kik_channel_properties.py | 48 +++ .../models/kik_channel_properties_py3.py | 48 +++ .../mgmt/botservice/models/kik_channel_py3.py | 38 ++ .../botservice/models/ms_teams_channel.py | 39 ++ .../models/ms_teams_channel_properties.py | 54 +++ .../models/ms_teams_channel_properties_py3.py | 54 +++ .../botservice/models/ms_teams_channel_py3.py | 39 ++ .../azure/mgmt/botservice/models/sku.py | 4 +- .../azure/mgmt/botservice/models/sku_py3.py | 4 +- .../mgmt/botservice/models/skype_channel.py | 39 ++ .../models/skype_channel_properties.py | 66 +++ .../models/skype_channel_properties_py3.py | 66 +++ .../botservice/models/skype_channel_py3.py | 39 ++ .../mgmt/botservice/models/slack_channel.py | 39 ++ .../models/slack_channel_properties.py | 77 ++++ .../models/slack_channel_properties_py3.py | 77 ++++ .../botservice/models/slack_channel_py3.py | 39 ++ .../mgmt/botservice/models/sms_channel.py | 38 ++ .../models/sms_channel_properties.py | 53 +++ .../models/sms_channel_properties_py3.py | 53 +++ .../mgmt/botservice/models/sms_channel_py3.py | 38 ++ .../botservice/models/telegram_channel.py | 39 ++ .../models/telegram_channel_properties.py | 43 ++ .../models/telegram_channel_properties_py3.py | 43 ++ .../botservice/models/telegram_channel_py3.py | 39 ++ .../botservice/models/web_chat_channel.py | 39 ++ .../models/web_chat_channel_properties.py | 39 ++ .../models/web_chat_channel_properties_py3.py | 39 ++ .../botservice/models/web_chat_channel_py3.py | 39 ++ .../mgmt/botservice/models/web_chat_site.py | 64 +++ .../botservice/models/web_chat_site_py3.py | 64 +++ .../mgmt/botservice/operations/__init__.py | 6 +- ...vices_operations.py => bots_operations.py} | 69 ++- .../operations/channels_operations.py | 395 ++++++++++++++++++ 66 files changed, 2897 insertions(+), 98 deletions(-) rename azure-mgmt-botservice/azure/mgmt/botservice/models/{bot_resource.py => bot.py} (89%) create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py rename azure-mgmt-botservice/azure/mgmt/botservice/models/{bot_resource_paged.py => bot_channel_paged.py} (69%) create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/bot_paged.py rename azure-mgmt-botservice/azure/mgmt/botservice/models/{bot_resource_properties.py => bot_properties.py} (97%) rename azure-mgmt-botservice/azure/mgmt/botservice/models/{bot_resource_properties_py3.py => bot_properties_py3.py} (97%) rename azure-mgmt-botservice/azure/mgmt/botservice/models/{bot_resource_py3.py => bot_py3.py} (88%) create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/channel_py3.py rename azure-mgmt-botservice/azure/mgmt/botservice/models/{check_name_avaialability_request_body.py => check_name_availability_request_body.py} (67%) rename azure-mgmt-botservice/azure/mgmt/botservice/models/{check_name_avaialability_request_body_py3.py => check_name_availability_request_body_py3.py} (67%) create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_py3.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.py create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site_py3.py rename azure-mgmt-botservice/azure/mgmt/botservice/operations/{bot_services_operations.py => bots_operations.py} (89%) create mode 100644 azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py 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 56e6db6efaeb..3b955a8470e0 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py @@ -13,7 +13,8 @@ from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION -from .operations.bot_services_operations import BotServicesOperations +from .operations.bots_operations import BotsOperations +from .operations.channels_operations import ChannelsOperations from .operations.operations import Operations from . import models @@ -56,8 +57,10 @@ class AzureBotService(object): :ivar config: Configuration for client. :vartype config: AzureBotServiceConfiguration - :ivar bot_services: BotServices operations - :vartype bot_services: azure.mgmt.botservice.operations.BotServicesOperations + :ivar bots: Bots operations + :vartype bots: azure.mgmt.botservice.operations.BotsOperations + :ivar channels: Channels operations + :vartype channels: azure.mgmt.botservice.operations.ChannelsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.botservice.operations.Operations @@ -80,7 +83,9 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) - self.bot_services = BotServicesOperations( + self.bots = BotsOperations( + 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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py index f38cd530ce1d..2a8404c019e2 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py @@ -12,47 +12,123 @@ try: from .sku_py3 import Sku from .resource_py3 import Resource - from .bot_resource_properties_py3 import BotResourceProperties - from .bot_resource_py3 import BotResource + from .bot_properties_py3 import BotProperties + from .bot_py3 import Bot + from .channel_py3 import Channel + from .bot_channel_py3 import BotChannel + 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 .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 - from .check_name_avaialability_request_body_py3 import CheckNameAvaialabilityRequestBody except (SyntaxError, ImportError): from .sku import Sku from .resource import Resource - from .bot_resource_properties import BotResourceProperties - from .bot_resource import BotResource + 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 - from .check_name_avaialability_request_body import CheckNameAvaialabilityRequestBody -from .bot_resource_paged import BotResourcePaged +from .bot_paged import BotPaged +from .bot_channel_paged import BotChannelPaged from .operation_entity_paged import OperationEntityPaged from .azure_bot_service_enums import ( SkuName, SkuTier, Kind, + ChannelName, ) __all__ = [ 'Sku', 'Resource', - 'BotResourceProperties', - 'BotResource', + 'BotProperties', + 'Bot', + 'Channel', + 'BotChannel', + 'FacebookChannelProperties', + 'FacebookChannel', + 'EmailChannelProperties', + 'EmailChannel', + 'MsTeamsChannelProperties', + 'MsTeamsChannel', + 'SkypeChannelProperties', + 'SkypeChannel', + 'KikChannelProperties', + 'KikChannel', + 'WebChatSite', + 'WebChatChannelProperties', + 'WebChatChannel', + 'DirectLineSite', + 'DirectLineChannelProperties', + 'DirectLineChannel', + 'TelegramChannelProperties', + 'TelegramChannel', + 'SmsChannelProperties', + 'SmsChannel', + 'SlackChannelProperties', + 'SlackChannel', 'ErrorBody', 'Error', 'ErrorException', 'OperationDisplayInfo', 'OperationEntity', + 'CheckNameAvailabilityRequestBody', 'CheckNameAvailabilityResponseBody', - 'CheckNameAvaialabilityRequestBody', - 'BotResourcePaged', + 'BotPaged', + 'BotChannelPaged', 'OperationEntityPaged', 'SkuName', 'SkuTier', 'Kind', + 'ChannelName', ] 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 7ff4004ce34d..f384780f84f2 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 @@ -22,7 +22,6 @@ class SkuTier(str, Enum): free = "Free" standard = "Standard" - premium = "Premium" class Kind(str, Enum): @@ -31,3 +30,9 @@ class Kind(str, Enum): designer = "designer" bot = "bot" function = "function" + + +class ChannelName(str, Enum): + + facebook_channel = "FacebookChannel" + email_channel = "EmailChannel" diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py similarity index 89% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py index a57092cb10aa..3a43ec5e6e95 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot.py @@ -12,7 +12,7 @@ from .resource import Resource -class BotResource(Resource): +class Bot(Resource): """Bot resource definition. Variables are only populated by the server, and will be ignored when @@ -36,7 +36,7 @@ class BotResource(Resource): :param etag: Entity Tag :type etag: str :param properties: The set of properties specific to bot resource - :type properties: ~azure.mgmt.botservice.models.BotResourceProperties + :type properties: ~azure.mgmt.botservice.models.BotProperties """ _validation = { @@ -54,9 +54,9 @@ class BotResource(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BotResourceProperties'}, + 'properties': {'key': 'properties', 'type': 'BotProperties'}, } def __init__(self, **kwargs): - super(BotResource, self).__init__(**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 new file mode 100644 index 000000000000..3211c236f2cf --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.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 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, **kwargs): + super(BotChannel, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_paged.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_paged.py similarity index 69% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_paged.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_paged.py index 4c74ffa4ffb1..7cf0ca710405 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_paged.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_paged.py @@ -12,16 +12,16 @@ from msrest.paging import Paged -class BotResourcePaged(Paged): +class BotChannelPaged(Paged): """ - A paging container for iterating over a list of :class:`BotResource ` object + A paging container for iterating over a list of :class:`BotChannel ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[BotResource]'} + 'current_page': {'key': 'value', 'type': '[BotChannel]'} } def __init__(self, *args, **kwargs): - super(BotResourcePaged, self).__init__(*args, **kwargs) + super(BotChannelPaged, self).__init__(*args, **kwargs) 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..dc113608f8f9 --- /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 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_paged.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_paged.py new file mode 100644 index 000000000000..410e37eb94b0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_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 BotPaged(Paged): + """ + A paging container for iterating over a list of :class:`Bot ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Bot]'} + } + + def __init__(self, *args, **kwargs): + + super(BotPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py similarity index 97% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py index 7cbed2a44a5c..7a91b2e87f38 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class BotResourceProperties(Model): +class BotProperties(Model): """The parameters to provide for the Bot. Variables are only populated by the server, and will be ignored when @@ -77,7 +77,7 @@ class BotResourceProperties(Model): } def __init__(self, **kwargs): - super(BotResourceProperties, self).__init__(**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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py similarity index 97% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties_py3.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py index 729d0aedef5c..d96dbadf231a 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_properties_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_properties_py3.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class BotResourceProperties(Model): +class BotProperties(Model): """The parameters to provide for the Bot. Variables are only populated by the server, and will be ignored when @@ -77,7 +77,7 @@ class BotResourceProperties(Model): } 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(BotResourceProperties, self).__init__(**kwargs) + super(BotProperties, self).__init__(**kwargs) self.display_name = display_name self.description = description self.icon_url = icon_url diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py similarity index 88% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_py3.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py index eea7b3190540..398ab7c4e295 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_resource_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py @@ -12,7 +12,7 @@ from .resource import Resource -class BotResource(Resource): +class Bot(Resource): """Bot resource definition. Variables are only populated by the server, and will be ignored when @@ -36,7 +36,7 @@ class BotResource(Resource): :param etag: Entity Tag :type etag: str :param properties: The set of properties specific to bot resource - :type properties: ~azure.mgmt.botservice.models.BotResourceProperties + :type properties: ~azure.mgmt.botservice.models.BotProperties """ _validation = { @@ -54,9 +54,9 @@ class BotResource(Resource): 'sku': {'key': 'sku', 'type': 'Sku'}, 'kind': {'key': 'kind', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'BotResourceProperties'}, + '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(BotResource, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs) + 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 new file mode 100644 index 000000000000..fb953483c7d5 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/channel.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): + 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_avaialability_request_body.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py similarity index 67% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_avaialability_request_body.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py index abf946407f52..ff60cb427088 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_avaialability_request_body.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body.py @@ -12,13 +12,15 @@ from msrest.serialization import Model -class CheckNameAvaialabilityRequestBody(Model): - """The request body for a check bot name availability request to Bot Service - Management. +class CheckNameAvailabilityRequestBody(Model): + """The request body for a request to Bot Service Management to check + availability of a bot name. - :param name: name of the bot, that needs to be checked for availability. + :param name: the name of the bot for which availability needs to be + checked. :type name: str - :param type: resource type for the bot. + :param type: the type of the bot for which availability needs to be + checked :type type: str """ @@ -28,6 +30,6 @@ class CheckNameAvaialabilityRequestBody(Model): } def __init__(self, **kwargs): - super(CheckNameAvaialabilityRequestBody, self).__init__(**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_avaialability_request_body_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py similarity index 67% rename from azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_avaialability_request_body_py3.py rename to azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py index d9485a72df31..809427793ead 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_avaialability_request_body_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/check_name_availability_request_body_py3.py @@ -12,13 +12,15 @@ from msrest.serialization import Model -class CheckNameAvaialabilityRequestBody(Model): - """The request body for a check bot name availability request to Bot Service - Management. +class CheckNameAvailabilityRequestBody(Model): + """The request body for a request to Bot Service Management to check + availability of a bot name. - :param name: name of the bot, that needs to be checked for availability. + :param name: the name of the bot for which availability needs to be + checked. :type name: str - :param type: resource type for the bot. + :param type: the type of the bot for which availability needs to be + checked :type type: str """ @@ -28,6 +30,6 @@ class CheckNameAvaialabilityRequestBody(Model): } def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: - super(CheckNameAvaialabilityRequestBody, self).__init__(**kwargs) + 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 d124d52a6980..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 @@ -13,14 +13,13 @@ class CheckNameAvailabilityResponseBody(Model): - """The response returned on a check bot name availability request by Bot - Service Management. + """The response body returned for a request to Bot Service Management to check + availability of a bot name. - :param valid: boolean indicating whether the bot name is available for - use. + :param valid: indicates if the bot name is valid. :type valid: bool - :param message: description indicating why the bot name is invalid, if it - is not available. + :param message: additional message from the bot management api showing why + a bot name is not available :type message: str """ 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 index d5b398532afb..0978b932dd61 100644 --- 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 @@ -13,14 +13,13 @@ class CheckNameAvailabilityResponseBody(Model): - """The response returned on a check bot name availability request by Bot - Service Management. + """The response body returned for a request to Bot Service Management to check + availability of a bot name. - :param valid: boolean indicating whether the bot name is available for - use. + :param valid: indicates if the bot name is valid. :type valid: bool - :param message: description indicating why the bot name is invalid, if it - is not available. + :param message: additional message from the bot management api showing why + a bot name is not available :type message: str """ 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 new file mode 100644 index 000000000000..dc1ed1782c6a --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel.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 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, **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 new file mode 100644 index 000000000000..67bcd592ff78 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_properties.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, **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..a1fb01701c51 --- /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 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 new file mode 100644 index 000000000000..f1f5f23ce49d --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site.py @@ -0,0 +1,70 @@ +# 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 + :vartype key: str + :ivar key2: Secondary key + :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, **kwargs): + super(DirectLineSite, self).__init__(**kwargs) + self.site_id = None + self.site_name = kwargs.get('site_name', None) + self.key = None + self.key2 = None + self.is_enabled = kwargs.get('is_enabled', None) + self.is_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..bbd016cb6987 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_site_py3.py @@ -0,0 +1,70 @@ +# 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 + :vartype key: str + :ivar key2: Secondary key + :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 new file mode 100644 index 000000000000..d398a52ffcbe --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel.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 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, **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 new file mode 100644 index 000000000000..e2d7af06d0ea --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_properties.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 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 + :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, **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..59836130bdc3 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_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 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 + :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..78716e50a843 --- /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 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/facebook_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.py new file mode 100644 index 000000000000..fbb18f5a8cd9 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel.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 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, **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 new file mode 100644 index 000000000000..21920dae569f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_properties.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 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 + :vartype verify_token: str + :param page_id: Required. Page id + :type page_id: str + :param app_id: Required. Facebook application id + :type app_id: str + :param app_secret: Required. Facebook application secret + :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: 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}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'verify_token': {'key': 'verifyToken', 'type': 'str'}, + 'page_id': {'key': 'pageId', 'type': 'str'}, + '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, **kwargs): + super(FacebookChannelProperties, self).__init__(**kwargs) + self.verify_token = None + self.page_id = kwargs.get('page_id', None) + self.app_id = kwargs.get('app_id', None) + self.app_secret = kwargs.get('app_secret', None) + self.access_token = kwargs.get('access_token', None) + self.callback_url = None + 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..1aef2c7d2015 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_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 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 + :vartype verify_token: str + :param page_id: Required. Page id + :type page_id: str + :param app_id: Required. Facebook application id + :type app_id: str + :param app_secret: Required. Facebook application secret + :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: 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}, + 'is_enabled': {'required': True}, + } + + _attribute_map = { + 'verify_token': {'key': 'verifyToken', 'type': 'str'}, + 'page_id': {'key': 'pageId', 'type': 'str'}, + '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: str, app_id: str, app_secret: str, is_enabled: bool, access_token: str=None, **kwargs) -> None: + 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.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..9935656d26fb --- /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 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/kik_channel.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.py new file mode 100644 index 000000000000..491802b33a1e --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel.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 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, **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 new file mode 100644 index 000000000000..2dedb1d87e3a --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties.py @@ -0,0 +1,48 @@ +# 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 + :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, **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..1cf59cd08ae4 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_properties_py3.py @@ -0,0 +1,48 @@ +# 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 + :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..6d00a6013964 --- /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 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 new file mode 100644 index 000000000000..9ae44eaa130b --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel.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 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, **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 new file mode 100644 index 000000000000..d23c16516a93 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties.py @@ -0,0 +1,54 @@ +# 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_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 + :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: 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'}, + 'call_mode': {'key': 'callMode', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(MsTeamsChannelProperties, 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.call_mode = kwargs.get('call_mode', 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..78ac9d2e9071 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/ms_teams_channel_properties_py3.py @@ -0,0 +1,54 @@ +# 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_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 + :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: 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'}, + 'call_mode': {'key': 'callMode', '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, call_mode: str=None, **kwargs) -> None: + super(MsTeamsChannelProperties, 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.call_mode = call_mode + 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..4dc97a3cacd2 --- /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 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/sku.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py index ead78bbd533b..e06cf94ad50c 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku.py @@ -23,7 +23,7 @@ class Sku(Model): :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', 'Premium' + values include: 'Free', 'Standard' :vartype tier: str or ~azure.mgmt.botservice.models.SkuTier """ @@ -34,7 +34,7 @@ class Sku(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'tier': {'key': 'tier', 'type': 'str'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py index badb4d851189..76b5c0fc7993 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sku_py3.py @@ -23,7 +23,7 @@ class Sku(Model): :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', 'Premium' + values include: 'Free', 'Standard' :vartype tier: str or ~azure.mgmt.botservice.models.SkuTier """ @@ -34,7 +34,7 @@ class Sku(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'SkuTier'}, + 'tier': {'key': 'tier', 'type': 'str'}, } def __init__(self, *, name, **kwargs) -> 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 new file mode 100644 index 000000000000..4c30e874de49 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel.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 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, **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 new file mode 100644 index 000000000000..aa9c20f0b6cd --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_properties.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, **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..67302743360a --- /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 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 new file mode 100644 index 000000000000..102b7c5c4860 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel.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 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, **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 new file mode 100644 index 000000000000..51d81f50aa3e --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties.py @@ -0,0 +1,77 @@ +# 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 + :type client_secret: str + :param verification_token: Required. The Slack verification token + :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, **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 = 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..850b5d2c318d --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_properties_py3.py @@ -0,0 +1,77 @@ +# 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 + :type client_secret: str + :param verification_token: Required. The Slack verification token + :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..3291b0e00f4a --- /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 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 new file mode 100644 index 000000000000..9a4f908ab007 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel.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 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, **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 new file mode 100644 index 000000000000..d701d87830ce --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties.py @@ -0,0 +1,53 @@ +# 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 + :type account_sid: str + :param auth_token: Required. The Sms auth token + :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, **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..b73a66c81551 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_properties_py3.py @@ -0,0 +1,53 @@ +# 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 + :type account_sid: str + :param auth_token: Required. The Sms auth token + :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..219a9213455e --- /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 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 new file mode 100644 index 000000000000..5b13451c4b06 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel.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 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, **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 new file mode 100644 index 000000000000..f2492ffe985f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties.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 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 + :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, **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..f6fae378b36c --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_properties_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 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 + :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..727a12468b5c --- /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 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 new file mode 100644 index 000000000000..15b28e507c8d --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel.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 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, **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 new file mode 100644 index 000000000000..e1984da8ad00 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_channel_properties.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, **kwargs): + super(WebChatChannelProperties, self).__init__(**kwargs) + self.web_chat_embed_code = None + 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..ac585d58cdb8 --- /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 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 new file mode 100644 index 000000000000..f9ef917fa0ae --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site.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 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 + :vartype key: str + :ivar key2: Secondary key + :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, **kwargs): + super(WebChatSite, self).__init__(**kwargs) + self.site_id = None + self.site_name = kwargs.get('site_name', None) + self.key = None + self.key2 = None + self.is_enabled = kwargs.get('is_enabled', None) + self.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..856d0c348c79 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/web_chat_site_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 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 + :vartype key: str + :ivar key2: Secondary key + :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 0537d16eda3d..a587b5bcc9fd 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py @@ -9,10 +9,12 @@ # regenerated. # -------------------------------------------------------------------------- -from .bot_services_operations import BotServicesOperations +from .bots_operations import BotsOperations +from .channels_operations import ChannelsOperations from .operations import Operations __all__ = [ - 'BotServicesOperations', + 'BotsOperations', + 'ChannelsOperations', 'Operations', ] diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_services_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py similarity index 89% rename from azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_services_operations.py rename to azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py index fd108128b978..6218f6ba9617 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_services_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py @@ -15,8 +15,8 @@ from .. import models -class BotServicesOperations(object): - """BotServicesOperations operations. +class BotsOperations(object): + """BotsOperations operations. :param client: Client for service requests. :param config: Configuration of service client. @@ -47,14 +47,14 @@ def create( :param resource_name: The name of the Bot resource. :type resource_name: str :param parameters: The parameters to provide for the created bot. - :type parameters: ~azure.mgmt.botservice.models.BotResource + :type parameters: ~azure.mgmt.botservice.models.Bot :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: BotResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.botservice.models.BotResource or + :return: Bot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.Bot or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` @@ -83,7 +83,7 @@ def create( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'BotResource') + body_content = self._serialize.body(parameters, 'Bot') # Construct and send request request = self._client.put(url, query_parameters) @@ -96,9 +96,9 @@ def create( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BotResource', response) + deserialized = self._deserialize('Bot', response) if response.status_code == 201: - deserialized = self._deserialize('BotResource', response) + deserialized = self._deserialize('Bot', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -128,19 +128,19 @@ def update( :param etag: Entity Tag :type etag: str :param properties: The set of properties specific to bot resource - :type properties: ~azure.mgmt.botservice.models.BotResourceProperties + :type properties: ~azure.mgmt.botservice.models.BotProperties :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: BotResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.botservice.models.BotResource or + :return: Bot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.Bot or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` """ - parameters = models.BotResource(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) + parameters = models.Bot(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) # Construct URL url = self.update.metadata['url'] @@ -166,7 +166,7 @@ def update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'BotResource') + body_content = self._serialize.body(parameters, 'Bot') # Construct and send request request = self._client.patch(url, query_parameters) @@ -179,9 +179,9 @@ def update( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BotResource', response) + deserialized = self._deserialize('Bot', response) if response.status_code == 201: - deserialized = self._deserialize('BotResource', response) + deserialized = self._deserialize('Bot', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -258,8 +258,8 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: BotResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.botservice.models.BotResource or + :return: Bot or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.Bot or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorException` @@ -297,7 +297,7 @@ def get( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BotResource', response) + deserialized = self._deserialize('Bot', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -319,9 +319,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of BotResource + :return: An iterator like instance of Bot :rtype: - ~azure.mgmt.botservice.models.BotResourcePaged[~azure.mgmt.botservice.models.BotResource] + ~azure.mgmt.botservice.models.BotPaged[~azure.mgmt.botservice.models.Bot] :raises: :class:`ErrorException` """ @@ -365,11 +365,11 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BotResourcePaged(internal_paging, self._deserialize.dependencies) + deserialized = models.BotPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.BotResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.BotPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized @@ -385,9 +385,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of BotResource + :return: An iterator like instance of Bot :rtype: - ~azure.mgmt.botservice.models.BotResourcePaged[~azure.mgmt.botservice.models.BotResource] + ~azure.mgmt.botservice.models.BotPaged[~azure.mgmt.botservice.models.Bot] :raises: :class:`ErrorException` """ @@ -430,11 +430,11 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.BotResourcePaged(internal_paging, self._deserialize.dependencies) + deserialized = models.BotPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.BotResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.BotPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized @@ -444,10 +444,11 @@ def get_check_name_availability( self, name=None, type=None, custom_headers=None, raw=False, **operation_config): """Check whether a bot name is available. - :param name: name of the bot, that needs to be checked for - availability. + :param name: the name of the bot for which availability needs to be + checked. :type name: str - :param type: resource type for the bot. + :param type: the type of the bot for which availability needs to be + checked :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -462,14 +463,10 @@ def get_check_name_availability( :raises: :class:`ErrorException` """ - parameters = models.CheckNameAvaialabilityRequestBody(name=name, type=type) + parameters = models.CheckNameAvailabilityRequestBody(name=name, type=type) # Construct URL url = self.get_check_name_availability.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 = {} @@ -486,7 +483,7 @@ def get_check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'CheckNameAvaialabilityRequestBody') + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequestBody') # Construct and send request request = self._client.get(url, query_parameters) @@ -506,4 +503,4 @@ def get_check_name_availability( return client_raw_response return deserialized - get_check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/checkNameAvailability'} + get_check_name_availability.metadata = {'url': '/providers/Microsoft.BotService/botServices/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 new file mode 100644 index 000000000000..12cb8b9d223c --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py @@ -0,0 +1,395 @@ +# 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 ChannelsOperations(object): + """ChannelsOperations 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: "2017-12-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-12-01" + + self.config = config + + 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. + :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 + include: 'FacebookChannel', 'EmailChannel', 'KikChannel', + 'TelegramChannel', 'SlackChannel' + :type channel_name: str + :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 + :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.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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'), + '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['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, 'BotChannel') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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('BotChannel', response) + if response.status_code == 201: + deserialized = self._deserialize('BotChannel', 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}/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. + :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 + include: 'FacebookChannel', 'EmailChannel', 'KikChannel', + 'TelegramChannel', 'SlackChannel' + :type channel_name: str + :param location: Specifies the location of the resource. + :type location: 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 + :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` + """ + parameters = models.BotChannel(location=location, tags=tags, sku=sku, kind=kind, etag=etag, properties=properties) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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'), + '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['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, 'BotChannel') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, 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('BotChannel', response) + if response.status_code == 201: + deserialized = self._deserialize('BotChannel', 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}/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. + :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. + :type channel_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'), + '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') + } + 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['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 and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, 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}/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. + :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. + :type channel_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: BotChannel or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.BotChannel 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'), + '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') + } + 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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, 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_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. + :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 BotChannel + :rtype: + ~azure.mgmt.botservice.models.BotChannelPaged[~azure.mgmt.botservice.models.BotChannel] + :raises: + :class:`ErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + '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['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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.BotChannelPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BotChannelPaged(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/{resourceName}/channels'} From 5f578d1168718521781753b5c8386a497bee847f Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 3 Apr 2018 11:12:00 -0700 Subject: [PATCH 2/2] Adapt BotService tests to Autorest.Python 3.x --- azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py | 2 +- azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py b/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py index cb5aded2d875..096670a3d4f7 100644 --- a/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py +++ b/azure-mgmt-botservice/tests/test_mgmt_botservice_channels.py @@ -31,7 +31,7 @@ def createBot(self): 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, diff --git a/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py b/azure-mgmt-botservice/tests/test_mgmt_botservice_crud.py index 4d5f979012be..8af48220cf8a 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,