Skip to content

Commit a5d9fd4

Browse files
authored
General Availability version of PSTN dial-out capability feature (#34895)
* General Availability version of PSTN dial-out capability feature * General Availability version of PSTN dial-out capability feature * updating for the minimum required core package * updating readme files * updating readme files * updating readme files * updating readme files * updating version * Update _rooms_client.py * updating tests * removing msrest * readding the features for the unreleased version * adding iso date * updating change log * updating change log * updating change log * updating change log * updating change log * removing empty headers in changeLog
1 parent 0bdb68d commit a5d9fd4

File tree

19 files changed

+265
-238
lines changed

19 files changed

+265
-238
lines changed

sdk/communication/azure-communication-rooms/CHANGELOG.md

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

3-
## 1.1.0b2 (Unreleased)
3+
## 1.1.0 (2024-04-15)
4+
- General Availability version of PSTN dial-out capability feature.
45

56
### Features Added
67
- Added support for a new communication identifier `MicrosoftTeamsAppIdentifier`.
78

8-
### Breaking Changes
9-
10-
### Bugs Fixed
11-
129
### Other Changes
1310
- The `MicrosoftBotIdentifier` and `MicrosoftBotProperties` have been deprecated.
1411

sdk/communication/azure-communication-rooms/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ valid_from if they are missing. The default for`valid_from` is current date time
4949

5050
### Create a room
5151
To create a room, call the `create_room` function from `RoomsClient`. The `valid_from`, `valid_until`, and `participants` arguments are all optional.
52-
Starting in 1.1.0b1 release, ACS Rooms supports PSTN Dial-Out feature. To create room with PSTN Dial-Out property, call `create_room` function and set `pstn_dial_out_enabled` to either true or false. If `pstn_dial_out_enabled` is not provided, then the default value for `pstn_dial_out_enabled` is false.
52+
Starting in 1.1.0 release, ACS Rooms supports PSTN Dial-Out feature. To create room with PSTN Dial-Out property, call `create_room` function and set `pstn_dial_out_enabled` to either true or false. If `pstn_dial_out_enabled` is not provided, then the default value for `pstn_dial_out_enabled` is false.
5353

5454
```python
5555
from azure.core.exceptions import HttpResponseError
@@ -83,7 +83,7 @@ except HttpResponseError as ex:
8383
```
8484
### Update a room
8585
The `valid_from` and `valid_until` properties of a created room can be updated by calling the `update_room` function from `RoomsClient`.
86-
Starting in 1.1.0b1 release, ACS Rooms supports PSTN Dial-Out feature. To update a room with PSTN Dial-Out property, call `update_room` and set `pstn_dial_out_enabled` to either true or false. If `pstn_dial_out_enabled` is not provided, then there is no changes to PstnDialOutEnabled property in the room.
86+
Starting in 1.1.0 release, ACS Rooms supports PSTN Dial-Out feature. To update a room with PSTN Dial-Out property, call `update_room` and set `pstn_dial_out_enabled` to either true or false. If `pstn_dial_out_enabled` is not provided, then there is no changes to PstnDialOutEnabled property in the room.
8787

8888
```python
8989
try:

sdk/communication/azure-communication-rooms/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/communication/azure-communication-rooms",
5-
"Tag": "python/communication/azure-communication-rooms_3b00bd4436"
5+
"Tag": "python/communication/azure-communication-rooms_8232264a76"
66
}

sdk/communication/azure-communication-rooms/azure/communication/rooms/_api_versions.py

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

99
class ApiVersion(str, Enum, metaclass=CaseInsensitiveEnumMeta):
1010
V2023_06_14 = "2023-06-14"
11-
V2023_10_30_PREVIEW = "2023-10-30-preview"
11+
V2024_04_15 = "2024-04-15"
1212

13-
DEFAULT_VERSION = ApiVersion.V2023_10_30_PREVIEW
13+
DEFAULT_VERSION = ApiVersion.V2024_04_15

sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.7.6)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.13.7)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

sdk/communication/azure-communication-rooms/azure/communication/rooms/_generated/_client.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.7.6)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.13.7)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

77
from copy import deepcopy
88
from typing import Any
99

1010
from azure.core import PipelineClient
11+
from azure.core.pipeline import policies
1112
from azure.core.rest import HttpRequest, HttpResponse
1213

1314
from ._configuration import AzureCommunicationRoomsServiceConfiguration
@@ -24,8 +25,8 @@ class AzureCommunicationRoomsService: # pylint: disable=client-accepts-api-vers
2425
:vartype participants: azure.communication.rooms.operations.ParticipantsOperations
2526
:param endpoint: The endpoint of the Azure Communication resource. Required.
2627
:type endpoint: str
27-
:keyword api_version: Api Version. Default value is "2023-10-30-preview". Note that overriding
28-
this default value may result in unsupported behavior.
28+
:keyword api_version: Api Version. Default value is "2024-04-15". Note that overriding this
29+
default value may result in unsupported behavior.
2930
:paramtype api_version: str
3031
"""
3132

@@ -34,15 +35,32 @@ def __init__( # pylint: disable=missing-client-constructor-parameter-credential
3435
) -> None:
3536
_endpoint = "{endpoint}"
3637
self._config = AzureCommunicationRoomsServiceConfiguration(endpoint=endpoint, **kwargs)
37-
self._client: PipelineClient = PipelineClient(base_url=_endpoint, config=self._config, **kwargs)
38+
_policies = kwargs.pop("policies", None)
39+
if _policies is None:
40+
_policies = [
41+
policies.RequestIdPolicy(**kwargs),
42+
self._config.headers_policy,
43+
self._config.user_agent_policy,
44+
self._config.proxy_policy,
45+
policies.ContentDecodePolicy(**kwargs),
46+
self._config.redirect_policy,
47+
self._config.retry_policy,
48+
self._config.authentication_policy,
49+
self._config.custom_hook_policy,
50+
self._config.logging_policy,
51+
policies.DistributedTracingPolicy(**kwargs),
52+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
53+
self._config.http_logging_policy,
54+
]
55+
self._client: PipelineClient = PipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
3856

3957
self._serialize = Serializer()
4058
self._deserialize = Deserializer()
4159
self._serialize.client_side_validation = False
4260
self.rooms = RoomsOperations(self._client, self._config, self._serialize, self._deserialize)
4361
self.participants = ParticipantsOperations(self._client, self._config, self._serialize, self._deserialize)
4462

45-
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
63+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
4664
"""Runs the network request through the client's chained policies.
4765
4866
>>> from azure.core.rest import HttpRequest
@@ -66,7 +84,7 @@ def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
6684
}
6785

6886
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
69-
return self._client.send_request(request_copy, **kwargs)
87+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
7088

7189
def close(self) -> None:
7290
self._client.close()
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,39 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
3-
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.7.6)
3+
# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.7, generator: @autorest/python@6.13.7)
44
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
# --------------------------------------------------------------------------
66

77
from typing import Any
88

9-
from azure.core.configuration import Configuration
109
from azure.core.pipeline import policies
1110

1211
VERSION = "unknown"
1312

1413

15-
class AzureCommunicationRoomsServiceConfiguration( # pylint: disable=too-many-instance-attributes,name-too-long
16-
Configuration
17-
):
14+
class AzureCommunicationRoomsServiceConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
1815
"""Configuration for AzureCommunicationRoomsService.
1916
2017
Note that all parameters used to create this instance are saved as instance
2118
attributes.
2219
2320
:param endpoint: The endpoint of the Azure Communication resource. Required.
2421
:type endpoint: str
25-
:keyword api_version: Api Version. Default value is "2023-10-30-preview". Note that overriding
26-
this default value may result in unsupported behavior.
22+
:keyword api_version: Api Version. Default value is "2024-04-15". Note that overriding this
23+
default value may result in unsupported behavior.
2724
:paramtype api_version: str
2825
"""
2926

3027
def __init__(self, endpoint: str, **kwargs: Any) -> None:
31-
super(AzureCommunicationRoomsServiceConfiguration, self).__init__(**kwargs)
32-
api_version: str = kwargs.pop("api_version", "2023-10-30-preview")
28+
api_version: str = kwargs.pop("api_version", "2024-04-15")
3329

3430
if endpoint is None:
3531
raise ValueError("Parameter 'endpoint' must not be None.")
3632

3733
self.endpoint = endpoint
3834
self.api_version = api_version
3935
kwargs.setdefault("sdk_moniker", "communication-rooms/{}".format(VERSION))
36+
self.polling_interval = kwargs.get("polling_interval", 30)
4037
self._configure(**kwargs)
4138

4239
def _configure(self, **kwargs: Any) -> None:
@@ -45,7 +42,7 @@ def _configure(self, **kwargs: Any) -> None:
4542
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
4643
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
4744
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
48-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
4945
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
5046
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
47+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
5148
self.authentication_policy = kwargs.get("authentication_policy")

0 commit comments

Comments
 (0)