Skip to content

Commit d9ac630

Browse files
author
SDKAuto
committed
CodeGen from PR 14317 in Azure/azure-rest-api-specs
Merge d27415687c98cecc69d144dafa46905f4f3f5920 into fd3a9d3
1 parent 502c702 commit d9ac630

26 files changed

+696
-195
lines changed

sdk/botservice/azure-mgmt-botservice/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/[email protected]",
4+
"commit": "3666dd3310a263377b2857a7b4c0cb0bdb8536c3",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --version=3.3.0",
7+
"readme": "specification/botservice/resource-manager/readme.md"
8+
}

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import AzureBotServiceConfiguration
2122
from .operations import BotsOperations
2223
from .operations import ChannelsOperations
2324
from .operations import DirectLineOperations
2425
from .operations import Operations
2526
from .operations import BotConnectionOperations
27+
from .operations import HostSettingsOperations
2628
from . import models
2729

2830

@@ -39,6 +41,8 @@ class AzureBotService(object):
3941
:vartype operations: azure.mgmt.botservice.operations.Operations
4042
:ivar bot_connection: BotConnectionOperations operations
4143
:vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations
44+
:ivar host_settings: HostSettingsOperations operations
45+
:vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
4246
:param credential: Credential needed for the client to connect to Azure.
4347
:type credential: ~azure.core.credentials.TokenCredential
4448
:param subscription_id: Azure Subscription ID.
@@ -74,6 +78,26 @@ def __init__(
7478
self._client, self._config, self._serialize, self._deserialize)
7579
self.bot_connection = BotConnectionOperations(
7680
self._client, self._config, self._serialize, self._deserialize)
81+
self.host_settings = HostSettingsOperations(
82+
self._client, self._config, self._serialize, self._deserialize)
83+
84+
def _send_request(self, http_request, **kwargs):
85+
# type: (HttpRequest, Any) -> HttpResponse
86+
"""Runs the network request through the client's chained policies.
87+
88+
:param http_request: The network request you want to make. Required.
89+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
90+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
91+
:return: The response of your network call. Does not do error handling on your response.
92+
:rtype: ~azure.core.pipeline.transport.HttpResponse
93+
"""
94+
path_format_arguments = {
95+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
96+
}
97+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
98+
stream = kwargs.pop("stream", True)
99+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
100+
return pipeline_response.http_response
77101

78102
def close(self):
79103
# type: () -> None

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2020-06-02"
51+
self.api_version = "2021-03-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION))
5454
self._configure(**kwargs)
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
{
2+
"chosen_version": "2021-03-01",
3+
"total_api_version_list": ["2021-03-01"],
4+
"client": {
5+
"name": "AzureBotService",
6+
"filename": "_azure_bot_service",
7+
"description": "Azure Bot Service is a platform for creating smart conversational agents.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": false,
12+
"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"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\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "Azure Subscription ID.",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "Azure Subscription ID.",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
95+
"credential_default_policy_type_has_async_version": true,
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
99+
},
100+
"operation_groups": {
101+
"bots": "BotsOperations",
102+
"channels": "ChannelsOperations",
103+
"direct_line": "DirectLineOperations",
104+
"operations": "Operations",
105+
"bot_connection": "BotConnectionOperations",
106+
"host_settings": "HostSettingsOperations"
107+
}
108+
}

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 = "1.0.0b1"
9+
VERSION = "0.2.0"

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -21,6 +22,7 @@
2122
from .operations import DirectLineOperations
2223
from .operations import Operations
2324
from .operations import BotConnectionOperations
25+
from .operations import HostSettingsOperations
2426
from .. import models
2527

2628

@@ -37,6 +39,8 @@ class AzureBotService(object):
3739
:vartype operations: azure.mgmt.botservice.aio.operations.Operations
3840
:ivar bot_connection: BotConnectionOperations operations
3941
:vartype bot_connection: azure.mgmt.botservice.aio.operations.BotConnectionOperations
42+
:ivar host_settings: HostSettingsOperations operations
43+
:vartype host_settings: azure.mgmt.botservice.aio.operations.HostSettingsOperations
4044
:param credential: Credential needed for the client to connect to Azure.
4145
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
4246
:param subscription_id: Azure Subscription ID.
@@ -71,6 +75,25 @@ def __init__(
7175
self._client, self._config, self._serialize, self._deserialize)
7276
self.bot_connection = BotConnectionOperations(
7377
self._client, self._config, self._serialize, self._deserialize)
78+
self.host_settings = HostSettingsOperations(
79+
self._client, self._config, self._serialize, self._deserialize)
80+
81+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
82+
"""Runs the network request through the client's chained policies.
83+
84+
:param http_request: The network request you want to make. Required.
85+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
86+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
87+
:return: The response of your network call. Does not do error handling on your response.
88+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
89+
"""
90+
path_format_arguments = {
91+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
92+
}
93+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
94+
stream = kwargs.pop("stream", True)
95+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
96+
return pipeline_response.http_response
7497

7598
async def close(self) -> None:
7699
await self._client.close()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2020-06-02"
48+
self.api_version = "2021-03-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-botservice/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/botservice/azure-mgmt-botservice/azure/mgmt/botservice/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
from ._direct_line_operations import DirectLineOperations
1212
from ._operations import Operations
1313
from ._bot_connection_operations import BotConnectionOperations
14+
from ._host_settings_operations import HostSettingsOperations
1415

1516
__all__ = [
1617
'BotsOperations',
1718
'ChannelsOperations',
1819
'DirectLineOperations',
1920
'Operations',
2021
'BotConnectionOperations',
22+
'HostSettingsOperations',
2123
]

0 commit comments

Comments
 (0)