Skip to content

Commit 409b032

Browse files
SDKAutomarkcowl
andcommitted
CodeGen from PR 19105 in Azure/azure-rest-api-specs
[BotService] Update Slack property (Azure#19105) * Add blockchain to latest profile * Add additional types * update slack property Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
1 parent 67d46b9 commit 409b032

26 files changed

+973
-540
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.12.0",
4+
"@autorest/python@5.13.0",
55
"@autorest/modelerfour@4.19.3"
66
],
7-
"commit": "18a8f9df1c94fdbdac9492099013bb6656d3c95a",
7+
"commit": "0ea2274010bb36b78d04d49b460cb6349ef62780",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
1010
"readme": "specification/botservice/resource-manager/readme.md"
1111
}

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_azure_bot_service.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from . import models
1718
from ._configuration import AzureBotServiceConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials import TokenCredential
2324

24-
class AzureBotService:
25+
class AzureBotService: # pylint: disable=too-many-instance-attributes
2526
"""Azure Bot Service is a platform for creating smart conversational agents.
2627
2728
:ivar bots: BotsOperations operations
@@ -48,8 +49,11 @@ class AzureBotService:
4849
:type credential: ~azure.core.credentials.TokenCredential
4950
:param subscription_id: Azure Subscription ID.
5051
:type subscription_id: str
51-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
52+
:param base_url: Service URL. Default value is "https://management.azure.com".
5253
:type base_url: str
54+
:keyword api_version: Api Version. Default value is "2021-05-01-preview". Note that overriding
55+
this default value may result in unsupported behavior.
56+
:paramtype api_version: str
5357
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5458
Retry-After header is present.
5559
"""
@@ -81,7 +85,7 @@ def __init__(
8185

8286
def _send_request(
8387
self,
84-
request, # type: HttpRequest
88+
request: HttpRequest,
8589
**kwargs: Any
8690
) -> HttpResponse:
8791
"""Runs the network request through the client's chained policies.

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class AzureBotServiceConfiguration(Configuration):
22+
class AzureBotServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for AzureBotService.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class AzureBotServiceConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials.TokenCredential
3030
:param subscription_id: Azure Subscription ID.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2021-05-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(AzureBotServiceConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2021-05-01-preview"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION))
5156
self._configure(**kwargs)

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureBotServiceConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14-
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureBotServiceConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureBotServiceConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AzureBotServiceConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0b2"
9+
VERSION = "0.2.0"

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_azure_bot_service.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Awaitable, Optional, TYPE_CHECKING
10+
from typing import Any, Awaitable, TYPE_CHECKING
11+
12+
from msrest import Deserializer, Serializer
1113

1214
from azure.core.rest import AsyncHttpResponse, HttpRequest
1315
from azure.mgmt.core import AsyncARMPipelineClient
14-
from msrest import Deserializer, Serializer
1516

1617
from .. import models
1718
from ._configuration import AzureBotServiceConfiguration
@@ -21,7 +22,7 @@
2122
# pylint: disable=unused-import,ungrouped-imports
2223
from azure.core.credentials_async import AsyncTokenCredential
2324

24-
class AzureBotService:
25+
class AzureBotService: # pylint: disable=too-many-instance-attributes
2526
"""Azure Bot Service is a platform for creating smart conversational agents.
2627
2728
:ivar bots: BotsOperations operations
@@ -48,8 +49,11 @@ class AzureBotService:
4849
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
4950
:param subscription_id: Azure Subscription ID.
5051
:type subscription_id: str
51-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
52+
:param base_url: Service URL. Default value is "https://management.azure.com".
5253
:type base_url: str
54+
:keyword api_version: Api Version. Default value is "2021-05-01-preview". Note that overriding
55+
this default value may result in unsupported behavior.
56+
:paramtype api_version: str
5357
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5458
Retry-After header is present.
5559
"""

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/_configuration.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from azure.core.credentials_async import AsyncTokenCredential
2020

2121

22-
class AzureBotServiceConfiguration(Configuration):
22+
class AzureBotServiceConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for AzureBotService.
2424
2525
Note that all parameters used to create this instance are saved as instance
@@ -29,6 +29,9 @@ class AzureBotServiceConfiguration(Configuration):
2929
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
3030
:param subscription_id: Azure Subscription ID.
3131
:type subscription_id: str
32+
:keyword api_version: Api Version. Default value is "2021-05-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

3437
def __init__(
@@ -38,14 +41,16 @@ def __init__(
3841
**kwargs: Any
3942
) -> None:
4043
super(AzureBotServiceConfiguration, self).__init__(**kwargs)
44+
api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: str
45+
4146
if credential is None:
4247
raise ValueError("Parameter 'credential' must not be None.")
4348
if subscription_id is None:
4449
raise ValueError("Parameter 'subscription_id' must not be None.")
4550

4651
self.credential = credential
4752
self.subscription_id = subscription_id
48-
self.api_version = "2021-05-01-preview"
53+
self.api_version = api_version
4954
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5055
kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION))
5156
self._configure(**kwargs)

0 commit comments

Comments
 (0)