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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .operations.channels_operations import ChannelsOperations
from .operations.operations import Operations
from .operations.bot_connection_operations import BotConnectionOperations
from .operations.enterprise_channels_operations import EnterpriseChannelsOperations
from . import models


Expand Down Expand Up @@ -66,6 +67,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 enterprise_channels: EnterpriseChannels operations
:vartype enterprise_channels: azure.mgmt.botservice.operations.EnterpriseChannelsOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand Down Expand Up @@ -94,3 +97,5 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.bot_connection = BotConnectionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.enterprise_channels = EnterpriseChannelsOperations(
self._client, self.config, self._serialize, self._deserialize)
21 changes: 21 additions & 0 deletions azure-mgmt-botservice/azure/mgmt/botservice/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
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 .enterprise_channel_check_name_availability_request_py3 import EnterpriseChannelCheckNameAvailabilityRequest
from .enterprise_channel_check_name_availability_response_py3 import EnterpriseChannelCheckNameAvailabilityResponse
from .enterprise_channel_node_py3 import EnterpriseChannelNode
from .enterprise_channel_properties_py3 import EnterpriseChannelProperties
from .enterprise_channel_py3 import EnterpriseChannel
except (SyntaxError, ImportError):
from .sku import Sku
from .resource import Resource
Expand Down Expand Up @@ -97,14 +102,22 @@
from .operation_entity import OperationEntity
from .check_name_availability_request_body import CheckNameAvailabilityRequestBody
from .check_name_availability_response_body import CheckNameAvailabilityResponseBody
from .enterprise_channel_check_name_availability_request import EnterpriseChannelCheckNameAvailabilityRequest
from .enterprise_channel_check_name_availability_response import EnterpriseChannelCheckNameAvailabilityResponse
from .enterprise_channel_node import EnterpriseChannelNode
from .enterprise_channel_properties import EnterpriseChannelProperties
from .enterprise_channel import EnterpriseChannel
from .bot_paged import BotPaged
from .bot_channel_paged import BotChannelPaged
from .operation_entity_paged import OperationEntityPaged
from .connection_setting_paged import ConnectionSettingPaged
from .enterprise_channel_paged import EnterpriseChannelPaged
from .azure_bot_service_enums import (
SkuName,
SkuTier,
Kind,
EnterpriseChannelState,
EnterpriseChannelNodeState,
ChannelName,
)

Expand Down Expand Up @@ -152,12 +165,20 @@
'OperationEntity',
'CheckNameAvailabilityRequestBody',
'CheckNameAvailabilityResponseBody',
'EnterpriseChannelCheckNameAvailabilityRequest',
'EnterpriseChannelCheckNameAvailabilityResponse',
'EnterpriseChannelNode',
'EnterpriseChannelProperties',
'EnterpriseChannel',
'BotPaged',
'BotChannelPaged',
'OperationEntityPaged',
'ConnectionSettingPaged',
'EnterpriseChannelPaged',
'SkuName',
'SkuTier',
'Kind',
'EnterpriseChannelState',
'EnterpriseChannelNodeState',
'ChannelName',
]
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,34 @@ class Kind(str, Enum):
function = "function"


class EnterpriseChannelState(str, Enum):

creating = "Creating"
create_failed = "CreateFailed"
started = "Started"
starting = "Starting"
start_failed = "StartFailed"
stopped = "Stopped"
stopping = "Stopping"
stop_failed = "StopFailed"
deleting = "Deleting"
delete_failed = "DeleteFailed"


class EnterpriseChannelNodeState(str, Enum):

creating = "Creating"
create_failed = "CreateFailed"
started = "Started"
starting = "Starting"
start_failed = "StartFailed"
stopped = "Stopped"
stopping = "Stopping"
stop_failed = "StopFailed"
deleting = "Deleting"
delete_failed = "DeleteFailed"


class ChannelName(str, Enum):

facebook_channel = "FacebookChannel"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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 EnterpriseChannel(Resource):
"""Enterprise 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 an Enterprise Channel
resource.
:type properties:
~azure.mgmt.botservice.models.EnterpriseChannelProperties
"""

_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': 'EnterpriseChannelProperties'},
}

def __init__(self, **kwargs):
super(EnterpriseChannel, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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 EnterpriseChannelCheckNameAvailabilityRequest(Model):
"""A request to Bot Service Management to check availability of an Enterprise
Channel name.

:param name: The name of the Enterprise Channel for which availability
needs to be checked.
:type name: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EnterpriseChannelCheckNameAvailabilityRequest, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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 EnterpriseChannelCheckNameAvailabilityRequest(Model):
"""A request to Bot Service Management to check availability of an Enterprise
Channel name.

:param name: The name of the Enterprise Channel for which availability
needs to be checked.
:type name: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
}

def __init__(self, *, name: str=None, **kwargs) -> None:
super(EnterpriseChannelCheckNameAvailabilityRequest, self).__init__(**kwargs)
self.name = name
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 EnterpriseChannelCheckNameAvailabilityResponse(Model):
"""A request to Bot Service Management to check availability of an Enterprise
Channel name.

:param valid: Indicates if the Enterprise Channel name is valid.
:type valid: bool
:param message: Additional information about why a bot name is not
available.
:type message: str
"""

_attribute_map = {
'valid': {'key': 'valid', 'type': 'bool'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EnterpriseChannelCheckNameAvailabilityResponse, self).__init__(**kwargs)
self.valid = kwargs.get('valid', None)
self.message = kwargs.get('message', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 EnterpriseChannelCheckNameAvailabilityResponse(Model):
"""A request to Bot Service Management to check availability of an Enterprise
Channel name.

:param valid: Indicates if the Enterprise Channel name is valid.
:type valid: bool
:param message: Additional information about why a bot name is not
available.
:type message: str
"""

_attribute_map = {
'valid': {'key': 'valid', 'type': 'bool'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, valid: bool=None, message: str=None, **kwargs) -> None:
super(EnterpriseChannelCheckNameAvailabilityResponse, self).__init__(**kwargs)
self.valid = valid
self.message = message
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 msrest.serialization import Model


class EnterpriseChannelNode(Model):
"""The properties specific to an Enterprise Channel Node.

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.

:ivar id: Id of Enterprise Channel Node. This is generated by the Bot
Framework.
:vartype id: str
:param state: The current state of the Enterprise Channel Node. Possible
values include: 'Creating', 'CreateFailed', 'Started', 'Starting',
'StartFailed', 'Stopped', 'Stopping', 'StopFailed', 'Deleting',
'DeleteFailed'
:type state: str or
~azure.mgmt.botservice.models.EnterpriseChannelNodeState
:param name: Required. The name of the Enterprise Channel Node.
:type name: str
:param azure_sku: Required. The sku of the Enterprise Channel Node.
:type azure_sku: str
:param azure_location: Required. The location of the Enterprise Channel
Node.
:type azure_location: str
"""

_validation = {
'id': {'readonly': True},
'name': {'required': True},
'azure_sku': {'required': True},
'azure_location': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'state': {'key': 'state', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'azure_sku': {'key': 'azureSku', 'type': 'str'},
'azure_location': {'key': 'azureLocation', 'type': 'str'},
}

def __init__(self, **kwargs):
super(EnterpriseChannelNode, self).__init__(**kwargs)
self.id = None
self.state = kwargs.get('state', None)
self.name = kwargs.get('name', None)
self.azure_sku = kwargs.get('azure_sku', None)
self.azure_location = kwargs.get('azure_location', None)
Loading