Skip to content

Commit

Permalink
CodeGen from PR 13784 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.BotService to add version stable/2021-03-01 (Azure#13784)

* add isIsolated and channelSchemaTransformationVersion

* rename
  • Loading branch information
SDKAuto committed Apr 20, 2021
1 parent eae413d commit f9bc8cc
Show file tree
Hide file tree
Showing 14 changed files with 258 additions and 22 deletions.
1 change: 1 addition & 0 deletions sdk/botservice/azure-mgmt-botservice/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/botservice/azure-mgmt-botservice/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "6acf748c3d0c020342ff4839d82730abab8d49b8",
"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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .operations import DirectLineOperations
from .operations import Operations
from .operations import BotConnectionOperations
from .operations import HostSettingsOperations
from . import models


Expand All @@ -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
Expand All @@ -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)

Expand All @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -151,6 +153,7 @@
'FacebookChannel',
'FacebookChannelProperties',
'FacebookPage',
'HostSettingsResponse',
'KikChannel',
'KikChannelProperties',
'LineChannel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Kind(str, Enum):
designer = "designer"
bot = "bot"
function = "function"
azurebot = "azurebot"


class Key(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -955,6 +964,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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -955,6 +964,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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
from ._direct_line_operations import DirectLineOperations
from ._operations import Operations
from ._bot_connection_operations import BotConnectionOperations
from ._host_settings_operations import HostSettingsOperations

__all__ = [
'BotsOperations',
'ChannelsOperations',
'DirectLineOperations',
'Operations',
'BotConnectionOperations',
'HostSettingsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f9bc8cc

Please sign in to comment.