Skip to content

Commit 1c333d3

Browse files
author
SDKAuto
committed
CodeGen from PR 34585 in Azure/azure-rest-api-specs
Merge bc97f23e5b36baa44ea0dd8d6768028ef1c666e0 into 4e8d16d3793228046ac6171eadda4b8d26ad2b4f
1 parent 9194780 commit 1c333d3

File tree

114 files changed

+7775
-4651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+7775
-4651
lines changed

sdk/botservice/azure-mgmt-botservice/CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# Release History
22

3+
## 3.0.0b1 (2025-05-11)
4+
5+
### Features Added
6+
7+
- Added operation OperationResultsOperations.get
8+
- Added operation group NetworkSecurityPerimeterConfigurationsOperations
9+
- Model Bot has a new parameter system_data
10+
- Model BotChannel has a new parameter system_data
11+
- Model BotProperties has a new parameter network_security_perimeter_configurations
12+
- Model ConnectionSetting has a new parameter system_data
13+
- Model ConnectionSettingProperties has a new parameter id
14+
- Model ConnectionSettingProperties has a new parameter name
15+
- Model ListChannelWithKeysResponse has a new parameter system_data
16+
- Model PrivateEndpointConnection has a new parameter system_data
17+
- Model PrivateEndpointConnectionListResult has a new parameter next_link
18+
- Model Resource has a new parameter system_data
19+
20+
### Breaking Changes
21+
22+
- Model Resource no longer has parameter etag
23+
- Model Resource no longer has parameter kind
24+
- Model Resource no longer has parameter location
25+
- Model Resource no longer has parameter sku
26+
- Model Resource no longer has parameter tags
27+
- Model Resource no longer has parameter zones
28+
- Operation BotsOperations.update has a new required parameter parameters
29+
- Operation BotsOperations.update no longer has parameter etag
30+
- Operation BotsOperations.update no longer has parameter kind
31+
- Operation BotsOperations.update no longer has parameter location
32+
- Operation BotsOperations.update no longer has parameter properties
33+
- Operation BotsOperations.update no longer has parameter sku
34+
- Operation BotsOperations.update no longer has parameter tags
35+
- Operation ChannelsOperations.update has a new required parameter parameters
36+
- Operation ChannelsOperations.update no longer has parameter etag
37+
- Operation ChannelsOperations.update no longer has parameter kind
38+
- Operation ChannelsOperations.update no longer has parameter location
39+
- Operation ChannelsOperations.update no longer has parameter properties
40+
- Operation ChannelsOperations.update no longer has parameter sku
41+
- Operation ChannelsOperations.update no longer has parameter tags
42+
- Parameter location of model Bot is now required
43+
- Parameter location of model BotChannel is now required
44+
- Parameter location of model ConnectionSetting is now required
45+
- Parameter location of model ListChannelWithKeysResponse is now required
46+
- Parameter value of model BotResponseList is now required
47+
- Parameter value of model ChannelResponseList is now required
48+
- Parameter value of model ConnectionSettingResponseList is now required
49+
- Parameter value of model OperationEntityListResult is now required
50+
- Removed operation OperationResultsOperations.begin_get
51+
352
## 2.0.0 (2023-01-12)
453

554
### Features Added

