Skip to content

Commit

Permalink
CodeGen from PR 16760 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[Hub Generated] Review request for Microsoft.BotService to add version preview/2021-05-01-preview (Azure#16760)

* rename

* change to enum

* fix bug

* fix example
  • Loading branch information
SDKAuto committed Nov 17, 2021
1 parent 3a14782 commit e009a97
Show file tree
Hide file tree
Showing 18 changed files with 2,013 additions and 85 deletions.
1 change: 1 addition & 0 deletions sdk/botservice/azure-mgmt-botservice/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/botservice/azure-mgmt-botservice/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "c4d6f92d3fd35a69ebce68f4c73c35c4238c2ac5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2",
"readme": "specification/botservice/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
from .operations import DirectLineOperations
from .operations import Operations
from .operations import BotConnectionOperations
from .operations import HostSettingsOperations
from .operations import OperationResultsOperations
from .operations import PrivateEndpointConnectionsOperations
from .operations import PrivateLinkResourcesOperations
from . import models


Expand All @@ -37,6 +41,14 @@ class AzureBotService(SDKClient):
:vartype operations: azure.mgmt.botservice.operations.Operations
:ivar bot_connection: BotConnection operations
:vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations
:ivar host_settings: HostSettings operations
:vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
:ivar operation_results: OperationResults operations
:vartype operation_results: azure.mgmt.botservice.operations.OperationResultsOperations
:ivar private_endpoint_connections: PrivateEndpointConnections operations
:vartype private_endpoint_connections: azure.mgmt.botservice.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResources operations
:vartype private_link_resources: azure.mgmt.botservice.operations.PrivateLinkResourcesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -53,7 +65,7 @@ def __init__(
super(AzureBotService, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-06-02'
self.api_version = '2021-05-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -67,3 +79,11 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.bot_connection = BotConnectionOperations(
self._client, self.config, self._serialize, self._deserialize)
self.host_settings = HostSettingsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operation_results = OperationResultsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from ._models_py3 import FacebookChannel
from ._models_py3 import FacebookChannelProperties
from ._models_py3 import FacebookPage
from ._models_py3 import HostSettingsResponse
from ._models_py3 import KikChannel
from ._models_py3 import KikChannelProperties
from ._models_py3 import LineChannel
Expand All @@ -43,9 +44,18 @@
from ._models_py3 import MsTeamsChannelProperties
from ._models_py3 import OperationDisplayInfo
from ._models_py3 import OperationEntity
from ._models_py3 import OperationResultsDescription
from ._models_py3 import PrivateEndpoint
from ._models_py3 import PrivateEndpointConnection
from ._models_py3 import PrivateLinkResource
from ._models_py3 import PrivateLinkResourceBase
from ._models_py3 import PrivateLinkResourceListResult
from ._models_py3 import PrivateLinkServiceConnectionState
from ._models_py3 import Resource
from ._models_py3 import ServiceProvider
from ._models_py3 import ServiceProviderParameter
from ._models_py3 import ServiceProviderParameterMetadata
from ._models_py3 import ServiceProviderParameterMetadataConstraints
from ._models_py3 import ServiceProviderProperties
from ._models_py3 import ServiceProviderResponseList
from ._models_py3 import SiteInfo
Expand Down Expand Up @@ -86,6 +96,7 @@
from ._models import FacebookChannel
from ._models import FacebookChannelProperties
from ._models import FacebookPage
from ._models import HostSettingsResponse
from ._models import KikChannel
from ._models import KikChannelProperties
from ._models import LineChannel
Expand All @@ -95,9 +106,18 @@
from ._models import MsTeamsChannelProperties
from ._models import OperationDisplayInfo
from ._models import OperationEntity
from ._models import OperationResultsDescription
from ._models import PrivateEndpoint
from ._models import PrivateEndpointConnection
from ._models import PrivateLinkResource
from ._models import PrivateLinkResourceBase
from ._models import PrivateLinkResourceListResult
from ._models import PrivateLinkServiceConnectionState
from ._models import Resource
from ._models import ServiceProvider
from ._models import ServiceProviderParameter
from ._models import ServiceProviderParameterMetadata
from ._models import ServiceProviderParameterMetadataConstraints
from ._models import ServiceProviderProperties
from ._models import ServiceProviderResponseList
from ._models import SiteInfo
Expand All @@ -117,11 +137,17 @@
from ._paged_models import BotPaged
from ._paged_models import ConnectionSettingPaged
from ._paged_models import OperationEntityPaged
from ._paged_models import PrivateEndpointConnectionPaged
from ._azure_bot_service_enums import (
SkuName,
SkuTier,
Kind,
MsaAppType,
PublicNetworkAccess,
PrivateEndpointServiceConnectionStatus,
PrivateEndpointConnectionProvisioningState,
Key,
OperationResultStatus,
ChannelName,
RegenerateKeysChannelName,
)
Expand Down Expand Up @@ -151,6 +177,7 @@
'FacebookChannel',
'FacebookChannelProperties',
'FacebookPage',
'HostSettingsResponse',
'KikChannel',
'KikChannelProperties',
'LineChannel',
Expand All @@ -160,9 +187,18 @@
'MsTeamsChannelProperties',
'OperationDisplayInfo',
'OperationEntity',
'OperationResultsDescription',
'PrivateEndpoint',
'PrivateEndpointConnection',
'PrivateLinkResource',
'PrivateLinkResourceBase',
'PrivateLinkResourceListResult',
'PrivateLinkServiceConnectionState',
'Resource',
'ServiceProvider',
'ServiceProviderParameter',
'ServiceProviderParameterMetadata',
'ServiceProviderParameterMetadataConstraints',
'ServiceProviderProperties',
'ServiceProviderResponseList',
'SiteInfo',
Expand All @@ -182,10 +218,16 @@
'BotChannelPaged',
'OperationEntityPaged',
'ConnectionSettingPaged',
'PrivateEndpointConnectionPaged',
'SkuName',
'SkuTier',
'Kind',
'MsaAppType',
'PublicNetworkAccess',
'PrivateEndpointServiceConnectionStatus',
'PrivateEndpointConnectionProvisioningState',
'Key',
'OperationResultStatus',
'ChannelName',
'RegenerateKeysChannelName',
]
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,35 @@ class Kind(str, Enum):
designer = "designer"
bot = "bot"
function = "function"
azurebot = "azurebot"


class MsaAppType(str, Enum):

user_assigned_msi = "UserAssignedMSI"
single_tenant = "SingleTenant"
multi_tenant = "MultiTenant"


class PublicNetworkAccess(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class PrivateEndpointServiceConnectionStatus(str, Enum):

pending = "Pending"
approved = "Approved"
rejected = "Rejected"


class PrivateEndpointConnectionProvisioningState(str, Enum):

succeeded = "Succeeded"
creating = "Creating"
deleting = "Deleting"
failed = "Failed"


class Key(str, Enum):
Expand All @@ -38,6 +67,15 @@ class Key(str, Enum):
key2 = "key2"


class OperationResultStatus(str, Enum):

canceled = "Canceled"
succeeded = "Succeeded"
failed = "Failed"
requested = "Requested"
running = "Running"


class ChannelName(str, Enum):

alexa_channel = "AlexaChannel"
Expand Down
Loading

0 comments on commit e009a97

Please sign in to comment.