From c43cedd90d28705ad006b52185e6583d4058ef05 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 13 May 2021 01:16:44 +0000 Subject: [PATCH] CodeGen from PR 14317 in Azure/azure-rest-api-specs Merge d27415687c98cecc69d144dafa46905f4f3f5920 into fd3a9d30aa016f2df2d9429590573d48f522f2e9 --- .../azure-mgmt-botservice/MANIFEST.in | 1 + .../azure-mgmt-botservice/_meta.json | 8 ++ .../mgmt/botservice/_azure_bot_service.py | 7 +- .../azure/mgmt/botservice/models/__init__.py | 3 + .../models/_azure_bot_service_enums.py | 1 + .../azure/mgmt/botservice/models/_models.py | 87 +++++++++++++++-- .../mgmt/botservice/models/_models_py3.py | 91 +++++++++++++++--- .../mgmt/botservice/operations/__init__.py | 2 + .../operations/_bot_connection_operations.py | 4 +- .../botservice/operations/_bots_operations.py | 6 +- .../operations/_channels_operations.py | 6 +- .../operations/_direct_line_operations.py | 4 +- .../operations/_host_settings_operations.py | 94 +++++++++++++++++++ .../mgmt/botservice/operations/_operations.py | 4 +- 14 files changed, 283 insertions(+), 35 deletions(-) create mode 100644 sdk/botservice/azure-mgmt-botservice/_meta.json create mode 100644 sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py diff --git a/sdk/botservice/azure-mgmt-botservice/MANIFEST.in b/sdk/botservice/azure-mgmt-botservice/MANIFEST.in index a3cb07df876..3a9b6517412 100644 --- a/sdk/botservice/azure-mgmt-botservice/MANIFEST.in +++ b/sdk/botservice/azure-mgmt-botservice/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/botservice/azure-mgmt-botservice/_meta.json b/sdk/botservice/azure-mgmt-botservice/_meta.json new file mode 100644 index 00000000000..5a69ec87e86 --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "3666dd3310a263377b2857a7b4c0cb0bdb8536c3", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/botservice/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/botservice/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py index 4518da8b62a..efbfc8135f6 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py @@ -18,6 +18,7 @@ from .operations import DirectLineOperations from .operations import Operations from .operations import BotConnectionOperations +from .operations import HostSettingsOperations from . import models @@ -37,6 +38,8 @@ class AzureBotService(SDKClient): :vartype operations: azure.mgmt.botservice.operations.Operations :ivar bot_connection: BotConnection operations :vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations + :ivar host_settings: HostSettings operations + :vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -53,7 +56,7 @@ def __init__( super(AzureBotService, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2020-06-02' + self.api_version = '2021-03-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -67,3 +70,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.bot_connection = BotConnectionOperations( self._client, self.config, self._serialize, self._deserialize) + self.host_settings = HostSettingsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py index 40a0bf5bf7f..d0be283290a 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py @@ -34,6 +34,7 @@ from ._models_py3 import FacebookChannel from ._models_py3 import FacebookChannelProperties from ._models_py3 import FacebookPage + from ._models_py3 import HostSettingsResponse from ._models_py3 import KikChannel from ._models_py3 import KikChannelProperties from ._models_py3 import LineChannel @@ -86,6 +87,7 @@ from ._models import FacebookChannel from ._models import FacebookChannelProperties from ._models import FacebookPage + from ._models import HostSettingsResponse from ._models import KikChannel from ._models import KikChannelProperties from ._models import LineChannel @@ -151,6 +153,7 @@ 'FacebookChannel', 'FacebookChannelProperties', 'FacebookPage', + 'HostSettingsResponse', 'KikChannel', 'KikChannelProperties', 'LineChannel', diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py index 8bf05112160..63c9546c430 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py @@ -30,6 +30,7 @@ class Kind(str, Enum): designer = "designer" bot = "bot" function = "function" + azurebot = "azurebot" class Key(str, Enum): diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py index 86dfcd16fd5..64ae47412fc 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py @@ -132,7 +132,7 @@ class Resource(Model): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -186,7 +186,7 @@ class Bot(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -236,7 +236,7 @@ class BotChannel(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -308,6 +308,11 @@ class BotProperties(Model): :type is_cmek_enabled: bool :param cmek_key_vault_url: The CMK Url :type cmek_key_vault_url: str + :param is_isolated: Whether the bot is in an isolated network + :type is_isolated: bool + :param schema_transformation_version: The channel schema transformation + version for the bot + :type schema_transformation_version: str """ _validation = { @@ -335,6 +340,8 @@ class BotProperties(Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, 'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'}, 'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'}, + 'is_isolated': {'key': 'isIsolated', 'type': 'bool'}, + 'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'}, } def __init__(self, **kwargs): @@ -354,6 +361,8 @@ def __init__(self, **kwargs): self.luis_key = kwargs.get('luis_key', None) self.is_cmek_enabled = kwargs.get('is_cmek_enabled', None) self.cmek_key_vault_url = kwargs.get('cmek_key_vault_url', None) + self.is_isolated = kwargs.get('is_isolated', None) + self.schema_transformation_version = kwargs.get('schema_transformation_version', None) class CheckNameAvailabilityRequestBody(Model): @@ -451,7 +460,7 @@ class ConnectionSetting(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -703,9 +712,12 @@ class DirectLineSpeechChannelProperties(Model): All required parameters must be populated in order to send to Azure. - :param cognitive_services_subscription_id: Required. The cognitive service - subscription ID to use with this channel registration. - :type cognitive_services_subscription_id: str + :param cognitive_service_region: Required. The cognitive service region + with this channel registration. + :type cognitive_service_region: str + :param cognitive_service_subscription_key: Required. The cognitive service + subscription key to use with this channel registration. + :type cognitive_service_subscription_key: str :param is_enabled: Whether this channel is enabled or not. :type is_enabled: bool :param custom_voice_deployment_id: Custom speech model id (optional). @@ -718,11 +730,13 @@ class DirectLineSpeechChannelProperties(Model): """ _validation = { - 'cognitive_services_subscription_id': {'required': True}, + 'cognitive_service_region': {'required': True}, + 'cognitive_service_subscription_key': {'required': True}, } _attribute_map = { - 'cognitive_services_subscription_id': {'key': 'cognitiveServicesSubscriptionId', 'type': 'str'}, + 'cognitive_service_region': {'key': 'cognitiveServiceRegion', 'type': 'str'}, + 'cognitive_service_subscription_key': {'key': 'cognitiveServiceSubscriptionKey', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'custom_voice_deployment_id': {'key': 'customVoiceDeploymentId', 'type': 'str'}, 'custom_speech_model_id': {'key': 'customSpeechModelId', 'type': 'str'}, @@ -731,7 +745,8 @@ class DirectLineSpeechChannelProperties(Model): def __init__(self, **kwargs): super(DirectLineSpeechChannelProperties, self).__init__(**kwargs) - self.cognitive_services_subscription_id = kwargs.get('cognitive_services_subscription_id', None) + self.cognitive_service_region = kwargs.get('cognitive_service_region', None) + self.cognitive_service_subscription_key = kwargs.get('cognitive_service_subscription_key', None) self.is_enabled = kwargs.get('is_enabled', None) self.custom_voice_deployment_id = kwargs.get('custom_voice_deployment_id', None) self.custom_speech_model_id = kwargs.get('custom_speech_model_id', None) @@ -955,6 +970,58 @@ def __init__(self, **kwargs): self.access_token = kwargs.get('access_token', None) +class HostSettingsResponse(Model): + """The response body returned for a request to Bot Service Management to check + per subscription hostSettings. + + :param oauth_url: For in-conversation bot user authentication + :type oauth_url: str + :param to_bot_from_channel_open_id_metadata_url: For verifying incoming + tokens from the channels + :type to_bot_from_channel_open_id_metadata_url: str + :param to_bot_from_channel_token_issuer: For verifying incoming tokens + from the channels + :type to_bot_from_channel_token_issuer: str + :param to_bot_from_emulator_open_id_metadata_url: For verifying incoming + tokens from bot emulator + :type to_bot_from_emulator_open_id_metadata_url: str + :param to_channel_from_bot_login_url: For getting access token to channels + from bot host + :type to_channel_from_bot_login_url: str + :param to_channel_from_bot_oauth_scope: For getting access token to + channels from bot host + :type to_channel_from_bot_oauth_scope: str + :param validate_authority: Per cloud OAuth setting on whether authority is + validated + :type validate_authority: bool + :param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl, + used by SDK < v4.12 + :type bot_open_id_metadata: str + """ + + _attribute_map = { + 'oauth_url': {'key': 'OAuthUrl', 'type': 'str'}, + 'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'}, + 'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'}, + 'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'}, + 'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'}, + 'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'}, + 'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'}, + 'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HostSettingsResponse, self).__init__(**kwargs) + self.oauth_url = kwargs.get('oauth_url', None) + self.to_bot_from_channel_open_id_metadata_url = kwargs.get('to_bot_from_channel_open_id_metadata_url', None) + self.to_bot_from_channel_token_issuer = kwargs.get('to_bot_from_channel_token_issuer', None) + self.to_bot_from_emulator_open_id_metadata_url = kwargs.get('to_bot_from_emulator_open_id_metadata_url', None) + self.to_channel_from_bot_login_url = kwargs.get('to_channel_from_bot_login_url', None) + self.to_channel_from_bot_oauth_scope = kwargs.get('to_channel_from_bot_oauth_scope', None) + self.validate_authority = kwargs.get('validate_authority', None) + self.bot_open_id_metadata = kwargs.get('bot_open_id_metadata', None) + + class KikChannel(Channel): """Kik channel definition. diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py index 8492673e243..90d66b4d3b7 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py @@ -132,7 +132,7 @@ class Resource(Model): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -186,7 +186,7 @@ class Bot(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -236,7 +236,7 @@ class BotChannel(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -308,6 +308,11 @@ class BotProperties(Model): :type is_cmek_enabled: bool :param cmek_key_vault_url: The CMK Url :type cmek_key_vault_url: str + :param is_isolated: Whether the bot is in an isolated network + :type is_isolated: bool + :param schema_transformation_version: The channel schema transformation + version for the bot + :type schema_transformation_version: str """ _validation = { @@ -335,9 +340,11 @@ class BotProperties(Model): 'luis_key': {'key': 'luisKey', 'type': 'str'}, 'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'}, 'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'}, + 'is_isolated': {'key': 'isIsolated', 'type': 'bool'}, + 'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'}, } - def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, description: str=None, icon_url: str=None, developer_app_insight_key: str=None, developer_app_insights_api_key: str=None, developer_app_insights_application_id: str=None, luis_app_ids=None, luis_key: str=None, is_cmek_enabled: bool=None, cmek_key_vault_url: str=None, **kwargs) -> None: + def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, description: str=None, icon_url: str=None, developer_app_insight_key: str=None, developer_app_insights_api_key: str=None, developer_app_insights_application_id: str=None, luis_app_ids=None, luis_key: str=None, is_cmek_enabled: bool=None, cmek_key_vault_url: str=None, is_isolated: bool=None, schema_transformation_version: str=None, **kwargs) -> None: super(BotProperties, self).__init__(**kwargs) self.display_name = display_name self.description = description @@ -354,6 +361,8 @@ def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, descrip self.luis_key = luis_key self.is_cmek_enabled = is_cmek_enabled self.cmek_key_vault_url = cmek_key_vault_url + self.is_isolated = is_isolated + self.schema_transformation_version = schema_transformation_version class CheckNameAvailabilityRequestBody(Model): @@ -451,7 +460,7 @@ class ConnectionSetting(Resource): :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str @@ -703,9 +712,12 @@ class DirectLineSpeechChannelProperties(Model): All required parameters must be populated in order to send to Azure. - :param cognitive_services_subscription_id: Required. The cognitive service - subscription ID to use with this channel registration. - :type cognitive_services_subscription_id: str + :param cognitive_service_region: Required. The cognitive service region + with this channel registration. + :type cognitive_service_region: str + :param cognitive_service_subscription_key: Required. The cognitive service + subscription key to use with this channel registration. + :type cognitive_service_subscription_key: str :param is_enabled: Whether this channel is enabled or not. :type is_enabled: bool :param custom_voice_deployment_id: Custom speech model id (optional). @@ -718,20 +730,23 @@ class DirectLineSpeechChannelProperties(Model): """ _validation = { - 'cognitive_services_subscription_id': {'required': True}, + 'cognitive_service_region': {'required': True}, + 'cognitive_service_subscription_key': {'required': True}, } _attribute_map = { - 'cognitive_services_subscription_id': {'key': 'cognitiveServicesSubscriptionId', 'type': 'str'}, + 'cognitive_service_region': {'key': 'cognitiveServiceRegion', 'type': 'str'}, + 'cognitive_service_subscription_key': {'key': 'cognitiveServiceSubscriptionKey', 'type': 'str'}, 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, 'custom_voice_deployment_id': {'key': 'customVoiceDeploymentId', 'type': 'str'}, 'custom_speech_model_id': {'key': 'customSpeechModelId', 'type': 'str'}, 'is_default_bot_for_cog_svc_account': {'key': 'isDefaultBotForCogSvcAccount', 'type': 'bool'}, } - def __init__(self, *, cognitive_services_subscription_id: str, is_enabled: bool=None, custom_voice_deployment_id: str=None, custom_speech_model_id: str=None, is_default_bot_for_cog_svc_account: bool=None, **kwargs) -> None: + def __init__(self, *, cognitive_service_region: str, cognitive_service_subscription_key: str, is_enabled: bool=None, custom_voice_deployment_id: str=None, custom_speech_model_id: str=None, is_default_bot_for_cog_svc_account: bool=None, **kwargs) -> None: super(DirectLineSpeechChannelProperties, self).__init__(**kwargs) - self.cognitive_services_subscription_id = cognitive_services_subscription_id + self.cognitive_service_region = cognitive_service_region + self.cognitive_service_subscription_key = cognitive_service_subscription_key self.is_enabled = is_enabled self.custom_voice_deployment_id = custom_voice_deployment_id self.custom_speech_model_id = custom_speech_model_id @@ -955,6 +970,58 @@ def __init__(self, *, id: str, access_token: str=None, **kwargs) -> None: self.access_token = access_token +class HostSettingsResponse(Model): + """The response body returned for a request to Bot Service Management to check + per subscription hostSettings. + + :param oauth_url: For in-conversation bot user authentication + :type oauth_url: str + :param to_bot_from_channel_open_id_metadata_url: For verifying incoming + tokens from the channels + :type to_bot_from_channel_open_id_metadata_url: str + :param to_bot_from_channel_token_issuer: For verifying incoming tokens + from the channels + :type to_bot_from_channel_token_issuer: str + :param to_bot_from_emulator_open_id_metadata_url: For verifying incoming + tokens from bot emulator + :type to_bot_from_emulator_open_id_metadata_url: str + :param to_channel_from_bot_login_url: For getting access token to channels + from bot host + :type to_channel_from_bot_login_url: str + :param to_channel_from_bot_oauth_scope: For getting access token to + channels from bot host + :type to_channel_from_bot_oauth_scope: str + :param validate_authority: Per cloud OAuth setting on whether authority is + validated + :type validate_authority: bool + :param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl, + used by SDK < v4.12 + :type bot_open_id_metadata: str + """ + + _attribute_map = { + 'oauth_url': {'key': 'OAuthUrl', 'type': 'str'}, + 'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'}, + 'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'}, + 'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'}, + 'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'}, + 'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'}, + 'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'}, + 'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'}, + } + + def __init__(self, *, oauth_url: str=None, to_bot_from_channel_open_id_metadata_url: str=None, to_bot_from_channel_token_issuer: str=None, to_bot_from_emulator_open_id_metadata_url: str=None, to_channel_from_bot_login_url: str=None, to_channel_from_bot_oauth_scope: str=None, validate_authority: bool=None, bot_open_id_metadata: str=None, **kwargs) -> None: + super(HostSettingsResponse, self).__init__(**kwargs) + self.oauth_url = oauth_url + self.to_bot_from_channel_open_id_metadata_url = to_bot_from_channel_open_id_metadata_url + self.to_bot_from_channel_token_issuer = to_bot_from_channel_token_issuer + self.to_bot_from_emulator_open_id_metadata_url = to_bot_from_emulator_open_id_metadata_url + self.to_channel_from_bot_login_url = to_channel_from_bot_login_url + self.to_channel_from_bot_oauth_scope = to_channel_from_bot_oauth_scope + self.validate_authority = validate_authority + self.bot_open_id_metadata = bot_open_id_metadata + + class KikChannel(Channel): """Kik channel definition. diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py index 892f8e5743d..4c952aab967 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py @@ -14,6 +14,7 @@ from ._direct_line_operations import DirectLineOperations from ._operations import Operations from ._bot_connection_operations import BotConnectionOperations +from ._host_settings_operations import HostSettingsOperations __all__ = [ 'BotsOperations', @@ -21,4 +22,5 @@ 'DirectLineOperations', 'Operations', 'BotConnectionOperations', + 'HostSettingsOperations', ] diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py index ed00506f04b..9df3720948f 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py @@ -24,7 +24,7 @@ class BotConnectionOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-03-01" self.config = config diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py index 5c083ba1aa7..808a6e5add2 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py @@ -24,7 +24,7 @@ class BotsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-03-01" self.config = config @@ -124,7 +124,7 @@ def update( :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py index 21d1a766a01..04b9eb86b50 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_channels_operations.py @@ -24,7 +24,7 @@ class ChannelsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-03-01" self.config = config @@ -136,7 +136,7 @@ def update( :param sku: Gets or sets the SKU of the resource. :type sku: ~azure.mgmt.botservice.models.Sku :param kind: Required. Gets or sets the Kind of the resource. Possible - values include: 'sdk', 'designer', 'bot', 'function' + values include: 'sdk', 'designer', 'bot', 'function', 'azurebot' :type kind: str or ~azure.mgmt.botservice.models.Kind :param etag: Entity Tag :type etag: str diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py index 3612cf149b5..8cb8d925199 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_direct_line_operations.py @@ -24,7 +24,7 @@ class DirectLineOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-03-01" self.config = config diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py new file mode 100644 index 00000000000..0bb473b306d --- /dev/null +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_host_settings_operations.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class HostSettingsOperations(object): + """HostSettingsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2021-03-01" + + self.config = config + + def get( + self, custom_headers=None, raw=False, **operation_config): + """Get per subscription settings needed to host bot in compute resource + such as Azure App Service. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: HostSettingsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.botservice.models.HostSettingsResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('HostSettingsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings'} diff --git a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py index 1489465f9e7..2d73a5d746e 100644 --- a/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py +++ b/sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_operations.py @@ -24,7 +24,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02". + :ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2020-06-02" + self.api_version = "2021-03-01" self.config = config