sdk/botservice/azure-mgmt-botservice/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Bot Service Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
@@ -45,8 +45,9 @@ client = AzureBotService(credential=DefaultAzureCredential(), subscription_id=su
4545

4646
## Examples
4747

48-
49-
Code samples for this package can be found at [Bot Service](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
48+
Code samples for this package can be found at:
49+
- [Search Bot Service](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
5051

5152

5253
## Troubleshooting
@@ -58,6 +59,3 @@ Code samples for this package can be found at [Bot Service](https://docs.microso
5859
If you encounter any bugs or have suggestions, please file an issue in the
5960
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6061
section of the project.
61-
62-
63-
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "c0f92082a788895368a738a9200e24971157d7ca",
2+
"commit": "7be0444544b6bdd1aad8f9103f7620602aec7a1c",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.2.7",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.34.1",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/botservice/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/botservice/resource-manager/readme.md"
1111
}

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._azure_bot_service import AzureBotService
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._azure_bot_service import AzureBotService # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"AzureBotService",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

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

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,27 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
11+
from typing_extensions import Self
1112

13+
from azure.core.pipeline import policies
1214
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1316
from azure.mgmt.core import ARMPipelineClient
17+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1419

1520
from . import models as _models
1621
from ._configuration import AzureBotServiceConfiguration
17-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
1823
from .operations import (
1924
BotConnectionOperations,
2025
BotsOperations,
2126
ChannelsOperations,
2227
DirectLineOperations,
2328
EmailOperations,
2429
HostSettingsOperations,
30+
NetworkSecurityPerimeterConfigurationsOperations,
2531
OperationResultsOperations,
2632
Operations,
2733
PrivateEndpointConnectionsOperations,
@@ -30,32 +36,35 @@
3036
)
3137

3238
if TYPE_CHECKING:
33-
# pylint: disable=unused-import,ungrouped-imports
3439
from azure.core.credentials import TokenCredential
3540

3641

37-
class AzureBotService: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
42+
class AzureBotService: # pylint: disable=too-many-instance-attributes
3843
"""Azure Bot Service is a platform for creating smart conversational agents.
3944
4045
:ivar bots: BotsOperations operations
4146
:vartype bots: azure.mgmt.botservice.operations.BotsOperations
42-
:ivar channels: ChannelsOperations operations
43-
:vartype channels: azure.mgmt.botservice.operations.ChannelsOperations
44-
:ivar direct_line: DirectLineOperations operations
45-
:vartype direct_line: azure.mgmt.botservice.operations.DirectLineOperations
46-
:ivar email: EmailOperations operations
47-
:vartype email: azure.mgmt.botservice.operations.EmailOperations
4847
:ivar operations: Operations operations
4948
:vartype operations: azure.mgmt.botservice.operations.Operations
49+
:ivar host_settings: HostSettingsOperations operations
50+
:vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
5051
:ivar bot_connection: BotConnectionOperations operations
5152
:vartype bot_connection: azure.mgmt.botservice.operations.BotConnectionOperations
5253
:ivar qn_amaker_endpoint_keys: QnAMakerEndpointKeysOperations operations
5354
:vartype qn_amaker_endpoint_keys:
5455
azure.mgmt.botservice.operations.QnAMakerEndpointKeysOperations
55-
:ivar host_settings: HostSettingsOperations operations
56-
:vartype host_settings: azure.mgmt.botservice.operations.HostSettingsOperations
5756
:ivar operation_results: OperationResultsOperations operations
5857
:vartype operation_results: azure.mgmt.botservice.operations.OperationResultsOperations
58+
:ivar channels: ChannelsOperations operations
59+
:vartype channels: azure.mgmt.botservice.operations.ChannelsOperations
60+
:ivar direct_line: DirectLineOperations operations
61+
:vartype direct_line: azure.mgmt.botservice.operations.DirectLineOperations
62+
:ivar email: EmailOperations operations
63+
:vartype email: azure.mgmt.botservice.operations.EmailOperations
64+
:ivar network_security_perimeter_configurations:
65+
NetworkSecurityPerimeterConfigurationsOperations operations
66+
:vartype network_security_perimeter_configurations:
67+
azure.mgmt.botservice.operations.NetworkSecurityPerimeterConfigurationsOperations
5968
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
6069
:vartype private_endpoint_connections:
6170
azure.mgmt.botservice.operations.PrivateEndpointConnectionsOperations
@@ -64,52 +73,77 @@ class AzureBotService: # pylint: disable=client-accepts-api-version-keyword,too
6473
azure.mgmt.botservice.operations.PrivateLinkResourcesOperations
6574
:param credential: Credential needed for the client to connect to Azure. Required.
6675
:type credential: ~azure.core.credentials.TokenCredential
67-
:param subscription_id: Azure Subscription ID. Required.
76+
:param subscription_id: The ID of the target subscription. Required.
6877
:type subscription_id: str
69-
:param base_url: Service URL. Default value is "https://management.azure.com".
78+
:param base_url: Service URL. Default value is None.
7079
:type base_url: str
71-
:keyword api_version: Api Version. Default value is "2022-09-15". Note that overriding this
72-
default value may result in unsupported behavior.
80+
:keyword api_version: Api Version. Default value is "2023-09-15-preview". Note that overriding
81+
this default value may result in unsupported behavior.
7382
:paramtype api_version: str
7483
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7584
Retry-After header is present.
7685
"""
7786

7887
def __init__(
79-
self,
80-
credential: "TokenCredential",
81-
subscription_id: str,
82-
base_url: str = "https://management.azure.com",
83-
**kwargs: Any
88+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
8489
) -> None:
85-
self._config = AzureBotServiceConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
86-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
90+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
91+
_endpoints = get_arm_endpoints(_cloud)
92+
if not base_url:
93+
base_url = _endpoints["resource_manager"]
94+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
95+
self._config = AzureBotServiceConfiguration(
96+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
97+
)
98+
99+
_policies = kwargs.pop("policies", None)
100+
if _policies is None:
101+
_policies = [
102+
policies.RequestIdPolicy(**kwargs),
103+
self._config.headers_policy,
104+
self._config.user_agent_policy,
105+
self._config.proxy_policy,
106+
policies.ContentDecodePolicy(**kwargs),
107+
ARMAutoResourceProviderRegistrationPolicy(),
108+
self._config.redirect_policy,
109+
self._config.retry_policy,
110+
self._config.authentication_policy,
111+
self._config.custom_hook_policy,
112+
self._config.logging_policy,
113+
policies.DistributedTracingPolicy(**kwargs),
114+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
115+
self._config.http_logging_policy,
116+
]
117+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
87118

88119
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
89120
self._serialize = Serializer(client_models)
90121
self._deserialize = Deserializer(client_models)
91122
self._serialize.client_side_validation = False
92123
self.bots = BotsOperations(self._client, self._config, self._serialize, self._deserialize)
93-
self.channels = ChannelsOperations(self._client, self._config, self._serialize, self._deserialize)
94-
self.direct_line = DirectLineOperations(self._client, self._config, self._serialize, self._deserialize)
95-
self.email = EmailOperations(self._client, self._config, self._serialize, self._deserialize)
96124
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
125+
self.host_settings = HostSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
97126
self.bot_connection = BotConnectionOperations(self._client, self._config, self._serialize, self._deserialize)
98127
self.qn_amaker_endpoint_keys = QnAMakerEndpointKeysOperations(
99128
self._client, self._config, self._serialize, self._deserialize
100129
)
101-
self.host_settings = HostSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
102130
self.operation_results = OperationResultsOperations(
103131
self._client, self._config, self._serialize, self._deserialize
104132
)
133+
self.channels = ChannelsOperations(self._client, self._config, self._serialize, self._deserialize)
134+
self.direct_line = DirectLineOperations(self._client, self._config, self._serialize, self._deserialize)
135+
self.email = EmailOperations(self._client, self._config, self._serialize, self._deserialize)
136+
self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations(
137+
self._client, self._config, self._serialize, self._deserialize
138+
)
105139
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
106140
self._client, self._config, self._serialize, self._deserialize
107141
)
108142
self.private_link_resources = PrivateLinkResourcesOperations(
109143
self._client, self._config, self._serialize, self._deserialize
110144
)
111145

112-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
146+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
113147
"""Runs the network request through the client's chained policies.
114148
115149
>>> from azure.core.rest import HttpRequest
@@ -129,14 +163,14 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
129163

130164
request_copy = deepcopy(request)
131165
request_copy.url = self._client.format_url(request_copy.url)
132-
return self._client.send_request(request_copy, **kwargs)
166+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
133167

134168
def close(self) -> None:
135169
self._client.close()
136170

137-
def __enter__(self) -> "AzureBotService":
171+
def __enter__(self) -> Self:
138172
self._client.__enter__()
139173
return self
140174

141-
def __exit__(self, *exc_details) -> None:
175+
def __exit__(self, *exc_details: Any) -> None:
142176
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)