Skip to content

Commit

Permalink
[AutoPR botservice/resource-manager] add security fields to directlin…
Browse files Browse the repository at this point in the history
…e channel site for botservice (#3281)

* Generated from ce0ac2b44c1e5b31b498d43341f9c3f2e7b7c66a

add security fields to directline channel site

* Generated from 409e6ef7de40c5c43a3e0b2d41750b42208c7192

improve documentation for trusted origins field

* Generated from d79326c7ea2061fb0a549e536f4bb5525877cc52

actually fix the description
  • Loading branch information
AutorestCI authored Sep 6, 2018
1 parent b1c1057 commit aa16e38
Show file tree
Hide file tree
Showing 23 changed files with 1,110 additions and 12 deletions.
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
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)
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
Loading

0 comments on commit aa16e38

Please sign in to comment.