Skip to content
Merged
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
10 changes: 0 additions & 10 deletions azure-mgmt-botservice/azure/mgmt/botservice/azure_bot_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.bots_operations import BotsOperations
from .operations.bot_services_operations import BotServicesOperations
from .operations.channels_operations import ChannelsOperations
from .operations.operations import Operations
from . import models

Expand Down Expand Up @@ -58,12 +56,8 @@ class AzureBotService(object):
:ivar config: Configuration for client.
:vartype config: AzureBotServiceConfiguration

:ivar bots: Bots operations
:vartype bots: azure.mgmt.botservice.operations.BotsOperations
:ivar bot_services: BotServices operations
:vartype bot_services: azure.mgmt.botservice.operations.BotServicesOperations
:ivar channels: Channels operations
:vartype channels: azure.mgmt.botservice.operations.ChannelsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.botservice.operations.Operations

Expand All @@ -86,11 +80,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.bots = BotsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.bot_services = BotServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.channels = ChannelsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
94 changes: 27 additions & 67 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,90 +9,50 @@
# regenerated.
# --------------------------------------------------------------------------

from .sku import Sku
from .resource import Resource
from .bot_properties import BotProperties
from .bot import Bot
from .channel import Channel
from .bot_channel import BotChannel
from .facebook_channel_properties import FacebookChannelProperties
from .facebook_channel import FacebookChannel
from .email_channel_properties import EmailChannelProperties
from .email_channel import EmailChannel
from .ms_teams_channel_properties import MsTeamsChannelProperties
from .ms_teams_channel import MsTeamsChannel
from .skype_channel_properties import SkypeChannelProperties
from .skype_channel import SkypeChannel
from .kik_channel_properties import KikChannelProperties
from .kik_channel import KikChannel
from .web_chat_site import WebChatSite
from .web_chat_channel_properties import WebChatChannelProperties
from .web_chat_channel import WebChatChannel
from .direct_line_site import DirectLineSite
from .direct_line_channel_properties import DirectLineChannelProperties
from .direct_line_channel import DirectLineChannel
from .telegram_channel_properties import TelegramChannelProperties
from .telegram_channel import TelegramChannel
from .sms_channel_properties import SmsChannelProperties
from .sms_channel import SmsChannel
from .slack_channel_properties import SlackChannelProperties
from .slack_channel import SlackChannel
from .error_body import ErrorBody
from .error import Error, ErrorException
from .operation_display_info import OperationDisplayInfo
from .operation_entity import OperationEntity
from .check_name_availability_request_body import CheckNameAvailabilityRequestBody
from .check_name_availability_response_body import CheckNameAvailabilityResponseBody
from .bot_paged import BotPaged
from .bot_channel_paged import BotChannelPaged
try:
from .sku_py3 import Sku
from .resource_py3 import Resource
from .bot_resource_properties_py3 import BotResourceProperties
from .bot_resource_py3 import BotResource
from .error_body_py3 import ErrorBody
from .error_py3 import Error, ErrorException
from .operation_display_info_py3 import OperationDisplayInfo
from .operation_entity_py3 import OperationEntity
from .check_name_availability_response_body_py3 import CheckNameAvailabilityResponseBody
from .check_name_avaialability_request_body_py3 import CheckNameAvaialabilityRequestBody
except (SyntaxError, ImportError):
from .sku import Sku
from .resource import Resource
from .bot_resource_properties import BotResourceProperties
from .bot_resource import BotResource
from .error_body import ErrorBody
from .error import Error, ErrorException
from .operation_display_info import OperationDisplayInfo
from .operation_entity import OperationEntity
from .check_name_availability_response_body import CheckNameAvailabilityResponseBody
from .check_name_avaialability_request_body import CheckNameAvaialabilityRequestBody
from .bot_resource_paged import BotResourcePaged
from .operation_entity_paged import OperationEntityPaged
from .azure_bot_service_enums import (
SkuName,
SkuTier,
Kind,
ChannelName,
)

