Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-botservice] updating swagger to match ARM API for DirectLineSpeechChannel #5509

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": "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 [email protected]/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 @@ -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).
Expand All @@ -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'},
Expand All @@ -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)
Expand Down Expand Up @@ -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.

Expand Down
Loading