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

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

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

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

self.bot_services = BotServicesOperations(
self.bots = BotsOperations(
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)
98 changes: 87 additions & 11 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,123 @@
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 .bot_properties_py3 import BotProperties
from .bot_py3 import Bot
from .channel_py3 import Channel
from .bot_channel_py3 import BotChannel
from .facebook_channel_properties_py3 import FacebookChannelProperties
from .facebook_channel_py3 import FacebookChannel
from .email_channel_properties_py3 import EmailChannelProperties
from .email_channel_py3 import EmailChannel
from .ms_teams_channel_properties_py3 import MsTeamsChannelProperties
from .ms_teams_channel_py3 import MsTeamsChannel
from .skype_channel_properties_py3 import SkypeChannelProperties
from .skype_channel_py3 import SkypeChannel
from .kik_channel_properties_py3 import KikChannelProperties
from .kik_channel_py3 import KikChannel
from .web_chat_site_py3 import WebChatSite
from .web_chat_channel_properties_py3 import WebChatChannelProperties
from .web_chat_channel_py3 import WebChatChannel
from .direct_line_site_py3 import DirectLineSite
from .direct_line_channel_properties_py3 import DirectLineChannelProperties
from .direct_line_channel_py3 import DirectLineChannel
from .telegram_channel_properties_py3 import TelegramChannelProperties
from .telegram_channel_py3 import TelegramChannel
from .sms_channel_properties_py3 import SmsChannelProperties
from .sms_channel_py3 import SmsChannel
from .slack_channel_properties_py3 import SlackChannelProperties
from .slack_channel_py3 import SlackChannel
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_request_body_py3 import CheckNameAvailabilityRequestBody
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 .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 .check_name_avaialability_request_body import CheckNameAvaialabilityRequestBody
from .bot_resource_paged import BotResourcePaged
from .bot_paged import BotPaged
from .bot_channel_paged import BotChannelPaged
from .operation_entity_paged import OperationEntityPaged
from .azure_bot_service_enums import (
SkuName,
SkuTier,
Kind,
ChannelName,
)

__all__ = [
'Sku',
'Resource',
'BotResourceProperties',
'BotResource',
'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',
'ErrorBody',
'Error', 'ErrorException',
'OperationDisplayInfo',
'OperationEntity',
'CheckNameAvailabilityRequestBody',
'CheckNameAvailabilityResponseBody',
'CheckNameAvaialabilityRequestBody',
'BotResourcePaged',
'BotPaged',
'BotChannelPaged',
'OperationEntityPaged',
'SkuName',
'SkuTier',
'Kind',
'ChannelName',
]
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SkuTier(str, Enum):

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


class Kind(str, Enum):
Expand All @@ -31,3 +30,9 @@ class Kind(str, Enum):
designer = "designer"
bot = "bot"
function = "function"


class ChannelName(str, Enum):

facebook_channel = "FacebookChannel"
email_channel = "EmailChannel"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .resource import Resource


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

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

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

def __init__(self, **kwargs):
super(BotResource, self).__init__(**kwargs)
super(Bot, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
62 changes: 62 additions & 0 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/bot_channel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 .resource import Resource


class BotChannel(Resource):
"""Bot channel resource definition.

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

:ivar id: Specifies the resource ID.
:vartype id: str
:ivar name: Specifies the name of the resource.
:vartype name: str
:param location: Specifies the location of the resource.
:type location: str
:ivar type: Specifies the type of the resource.
:vartype type: str
:param tags: Contains resource tags defined as key/value pairs.
:type tags: dict[str, str]
: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'
:type kind: str or ~azure.mgmt.botservice.models.Kind
:param etag: Entity Tag
:type etag: str
:param properties: The set of properties specific to bot channel resource
:type properties: ~azure.mgmt.botservice.models.Channel
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'kind': {'key': 'kind', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'Channel'},
}

def __init__(self, **kwargs):
super(BotChannel, 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 BotResourcePaged(Paged):
class BotChannelPaged(Paged):
"""
A paging container for iterating over a list of :class:`BotResource <azure.mgmt.botservice.models.BotResource>` object
A paging container for iterating over a list of :class:`BotChannel <azure.mgmt.botservice.models.BotChannel>` object
"""

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

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

super(BotResourcePaged, self).__init__(*args, **kwargs)
super(BotChannelPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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 .resource import Resource


class BotChannel(Resource):
"""Bot channel resource definition.

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

:ivar id: Specifies the resource ID.
:vartype id: str
:ivar name: Specifies the name of the resource.
:vartype name: str
:param location: Specifies the location of the resource.
:type location: str
:ivar type: Specifies the type of the resource.
:vartype type: str
:param tags: Contains resource tags defined as key/value pairs.
:type tags: dict[str, str]
: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'
:type kind: str or ~azure.mgmt.botservice.models.Kind
:param etag: Entity Tag
:type etag: str
:param properties: The set of properties specific to bot channel resource
:type properties: ~azure.mgmt.botservice.models.Channel
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'kind': {'key': 'kind', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'Channel'},
}

def __init__(self, *, location: str=None, tags=None, sku=None, kind=None, etag: str=None, properties=None, **kwargs) -> None:
super(BotChannel, self).__init__(location=location, tags=tags, sku=sku, kind=kind, etag=etag, **kwargs)
self.properties = properties
27 changes: 27 additions & 0 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/bot_paged.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


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

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

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

super(BotPaged, self).__init__(*args, **kwargs)
Loading