__all__ = [
'Sku',
'Resource',
'BotProperties',
'Bot',
'Channel',
'BotChannel',
'FacebookChannelProperties',
'FacebookChannel',
'EmailChannelProperties',
'EmailChannel',
'MsTeamsChannelProperties',
'MsTeamsChannel',
'SkypeChannelProperties',
'SkypeChannel',
'KikChannelProperties',
'KikChannel',
'WebChatSite',
'WebChatChannelProperties',
'WebChatChannel',
'DirectLineSite',
'DirectLineChannelProperties',
'DirectLineChannel',
'TelegramChannelProperties',
'TelegramChannel',
'SmsChannelProperties',
'SmsChannel',
'SlackChannelProperties',
'SlackChannel',
'BotResourceProperties',
'BotResource',
'ErrorBody',
'Error', 'ErrorException',
'OperationDisplayInfo',
'OperationEntity',
'CheckNameAvailabilityRequestBody',
'CheckNameAvailabilityResponseBody',
'BotPaged',
'BotChannelPaged',
'CheckNameAvaialabilityRequestBody',
'BotResourcePaged',
'OperationEntityPaged',
'SkuName',
'SkuTier',
'Kind',
'ChannelName',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,22 @@
from enum import Enum


class SkuName(Enum):
class SkuName(str, Enum):

f0 = "F0"
s1 = "S1"


class SkuTier(Enum):
class SkuTier(str, Enum):

free = "Free"
standard = "Standard"
premium = "Premium"


class Kind(Enum):
class Kind(str, Enum):

sdk = "sdk"
designer = "designer"
bot = "bot"
function = "function"


class ChannelName(Enum):

facebook_channel = "FacebookChannel"
email_channel = "EmailChannel"
27 changes: 0 additions & 27 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/bot_paged.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .resource import Resource


class Bot(Resource):
class BotResource(Resource):
"""Bot resource definition.

Variables are only populated by the server, and will be ignored when
Expand All @@ -36,7 +36,7 @@ class Bot(Resource):
:param etag: Entity Tag
:type etag: str
:param properties: The set of properties specific to bot resource
:type properties: ~azure.mgmt.botservice.models.BotProperties
:type properties: ~azure.mgmt.botservice.models.BotResourceProperties
"""

_validation = {
Expand All @@ -54,9 +54,9 @@ class Bot(Resource):
'sku': {'key': 'sku', 'type': 'Sku'},
'kind': {'key': 'kind', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'BotProperties'},
'properties': {'key': 'properties', 'type': 'BotResourceProperties'},
}

def __init__(self, location=None, tags=None, sku=None, kind=None, etag=None, properties=None):
super(Bot, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag)
self.properties = properties
def __init__(self, **kwargs):
super(BotResource, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
from msrest.paging import Paged


class BotChannelPaged(Paged):
class BotResourcePaged(Paged):
"""
A paging container for iterating over a list of :class:`BotChannel <azure.mgmt.botservice.models.BotChannel>` object
A paging container for iterating over a list of :class:`BotResource <azure.mgmt.botservice.models.BotResource>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[BotChannel]'}
'current_page': {'key': 'value', 'type': '[BotResource]'}
}

def __init__(self, *args, **kwargs):

super(BotChannelPaged, self).__init__(*args, **kwargs)
super(BotResourcePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 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 BotResourceProperties(Model):
"""The parameters to provide for the Bot.

Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:param display_name: Required. The Name of the bot
:type display_name: str
:param description: The description of the bot
:type description: str
:param icon_url: The Icon Url of the bot
:type icon_url: str
:param endpoint: Required. The bot's endpoint
:type endpoint: str
:ivar endpoint_version: The bot's endpoint version
:vartype endpoint_version: str
:param msa_app_id: Required. Microsoft App Id for the bot
:type msa_app_id: str
:ivar configured_channels: Collection of channels for which the bot is
configured
:vartype configured_channels: list[str]
:ivar enabled_channels: Collection of channels for which the bot is
enabled
:vartype enabled_channels: list[str]
:param developer_app_insight_key: The Application Insights key
:type developer_app_insight_key: str
:param developer_app_insights_api_key: The Application Insights Api Key
:type developer_app_insights_api_key: str
:param developer_app_insights_application_id: The Application Insights App
Id
:type developer_app_insights_application_id: str
:param luis_app_ids: Collection of LUIS App Ids
:type luis_app_ids: list[str]
:param luis_key: The LUIS Key
:type luis_key: str
"""

_validation = {
'display_name': {'required': True},
'endpoint': {'required': True},
'endpoint_version': {'readonly': True},
'msa_app_id': {'required': True},
'configured_channels': {'readonly': True},
'enabled_channels': {'readonly': True},
}

_attribute_map = {
'display_name': {'key': 'displayName', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'icon_url': {'key': 'iconUrl', 'type': 'str'},
'endpoint': {'key': 'endpoint', 'type': 'str'},
'endpoint_version': {'key': 'endpointVersion', 'type': 'str'},
'msa_app_id': {'key': 'msaAppId', 'type': 'str'},
'configured_channels': {'key': 'configuredChannels', 'type': '[str]'},
'enabled_channels': {'key': 'enabledChannels', 'type': '[str]'},
'developer_app_insight_key': {'key': 'developerAppInsightKey', 'type': 'str'},
'developer_app_insights_api_key': {'key': 'developerAppInsightsApiKey', 'type': 'str'},
'developer_app_insights_application_id': {'key': 'developerAppInsightsApplicationId', 'type': 'str'},
'luis_app_ids': {'key': 'luisAppIds', 'type': '[str]'},
'luis_key': {'key': 'luisKey', 'type': 'str'},
}

def __init__(self, **kwargs):
super(BotResourceProperties, self).__init__(**kwargs)
self.display_name = kwargs.get('display_name', None)
self.description = kwargs.get('description', None)
self.icon_url = kwargs.get('icon_url', None)
self.endpoint = kwargs.get('endpoint', None)
self.endpoint_version = None
self.msa_app_id = kwargs.get('msa_app_id', None)
self.configured_channels = None
self.enabled_channels = None
self.developer_app_insight_key = kwargs.get('developer_app_insight_key', None)
self.developer_app_insights_api_key = kwargs.get('developer_app_insights_api_key', None)
self.developer_app_insights_application_id = kwargs.get('developer_app_insights_application_id', None)
self.luis_app_ids = kwargs.get('luis_app_ids', None)
self.luis_key = kwargs.get('luis_key', None)
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@
from msrest.serialization import Model


class BotProperties(Model):
class BotResourceProperties(Model):
"""The parameters to provide for the Bot.

Variables are only populated by the server, and will be ignored when
sending a request.

:param display_name: The Name of the bot
All required parameters must be populated in order to send to Azure.

:param display_name: Required. The Name of the bot
:type display_name: str
:param description: The description of the bot
:type description: str
:param icon_url: The Icon Url of the bot
:type icon_url: str
:param endpoint: The bot's endpoint
:param endpoint: Required. The bot's endpoint
:type endpoint: str
:ivar endpoint_version: The bot's endpoint version
:vartype endpoint_version: str
:param msa_app_id: Microsoft App Id for the bot
:param msa_app_id: Required. Microsoft App Id for the bot
:type msa_app_id: str
:ivar configured_channels: Collection of channels for which the bot is
configured
Expand Down Expand Up @@ -74,7 +76,8 @@ class BotProperties(Model):
'luis_key': {'key': 'luisKey', 'type': 'str'},
}

def __init__(self, display_name, endpoint, msa_app_id, description=None, icon_url=None, developer_app_insight_key=None, developer_app_insights_api_key=None, developer_app_insights_application_id=None, luis_app_ids=None, luis_key=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, **kwargs) -> None:
super(BotResourceProperties, self).__init__(**kwargs)
self.display_name = display_name
self.description = description
self.icon_url = icon_url
Expand Down
Loading