Skip to content

Commit f9bc8cc

Browse files
author
SDKAuto
committed
CodeGen from PR 13784 in Azure/azure-rest-api-specs
[Hub Generated] Review request for Microsoft.BotService to add version stable/2021-03-01 (Azure#13784) * add isIsolated and channelSchemaTransformationVersion * rename
1 parent eae413d commit f9bc8cc

14 files changed

+258
-22
lines changed

sdk/botservice/azure-mgmt-botservice/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "V2",
3+
"use": "@microsoft.azure/autorest.python@~4.0.71",
4+
"commit": "6acf748c3d0c020342ff4839d82730abab8d49b8",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"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 [email protected]/autorest.python@~4.0.71 --version=V2",
7+
"readme": "specification/botservice/resource-manager/readme.md"
8+
}

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .operations import DirectLineOperations
1919
from .operations import Operations
2020
from .operations import BotConnectionOperations
21+
from .operations import HostSettingsOperations
2122
from . import models
2223

2324

@@ -37,6 +38,8 @@ class AzureBotService(SDKClient):
3738
:vartype operations: azure.mgmt.botservice.operations.Operations
3839
:ivar bot_connection: BotConnection operations
3940
:vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations
41+
:ivar host_settings: HostSettings operations
42+
:vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
4043
4144
:param credentials: Credentials needed for the client to connect to Azure.
4245
:type credentials: :mod:`A msrestazure Credentials
@@ -53,7 +56,7 @@ def __init__(
5356
super(AzureBotService, self).__init__(self.config.credentials, self.config)
5457

5558
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
56-
self.api_version = '2020-06-02'
59+
self.api_version = '2021-03-01'
5760
self._serialize = Serializer(client_models)
5861
self._deserialize = Deserializer(client_models)
5962

@@ -67,3 +70,5 @@ def __init__(
6770
self._client, self.config, self._serialize, self._deserialize)
6871
self.bot_connection = BotConnectionOperations(
6972
self._client, self.config, self._serialize, self._deserialize)
73+
self.host_settings = HostSettingsOperations(
74+
self._client, self.config, self._serialize, self._deserialize)

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from ._models_py3 import FacebookChannel
3535
from ._models_py3 import FacebookChannelProperties
3636
from ._models_py3 import FacebookPage
37+
from ._models_py3 import HostSettingsResponse
3738
from ._models_py3 import KikChannel
3839
from ._models_py3 import KikChannelProperties
3940
from ._models_py3 import LineChannel
@@ -86,6 +87,7 @@
8687
from ._models import FacebookChannel
8788
from ._models import FacebookChannelProperties
8889
from ._models import FacebookPage
90+
from ._models import HostSettingsResponse
8991
from ._models import KikChannel
9092
from ._models import KikChannelProperties
9193
from ._models import LineChannel
@@ -151,6 +153,7 @@
151153
'FacebookChannel',
152154
'FacebookChannelProperties',
153155
'FacebookPage',
156+
'HostSettingsResponse',
154157
'KikChannel',
155158
'KikChannelProperties',
156159
'LineChannel',

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_azure_bot_service_enums.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Kind(str, Enum):
3030
designer = "designer"
3131
bot = "bot"
3232
function = "function"
33+
azurebot = "azurebot"
3334

3435

3536
class Key(str, Enum):

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models.py

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Resource(Model):
132132
:param sku: Gets or sets the SKU of the resource.
133133
:type sku: ~azure.mgmt.botservice.models.Sku
134134
:param kind: Required. Gets or sets the Kind of the resource. Possible
135-
values include: 'sdk', 'designer', 'bot', 'function'
135+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
136136
:type kind: str or ~azure.mgmt.botservice.models.Kind
137137
:param etag: Entity Tag
138138
:type etag: str
@@ -186,7 +186,7 @@ class Bot(Resource):
186186
:param sku: Gets or sets the SKU of the resource.
187187
:type sku: ~azure.mgmt.botservice.models.Sku
188188
:param kind: Required. Gets or sets the Kind of the resource. Possible
189-
values include: 'sdk', 'designer', 'bot', 'function'
189+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
190190
:type kind: str or ~azure.mgmt.botservice.models.Kind
191191
:param etag: Entity Tag
192192
:type etag: str
@@ -236,7 +236,7 @@ class BotChannel(Resource):
236236
:param sku: Gets or sets the SKU of the resource.
237237
:type sku: ~azure.mgmt.botservice.models.Sku
238238
:param kind: Required. Gets or sets the Kind of the resource. Possible
239-
values include: 'sdk', 'designer', 'bot', 'function'
239+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
240240
:type kind: str or ~azure.mgmt.botservice.models.Kind
241241
:param etag: Entity Tag
242242
:type etag: str
@@ -308,6 +308,11 @@ class BotProperties(Model):
308308
:type is_cmek_enabled: bool
309309
:param cmek_key_vault_url: The CMK Url
310310
:type cmek_key_vault_url: str
311+
:param is_isolated: Whether the bot is in an isolated network
312+
:type is_isolated: bool
313+
:param schema_transformation_version: The channel schema transformation
314+
version for the bot
315+
:type schema_transformation_version: str
311316
"""
312317

313318
_validation = {
@@ -335,6 +340,8 @@ class BotProperties(Model):
335340
'luis_key': {'key': 'luisKey', 'type': 'str'},
336341
'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'},
337342
'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'},
343+
'is_isolated': {'key': 'isIsolated', 'type': 'bool'},
344+
'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'},
338345
}
339346

340347
def __init__(self, **kwargs):
@@ -354,6 +361,8 @@ def __init__(self, **kwargs):
354361
self.luis_key = kwargs.get('luis_key', None)
355362
self.is_cmek_enabled = kwargs.get('is_cmek_enabled', None)
356363
self.cmek_key_vault_url = kwargs.get('cmek_key_vault_url', None)
364+
self.is_isolated = kwargs.get('is_isolated', None)
365+
self.schema_transformation_version = kwargs.get('schema_transformation_version', None)
357366

358367

359368
class CheckNameAvailabilityRequestBody(Model):
@@ -451,7 +460,7 @@ class ConnectionSetting(Resource):
451460
:param sku: Gets or sets the SKU of the resource.
452461
:type sku: ~azure.mgmt.botservice.models.Sku
453462
:param kind: Required. Gets or sets the Kind of the resource. Possible
454-
values include: 'sdk', 'designer', 'bot', 'function'
463+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
455464
:type kind: str or ~azure.mgmt.botservice.models.Kind
456465
:param etag: Entity Tag
457466
:type etag: str
@@ -955,6 +964,58 @@ def __init__(self, **kwargs):
955964
self.access_token = kwargs.get('access_token', None)
956965

957966

967+
class HostSettingsResponse(Model):
968+
"""The response body returned for a request to Bot Service Management to check
969+
per subscription hostSettings.
970+
971+
:param oauth_url: For in-conversation bot user authentication
972+
:type oauth_url: str
973+
:param to_bot_from_channel_open_id_metadata_url: For verifying incoming
974+
tokens from the channels
975+
:type to_bot_from_channel_open_id_metadata_url: str
976+
:param to_bot_from_channel_token_issuer: For verifying incoming tokens
977+
from the channels
978+
:type to_bot_from_channel_token_issuer: str
979+
:param to_bot_from_emulator_open_id_metadata_url: For verifying incoming
980+
tokens from bot emulator
981+
:type to_bot_from_emulator_open_id_metadata_url: str
982+
:param to_channel_from_bot_login_url: For getting access token to channels
983+
from bot host
984+
:type to_channel_from_bot_login_url: str
985+
:param to_channel_from_bot_oauth_scope: For getting access token to
986+
channels from bot host
987+
:type to_channel_from_bot_oauth_scope: str
988+
:param validate_authority: Per cloud OAuth setting on whether authority is
989+
validated
990+
:type validate_authority: bool
991+
:param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl,
992+
used by SDK < v4.12
993+
:type bot_open_id_metadata: str
994+
"""
995+
996+
_attribute_map = {
997+
'oauth_url': {'key': 'OAuthUrl', 'type': 'str'},
998+
'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'},
999+
'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'},
1000+
'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'},
1001+
'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'},
1002+
'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'},
1003+
'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'},
1004+
'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'},
1005+
}
1006+
1007+
def __init__(self, **kwargs):
1008+
super(HostSettingsResponse, self).__init__(**kwargs)
1009+
self.oauth_url = kwargs.get('oauth_url', None)
1010+
self.to_bot_from_channel_open_id_metadata_url = kwargs.get('to_bot_from_channel_open_id_metadata_url', None)
1011+
self.to_bot_from_channel_token_issuer = kwargs.get('to_bot_from_channel_token_issuer', None)
1012+
self.to_bot_from_emulator_open_id_metadata_url = kwargs.get('to_bot_from_emulator_open_id_metadata_url', None)
1013+
self.to_channel_from_bot_login_url = kwargs.get('to_channel_from_bot_login_url', None)
1014+
self.to_channel_from_bot_oauth_scope = kwargs.get('to_channel_from_bot_oauth_scope', None)
1015+
self.validate_authority = kwargs.get('validate_authority', None)
1016+
self.bot_open_id_metadata = kwargs.get('bot_open_id_metadata', None)
1017+
1018+
9581019
class KikChannel(Channel):
9591020
"""Kik channel definition.
9601021

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/models/_models_py3.py

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class Resource(Model):
132132
:param sku: Gets or sets the SKU of the resource.
133133
:type sku: ~azure.mgmt.botservice.models.Sku
134134
:param kind: Required. Gets or sets the Kind of the resource. Possible
135-
values include: 'sdk', 'designer', 'bot', 'function'
135+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
136136
:type kind: str or ~azure.mgmt.botservice.models.Kind
137137
:param etag: Entity Tag
138138
:type etag: str
@@ -186,7 +186,7 @@ class Bot(Resource):
186186
:param sku: Gets or sets the SKU of the resource.
187187
:type sku: ~azure.mgmt.botservice.models.Sku
188188
:param kind: Required. Gets or sets the Kind of the resource. Possible
189-
values include: 'sdk', 'designer', 'bot', 'function'
189+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
190190
:type kind: str or ~azure.mgmt.botservice.models.Kind
191191
:param etag: Entity Tag
192192
:type etag: str
@@ -236,7 +236,7 @@ class BotChannel(Resource):
236236
:param sku: Gets or sets the SKU of the resource.
237237
:type sku: ~azure.mgmt.botservice.models.Sku
238238
:param kind: Required. Gets or sets the Kind of the resource. Possible
239-
values include: 'sdk', 'designer', 'bot', 'function'
239+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
240240
:type kind: str or ~azure.mgmt.botservice.models.Kind
241241
:param etag: Entity Tag
242242
:type etag: str
@@ -308,6 +308,11 @@ class BotProperties(Model):
308308
:type is_cmek_enabled: bool
309309
:param cmek_key_vault_url: The CMK Url
310310
:type cmek_key_vault_url: str
311+
:param is_isolated: Whether the bot is in an isolated network
312+
:type is_isolated: bool
313+
:param schema_transformation_version: The channel schema transformation
314+
version for the bot
315+
:type schema_transformation_version: str
311316
"""
312317

313318
_validation = {
@@ -335,9 +340,11 @@ class BotProperties(Model):
335340
'luis_key': {'key': 'luisKey', 'type': 'str'},
336341
'is_cmek_enabled': {'key': 'isCmekEnabled', 'type': 'bool'},
337342
'cmek_key_vault_url': {'key': 'cmekKeyVaultUrl', 'type': 'str'},
343+
'is_isolated': {'key': 'isIsolated', 'type': 'bool'},
344+
'schema_transformation_version': {'key': 'schemaTransformationVersion', 'type': 'str'},
338345
}
339346

340-
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:
347+
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:
341348
super(BotProperties, self).__init__(**kwargs)
342349
self.display_name = display_name
343350
self.description = description
@@ -354,6 +361,8 @@ def __init__(self, *, display_name: str, endpoint: str, msa_app_id: str, descrip
354361
self.luis_key = luis_key
355362
self.is_cmek_enabled = is_cmek_enabled
356363
self.cmek_key_vault_url = cmek_key_vault_url
364+
self.is_isolated = is_isolated
365+
self.schema_transformation_version = schema_transformation_version
357366

358367

359368
class CheckNameAvailabilityRequestBody(Model):
@@ -451,7 +460,7 @@ class ConnectionSetting(Resource):
451460
:param sku: Gets or sets the SKU of the resource.
452461
:type sku: ~azure.mgmt.botservice.models.Sku
453462
:param kind: Required. Gets or sets the Kind of the resource. Possible
454-
values include: 'sdk', 'designer', 'bot', 'function'
463+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
455464
:type kind: str or ~azure.mgmt.botservice.models.Kind
456465
:param etag: Entity Tag
457466
:type etag: str
@@ -955,6 +964,58 @@ def __init__(self, *, id: str, access_token: str=None, **kwargs) -> None:
955964
self.access_token = access_token
956965

957966

967+
class HostSettingsResponse(Model):
968+
"""The response body returned for a request to Bot Service Management to check
969+
per subscription hostSettings.
970+
971+
:param oauth_url: For in-conversation bot user authentication
972+
:type oauth_url: str
973+
:param to_bot_from_channel_open_id_metadata_url: For verifying incoming
974+
tokens from the channels
975+
:type to_bot_from_channel_open_id_metadata_url: str
976+
:param to_bot_from_channel_token_issuer: For verifying incoming tokens
977+
from the channels
978+
:type to_bot_from_channel_token_issuer: str
979+
:param to_bot_from_emulator_open_id_metadata_url: For verifying incoming
980+
tokens from bot emulator
981+
:type to_bot_from_emulator_open_id_metadata_url: str
982+
:param to_channel_from_bot_login_url: For getting access token to channels
983+
from bot host
984+
:type to_channel_from_bot_login_url: str
985+
:param to_channel_from_bot_oauth_scope: For getting access token to
986+
channels from bot host
987+
:type to_channel_from_bot_oauth_scope: str
988+
:param validate_authority: Per cloud OAuth setting on whether authority is
989+
validated
990+
:type validate_authority: bool
991+
:param bot_open_id_metadata: Same as ToBotFromChannelOpenIdMetadataUrl,
992+
used by SDK < v4.12
993+
:type bot_open_id_metadata: str
994+
"""
995+
996+
_attribute_map = {
997+
'oauth_url': {'key': 'OAuthUrl', 'type': 'str'},
998+
'to_bot_from_channel_open_id_metadata_url': {'key': 'ToBotFromChannelOpenIdMetadataUrl', 'type': 'str'},
999+
'to_bot_from_channel_token_issuer': {'key': 'ToBotFromChannelTokenIssuer', 'type': 'str'},
1000+
'to_bot_from_emulator_open_id_metadata_url': {'key': 'ToBotFromEmulatorOpenIdMetadataUrl', 'type': 'str'},
1001+
'to_channel_from_bot_login_url': {'key': 'ToChannelFromBotLoginUrl', 'type': 'str'},
1002+
'to_channel_from_bot_oauth_scope': {'key': 'ToChannelFromBotOAuthScope', 'type': 'str'},
1003+
'validate_authority': {'key': 'ValidateAuthority', 'type': 'bool'},
1004+
'bot_open_id_metadata': {'key': 'BotOpenIdMetadata', 'type': 'str'},
1005+
}
1006+
1007+
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:
1008+
super(HostSettingsResponse, self).__init__(**kwargs)
1009+
self.oauth_url = oauth_url
1010+
self.to_bot_from_channel_open_id_metadata_url = to_bot_from_channel_open_id_metadata_url
1011+
self.to_bot_from_channel_token_issuer = to_bot_from_channel_token_issuer
1012+
self.to_bot_from_emulator_open_id_metadata_url = to_bot_from_emulator_open_id_metadata_url
1013+
self.to_channel_from_bot_login_url = to_channel_from_bot_login_url
1014+
self.to_channel_from_bot_oauth_scope = to_channel_from_bot_oauth_scope
1015+
self.validate_authority = validate_authority
1016+
self.bot_open_id_metadata = bot_open_id_metadata
1017+
1018+
9581019
class KikChannel(Channel):
9591020
"""Kik channel definition.
9601021

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
from ._direct_line_operations import DirectLineOperations
1515
from ._operations import Operations
1616
from ._bot_connection_operations import BotConnectionOperations
17+
from ._host_settings_operations import HostSettingsOperations
1718

1819
__all__ = [
1920
'BotsOperations',
2021
'ChannelsOperations',
2122
'DirectLineOperations',
2223
'Operations',
2324
'BotConnectionOperations',
25+
'HostSettingsOperations',
2426
]

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bot_connection_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BotConnectionOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02".
27+
:ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-06-02"
37+
self.api_version = "2021-03-01"
3838

3939
self.config = config
4040

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/operations/_bots_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BotsOperations(object):
2424
:param config: Configuration of service client.
2525
:param serializer: An object model serializer.
2626
:param deserializer: An object model deserializer.
27-
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-02".
27+
:ivar api_version: Version of the API to be used with the client request. Constant value: "2021-03-01".
2828
"""
2929

3030
models = models
@@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
3434
self._client = client
3535
self._serialize = serializer
3636
self._deserialize = deserializer
37-
self.api_version = "2020-06-02"
37+
self.api_version = "2021-03-01"
3838

3939
self.config = config
4040

@@ -124,7 +124,7 @@ def update(
124124
:param sku: Gets or sets the SKU of the resource.
125125
:type sku: ~azure.mgmt.botservice.models.Sku
126126
:param kind: Required. Gets or sets the Kind of the resource. Possible
127-
values include: 'sdk', 'designer', 'bot', 'function'
127+
values include: 'sdk', 'designer', 'bot', 'function', 'azurebot'
128128
:type kind: str or ~azure.mgmt.botservice.models.Kind
129129
:param etag: Entity Tag
130130
:type etag: str

0 commit comments

Comments
 (0)