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] botservice/resource-manager #3252

Merged
merged 11 commits into from
May 21, 2019
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
1 change: 0 additions & 1 deletion azure-mgmt-botservice/MANIFEST.in

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion azure-mgmt-botservice/dev_requirements.txt

This file was deleted.

5 changes: 5 additions & 0 deletions sdk/botservice/azure-mgmt-botservice/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
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)
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
Expand Up @@ -31,14 +31,20 @@ class DirectLineSite(Model):
Channel List API, otherwise empty.
:vartype key2: str
:param is_enabled: Required. Whether this site is enabled for DirectLine
channel
channel.
:type is_enabled: bool
:param is_v1_enabled: Required. Whether this site is enabled for Bot
Framework V1 protocol
Framework V1 protocol.
:type is_v1_enabled: bool
:param is_v3_enabled: Required. Whether this site is enabled for Bot
Framework V1 protocol
Framework V1 protocol.
:type is_v3_enabled: bool
:param is_secure_site_enabled: Whether this site is enabled for
authentication with Bot Framework.
:type is_secure_site_enabled: bool
:param trusted_origins: List of Trusted Origin URLs for this site. This
field is applicable only if isSecureSiteEnabled is True.
:type trusted_origins: list[str]
"""

_validation = {
Expand All @@ -59,6 +65,8 @@ class DirectLineSite(Model):
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'is_v1_enabled': {'key': 'isV1Enabled', 'type': 'bool'},
'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'},
'is_secure_site_enabled': {'key': 'isSecureSiteEnabled', 'type': 'bool'},
'trusted_origins': {'key': 'trustedOrigins', 'type': '[str]'},
}

def __init__(self, **kwargs):
Expand All @@ -70,3 +78,5 @@ def __init__(self, **kwargs):
self.is_enabled = kwargs.get('is_enabled', None)
self.is_v1_enabled = kwargs.get('is_v1_enabled', None)
self.is_v3_enabled = kwargs.get('is_v3_enabled', None)
self.is_secure_site_enabled = kwargs.get('is_secure_site_enabled', None)
self.trusted_origins = kwargs.get('trusted_origins', None)
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,20 @@ class DirectLineSite(Model):
Channel List API, otherwise empty.
:vartype key2: str
:param is_enabled: Required. Whether this site is enabled for DirectLine
channel
channel.
:type is_enabled: bool
:param is_v1_enabled: Required. Whether this site is enabled for Bot
Framework V1 protocol
Framework V1 protocol.
:type is_v1_enabled: bool
:param is_v3_enabled: Required. Whether this site is enabled for Bot
Framework V1 protocol
Framework V1 protocol.
:type is_v3_enabled: bool
:param is_secure_site_enabled: Whether this site is enabled for
authentication with Bot Framework.
:type is_secure_site_enabled: bool
:param trusted_origins: List of Trusted Origin URLs for this site. This
field is applicable only if isSecureSiteEnabled is True.
:type trusted_origins: list[str]
"""

_validation = {
Expand All @@ -59,9 +65,11 @@ class DirectLineSite(Model):
'is_enabled': {'key': 'isEnabled', 'type': 'bool'},
'is_v1_enabled': {'key': 'isV1Enabled', 'type': 'bool'},
'is_v3_enabled': {'key': 'isV3Enabled', 'type': 'bool'},
'is_secure_site_enabled': {'key': 'isSecureSiteEnabled', 'type': 'bool'},
'trusted_origins': {'key': 'trustedOrigins', 'type': '[str]'},
}

def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, **kwargs) -> None:
def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_v3_enabled: bool, is_secure_site_enabled: bool=None, trusted_origins=None, **kwargs) -> None:
super(DirectLineSite, self).__init__(**kwargs)
self.site_id = None
self.site_name = site_name
Expand All @@ -70,3 +78,5 @@ def __init__(self, *, site_name: str, is_enabled: bool, is_v1_enabled: bool, is_
self.is_enabled = is_enabled
self.is_v1_enabled = is_v1_enabled
self.is_v3_enabled = is_v3_enabled
self.is_secure_site_enabled = is_secure_site_enabled
self.trusted_origins = trusted_origins
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)
Loading