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 607e1471272c..8facb940856d 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py @@ -16,6 +16,7 @@ from .operations.bots_operations import BotsOperations from .operations.channels_operations import ChannelsOperations from .operations.operations import Operations +from .operations.bot_connection_operations import BotConnectionOperations from . import models @@ -63,6 +64,8 @@ class AzureBotService(SDKClient): :vartype channels: azure.mgmt.botservice.operations.ChannelsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.botservice.operations.Operations + :ivar bot_connection: BotConnection operations + :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -89,3 +92,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) + self.bot_connection = BotConnectionOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py index 31a67242dbe7..d1d07d8093e7 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py @@ -39,6 +39,14 @@ from .sms_channel_py3 import SmsChannel from .slack_channel_properties_py3 import SlackChannelProperties from .slack_channel_py3 import SlackChannel + from .connection_item_name_py3 import ConnectionItemName + from .connection_setting_parameter_py3 import ConnectionSettingParameter + from .connection_setting_properties_py3 import ConnectionSettingProperties + from .connection_setting_py3 import ConnectionSetting + from .service_provider_parameter_py3 import ServiceProviderParameter + from .service_provider_properties_py3 import ServiceProviderProperties + from .service_provider_py3 import ServiceProvider + from .service_provider_response_list_py3 import ServiceProviderResponseList from .error_body_py3 import ErrorBody from .error_py3 import Error, ErrorException from .operation_display_info_py3 import OperationDisplayInfo @@ -75,6 +83,14 @@ from .sms_channel import SmsChannel from .slack_channel_properties import SlackChannelProperties from .slack_channel import SlackChannel + from .connection_item_name import ConnectionItemName + from .connection_setting_parameter import ConnectionSettingParameter + from .connection_setting_properties import ConnectionSettingProperties + from .connection_setting import ConnectionSetting + from .service_provider_parameter import ServiceProviderParameter + from .service_provider_properties import ServiceProviderProperties + from .service_provider import ServiceProvider + from .service_provider_response_list import ServiceProviderResponseList from .error_body import ErrorBody from .error import Error, ErrorException from .operation_display_info import OperationDisplayInfo @@ -84,6 +100,7 @@ from .bot_paged import BotPaged from .bot_channel_paged import BotChannelPaged from .operation_entity_paged import OperationEntityPaged +from .connection_setting_paged import ConnectionSettingPaged from .azure_bot_service_enums import ( SkuName, SkuTier, @@ -121,6 +138,14 @@ 'SmsChannel', 'SlackChannelProperties', 'SlackChannel', + 'ConnectionItemName', + 'ConnectionSettingParameter', + 'ConnectionSettingProperties', + 'ConnectionSetting', + 'ServiceProviderParameter', + 'ServiceProviderProperties', + 'ServiceProvider', + 'ServiceProviderResponseList', 'ErrorBody', 'Error', 'ErrorException', 'OperationDisplayInfo', @@ -130,6 +155,7 @@ 'BotPaged', 'BotChannelPaged', 'OperationEntityPaged', + 'ConnectionSettingPaged', 'SkuName', 'SkuTier', 'Kind', 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 index dc113608f8f9..430d49a369de 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class BotChannel(Resource): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py index 398ab7c4e295..c68447077439 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/bot_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .resource_py3 import Resource class Bot(Resource): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py new file mode 100644 index 000000000000..bcf5c18f0e66 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionItemName(Model): + """The display name of a connection Item Setting registered with the Bot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Connection Item name that has been added in the API + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionItemName, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py new file mode 100644 index 000000000000..90a58e610be9 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_item_name_py3.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionItemName(Model): + """The display name of a connection Item Setting registered with the Bot. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Connection Item name that has been added in the API + :vartype name: str + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectionItemName, self).__init__(**kwargs) + self.name = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py new file mode 100644 index 000000000000..dec1cdc63118 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ConnectionSetting(Resource): + """Bot channel resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.botservice.models.Sku + :param kind: Required. Gets or sets the Kind of the resource. Possible + values include: 'sdk', 'designer', 'bot', 'function' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot channel resource + :type properties: + ~azure.mgmt.botservice.models.ConnectionSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, + } + + def __init__(self, **kwargs): + super(ConnectionSetting, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py new file mode 100644 index 000000000000..5708e4ee7ee3 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ConnectionSettingPaged(Paged): + """ + A paging container for iterating over a list of :class:`ConnectionSetting ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ConnectionSetting]'} + } + + def __init__(self, *args, **kwargs): + + super(ConnectionSettingPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py new file mode 100644 index 000000000000..6ee221e51c04 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingParameter(Model): + """Extra Parameter in a Connection Setting Properties to indicate service + provider specific properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key: Key for the Connection Setting Parameter. + :vartype key: str + :ivar value: Value associated with the Connection Setting Parameter. + :vartype value: str + """ + + _validation = { + 'key': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectionSettingParameter, self).__init__(**kwargs) + self.key = None + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py new file mode 100644 index 000000000000..428387c42272 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingParameter(Model): + """Extra Parameter in a Connection Setting Properties to indicate service + provider specific properties. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar key: Key for the Connection Setting Parameter. + :vartype key: str + :ivar value: Value associated with the Connection Setting Parameter. + :vartype value: str + """ + + _validation = { + 'key': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ConnectionSettingParameter, self).__init__(**kwargs) + self.key = None + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py new file mode 100644 index 000000000000..50099ba956e6 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingProperties(Model): + """Properties for a Connection Setting Item. + + :param client_id: Client Id associated with the Connection Setting. + :type client_id: str + :param client_secret: Client Secret associated with the Connection Setting + :type client_secret: str + :param scopes: Scopes associated with the Connection Setting + :type scopes: str + :param service_provider_id: Service Provider Id associated with the + Connection Setting + :type service_provider_id: str + :param service_provider_display_name: Service Provider Display Name + associated with the Connection Setting + :type service_provider_display_name: str + :param parameters: Service Provider Parameters associated with the + Connection Setting + :type parameters: + list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, + 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, + 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + } + + def __init__(self, **kwargs): + super(ConnectionSettingProperties, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.client_secret = kwargs.get('client_secret', None) + self.scopes = kwargs.get('scopes', None) + self.service_provider_id = kwargs.get('service_provider_id', None) + self.service_provider_display_name = kwargs.get('service_provider_display_name', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py new file mode 100644 index 000000000000..e6952cde3595 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectionSettingProperties(Model): + """Properties for a Connection Setting Item. + + :param client_id: Client Id associated with the Connection Setting. + :type client_id: str + :param client_secret: Client Secret associated with the Connection Setting + :type client_secret: str + :param scopes: Scopes associated with the Connection Setting + :type scopes: str + :param service_provider_id: Service Provider Id associated with the + Connection Setting + :type service_provider_id: str + :param service_provider_display_name: Service Provider Display Name + associated with the Connection Setting + :type service_provider_display_name: str + :param parameters: Service Provider Parameters associated with the + Connection Setting + :type parameters: + list[~azure.mgmt.botservice.models.ConnectionSettingParameter] + """ + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'client_secret': {'key': 'clientSecret', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': 'str'}, + 'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'}, + 'service_provider_display_name': {'key': 'serviceProviderDisplayName', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ConnectionSettingParameter]'}, + } + + def __init__(self, *, client_id: str=None, client_secret: str=None, scopes: str=None, service_provider_id: str=None, service_provider_display_name: str=None, parameters=None, **kwargs) -> None: + super(ConnectionSettingProperties, self).__init__(**kwargs) + self.client_id = client_id + self.client_secret = client_secret + self.scopes = scopes + self.service_provider_id = service_provider_id + self.service_provider_display_name = service_provider_display_name + self.parameters = parameters diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py new file mode 100644 index 000000000000..12ab93de6219 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_py3.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ConnectionSetting(Resource): + """Bot channel resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param sku: Gets or sets the SKU of the resource. + :type sku: ~azure.mgmt.botservice.models.Sku + :param kind: Required. Gets or sets the Kind of the resource. Possible + values include: 'sdk', 'designer', 'bot', 'function' + :type kind: str or ~azure.mgmt.botservice.models.Kind + :param etag: Entity Tag + :type etag: str + :param properties: The set of properties specific to bot channel resource + :type properties: + ~azure.mgmt.botservice.models.ConnectionSettingProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ConnectionSettingProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, **kwargs) -> None: + super(ConnectionSetting, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/direct_line_channel_py3.py index 18a849fb23fb..069885574a54 100644 --- 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class DirectLineChannel(Channel): 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 index 7dafa6d4da85..7a9e9af59e74 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/email_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class EmailChannel(Channel): 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 index a87d7e711186..ec43910d6288 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/facebook_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class FacebookChannel(Channel): 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 index 0897c1561482..9cfbff1611bf 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/kik_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class KikChannel(Channel): 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 index b735e3c60791..b683d051282b 100644 --- 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class MsTeamsChannel(Channel): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py new file mode 100644 index 000000000000..cf50bec2ae1f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProvider(Model): + """Service Provider Definition. + + :param properties: The Properties of a Service Provider Object + :type properties: ~azure.mgmt.botservice.models.ServiceProviderProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceProviderProperties'}, + } + + def __init__(self, **kwargs): + super(ServiceProvider, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py new file mode 100644 index 000000000000..e72f95f1b8e8 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderParameter(Model): + """Extra Parameters specific to each Service Provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the Service Provider + :vartype name: str + :ivar type: Type of the Service Provider + :vartype type: str + :ivar display_name: Display Name of the Service Provider + :vartype display_name: str + :ivar description: Description of the Service Provider + :vartype description: str + :ivar help_url: Help Url for the Service Provider + :vartype help_url: str + :ivar default: Default Name for the Service Provider + :vartype default: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'help_url': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderParameter, self).__init__(**kwargs) + self.name = None + self.type = None + self.display_name = None + self.description = None + self.help_url = None + self.default = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py new file mode 100644 index 000000000000..7d1f5664af8c --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_parameter_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderParameter(Model): + """Extra Parameters specific to each Service Provider. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the Service Provider + :vartype name: str + :ivar type: Type of the Service Provider + :vartype type: str + :ivar display_name: Display Name of the Service Provider + :vartype display_name: str + :ivar description: Description of the Service Provider + :vartype description: str + :ivar help_url: Help Url for the Service Provider + :vartype help_url: str + :ivar default: Default Name for the Service Provider + :vartype default: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'help_url': {'readonly': True}, + 'default': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ServiceProviderParameter, self).__init__(**kwargs) + self.name = None + self.type = None + self.display_name = None + self.description = None + self.help_url = None + self.default = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py new file mode 100644 index 000000000000..4062224d5c7d --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderProperties(Model): + """The Object used to describe a Service Provider supported by Bot Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id for Service Provider + :vartype id: str + :ivar display_name: Diplay Name of the Service Provider + :vartype display_name: str + :ivar service_provider_name: Diplay Name of the Service Provider + :vartype service_provider_name: str + :ivar dev_portal_url: Diplay Name of the Service Provider + :vartype dev_portal_url: str + :ivar icon_url: Diplay Name of the Service Provider + :vartype icon_url: str + :param parameters: The list of parameters for the Service Provider + :type parameters: + list[~azure.mgmt.botservice.models.ServiceProviderParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'service_provider_name': {'readonly': True}, + 'dev_portal_url': {'readonly': True}, + 'icon_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'dev_portal_url': {'key': 'devPortalUrl', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ServiceProviderParameter]'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderProperties, self).__init__(**kwargs) + self.id = None + self.display_name = None + self.service_provider_name = None + self.dev_portal_url = None + self.icon_url = None + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py new file mode 100644 index 000000000000..7272cb31422f --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_properties_py3.py @@ -0,0 +1,60 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderProperties(Model): + """The Object used to describe a Service Provider supported by Bot Service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Id for Service Provider + :vartype id: str + :ivar display_name: Diplay Name of the Service Provider + :vartype display_name: str + :ivar service_provider_name: Diplay Name of the Service Provider + :vartype service_provider_name: str + :ivar dev_portal_url: Diplay Name of the Service Provider + :vartype dev_portal_url: str + :ivar icon_url: Diplay Name of the Service Provider + :vartype icon_url: str + :param parameters: The list of parameters for the Service Provider + :type parameters: + list[~azure.mgmt.botservice.models.ServiceProviderParameter] + """ + + _validation = { + 'id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'service_provider_name': {'readonly': True}, + 'dev_portal_url': {'readonly': True}, + 'icon_url': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'dev_portal_url': {'key': 'devPortalUrl', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[ServiceProviderParameter]'}, + } + + def __init__(self, *, parameters=None, **kwargs) -> None: + super(ServiceProviderProperties, self).__init__(**kwargs) + self.id = None + self.display_name = None + self.service_provider_name = None + self.dev_portal_url = None + self.icon_url = None + self.parameters = parameters diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py new file mode 100644 index 000000000000..86ee2d94e5d0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProvider(Model): + """Service Provider Definition. + + :param properties: The Properties of a Service Provider Object + :type properties: ~azure.mgmt.botservice.models.ServiceProviderProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceProviderProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(ServiceProvider, self).__init__(**kwargs) + self.properties = properties diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py new file mode 100644 index 000000000000..4d2ab214edb0 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderResponseList(Model): + """The list of bot service service providers response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param next_link: The link used to get the next page of bot service + service providers. + :type next_link: str + :ivar value: Gets the list of bot service service providers and their + properties. + :vartype value: list[~azure.mgmt.botservice.models.ServiceProvider] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ServiceProvider]'}, + } + + def __init__(self, **kwargs): + super(ServiceProviderResponseList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py new file mode 100644 index 000000000000..207afd213bc6 --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/service_provider_response_list_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ServiceProviderResponseList(Model): + """The list of bot service service providers response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param next_link: The link used to get the next page of bot service + service providers. + :type next_link: str + :ivar value: Gets the list of bot service service providers and their + properties. + :vartype value: list[~azure.mgmt.botservice.models.ServiceProvider] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ServiceProvider]'}, + } + + def __init__(self, *, next_link: str=None, **kwargs) -> None: + super(ServiceProviderResponseList, self).__init__(**kwargs) + self.next_link = next_link + self.value = None diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py index bf517d5fb950..e14a4d01fffb 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/skype_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class SkypeChannel(Channel): 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 index 3a36188d290f..0b3f5af0c1fc 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/slack_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class SlackChannel(Channel): 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 index 4cd117dc982b..2e5589ec2dba 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/sms_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class SmsChannel(Channel): 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 index 84c5613aad37..8928c50d2958 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/telegram_channel_py3.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class TelegramChannel(Channel): 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 index 129c38688c41..dd3564eac32b 100644 --- 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 @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from .channel import Channel +from .channel_py3 import Channel class WebChatChannel(Channel): diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py index a587b5bcc9fd..c52c36afa15f 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py @@ -12,9 +12,11 @@ from .bots_operations import BotsOperations from .channels_operations import ChannelsOperations from .operations import Operations +from .bot_connection_operations import BotConnectionOperations __all__ = [ 'BotsOperations', 'ChannelsOperations', 'Operations', + 'BotConnectionOperations', ] diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py new file mode 100644 index 000000000000..833d572a97ea --- /dev/null +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py @@ -0,0 +1,508 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class BotConnectionOperations(object): + """BotConnectionOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Current version is 2017-12-01. Constant value: "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 list_service_providers( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists the available Service Providers for creating Connection Settings. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ServiceProviderResponseList or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ServiceProviderResponseList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_service_providers.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # 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.post(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('ServiceProviderResponseList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_service_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/BotServices/listServiceProviders'} + + def list_with_secrets( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Get a Connection Setting registration for a Bot Service. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.list_with_secrets.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['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.post(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('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets'} + + def create( + self, resource_group_name, resource_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Register a new Auth Connection for a Bot Service. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param parameters: The parameters to provide for creating the + Connection Setting. + :type parameters: ~azure.mgmt.botservice.models.ConnectionSetting + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConnectionSetting') + + # Construct and send request + request = self._client.put(url, query_parameters) + 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('ConnectionSetting', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'} + + def update( + self, resource_group_name, resource_name, connection_name, parameters, custom_headers=None, raw=False, **operation_config): + """Updates a Connection Setting registration for a Bot Service. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param parameters: The parameters to provide for updating the + Connection Setting. + :type parameters: ~azure.mgmt.botservice.models.ConnectionSetting + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ConnectionSetting') + + # Construct and send request + request = self._client.patch(url, query_parameters) + 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('ConnectionSetting', response) + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'} + + def get( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Get a Connection Setting registration for a Bot Service. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectionSetting or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.ConnectionSetting or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['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('ConnectionSetting', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'} + + def delete( + self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config): + """Deletes a Connection Setting registration for a Bot Service. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param connection_name: The name of the Bot Service Connection Setting + resource + :type connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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}/Connections/{connectionName}'} + + def list_by_bot_service( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns all the Connection Settings registered to a particular + BotService resource. + + :param resource_group_name: The name of the Bot resource group in the + user subscription. + :type resource_group_name: str + :param resource_name: The name of the Bot resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ConnectionSetting + :rtype: + ~azure.mgmt.botservice.models.ConnectionSettingPaged[~azure.mgmt.botservice.models.ConnectionSetting] + :raises: + :class:`ErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_bot_service.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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.ConnectionSettingPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ConnectionSettingPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_bot_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections'} diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py index 6218f6ba9617..905081bd1444 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bots_operations.py @@ -41,8 +41,8 @@ def create( """Creates a Bot Service. Bot Service is a resource group wide resource type. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -62,7 +62,7 @@ def create( # Construct URL url = self.create.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -111,8 +111,8 @@ def update( self, resource_group_name, resource_name, location=None, tags=None, sku=None, kind=None, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -145,7 +145,7 @@ def update( # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -194,8 +194,8 @@ def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Deletes a Bot Service from the resource group. . - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -212,7 +212,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -248,8 +248,8 @@ def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): """Returns a BotService specified by the parameters. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -267,7 +267,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -311,8 +311,8 @@ def list_by_resource_group( """Returns all the resources of a particular type belonging to a resource group. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -331,7 +331,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py index c818c4937b05..9921abb15cc1 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/channels_operations.py @@ -40,8 +40,8 @@ def create( self, resource_group_name, resource_name, channel_name, parameters, custom_headers=None, raw=False, **operation_config): """Creates a Channel registration for a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -66,7 +66,7 @@ def create( # Construct URL url = self.create.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -116,8 +116,8 @@ def update( self, resource_group_name, resource_name, channel_name, location=None, tags=None, sku=None, kind=None, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a Channel registration for a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -156,7 +156,7 @@ def update( # Construct URL url = self.update.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -206,8 +206,8 @@ def delete( self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): """Deletes a Channel registration from a Bot Service. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -226,7 +226,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -263,8 +263,8 @@ def get( self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): """Returns a BotService Channel registration specified by the parameters. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -284,7 +284,7 @@ def get( # Construct URL url = self.get.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -328,8 +328,8 @@ def list_with_keys( self, resource_group_name, resource_name, channel_name, custom_headers=None, raw=False, **operation_config): """Lists a Channel registration for a Bot Service including secrets. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -352,7 +352,7 @@ def list_with_keys( # Construct URL url = self.list_with_keys.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'channelName': self._serialize.url("channel_name", channel_name, 'ChannelName'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -397,8 +397,8 @@ def list_by_resource_group( """Returns all the Channel registrations of a particular BotService resource. - :param resource_group_name: The name of the resource group within the - user's subscription. + :param resource_group_name: The name of the Bot resource group in the + user subscription. :type resource_group_name: str :param resource_name: The name of the Bot resource. :type resource_name: str @@ -419,7 +419,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = self.list_by_resource_group.metadata['url'] path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') }