Skip to content

Commit

Permalink
CodeGen from PR 26638 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge f9dca7781bdde443bce5eb3473c0412633050ffd into 000a628a549b6a6060b2f88326acb0a3a096ae3d
  • Loading branch information
SDKAuto committed Nov 9, 2023
1 parent 76781c8 commit e3745a6
Show file tree
Hide file tree
Showing 62 changed files with 3,062 additions and 77 deletions.
4 changes: 2 additions & 2 deletions sdk/communication/azure-mgmt-communication/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "5dd1107d5f2be8d600325d795450e1d854fbe7e8",
"commit": "410af06116dc5ca3e1cf06c12603af2e3b2bbfb8",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/communication/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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"autorest_command": "autorest specification/communication/resource-manager/readme.md --generate-sample=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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/communication/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
EmailServicesOperations,
Operations,
SenderUsernamesOperations,
SuppressionListAddressesOperations,
SuppressionListsOperations,
)

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


class CommunicationServiceManagementClient: # pylint: disable=client-accepts-api-version-keyword
class CommunicationServiceManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""REST API for Azure Communication Services.
:ivar operations: Operations operations
Expand All @@ -42,13 +44,18 @@ class CommunicationServiceManagementClient: # pylint: disable=client-accepts-ap
:vartype email_services: azure.mgmt.communication.operations.EmailServicesOperations
:ivar sender_usernames: SenderUsernamesOperations operations
:vartype sender_usernames: azure.mgmt.communication.operations.SenderUsernamesOperations
:ivar suppression_lists: SuppressionListsOperations operations
:vartype suppression_lists: azure.mgmt.communication.operations.SuppressionListsOperations
:ivar suppression_list_addresses: SuppressionListAddressesOperations operations
:vartype suppression_list_addresses:
azure.mgmt.communication.operations.SuppressionListAddressesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -80,6 +87,12 @@ def __init__(
self.sender_usernames = SenderUsernamesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.suppression_lists = SuppressionListsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.suppression_list_addresses = SuppressionListAddressesOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class CommunicationServiceManagementClientConfiguration(Configuration): # pylin
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(CommunicationServiceManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.1.0b1"
VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@
EmailServicesOperations,
Operations,
SenderUsernamesOperations,
SuppressionListAddressesOperations,
SuppressionListsOperations,
)

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential


class CommunicationServiceManagementClient: # pylint: disable=client-accepts-api-version-keyword
class CommunicationServiceManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""REST API for Azure Communication Services.
:ivar operations: Operations operations
Expand All @@ -42,13 +44,18 @@ class CommunicationServiceManagementClient: # pylint: disable=client-accepts-ap
:vartype email_services: azure.mgmt.communication.aio.operations.EmailServicesOperations
:ivar sender_usernames: SenderUsernamesOperations operations
:vartype sender_usernames: azure.mgmt.communication.aio.operations.SenderUsernamesOperations
:ivar suppression_lists: SuppressionListsOperations operations
:vartype suppression_lists: azure.mgmt.communication.aio.operations.SuppressionListsOperations
:ivar suppression_list_addresses: SuppressionListAddressesOperations operations
:vartype suppression_list_addresses:
azure.mgmt.communication.aio.operations.SuppressionListAddressesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -80,6 +87,12 @@ def __init__(
self.sender_usernames = SenderUsernamesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.suppression_lists = SuppressionListsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.suppression_list_addresses = SuppressionListAddressesOperations(
self._client, self._config, self._serialize, self._deserialize
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class CommunicationServiceManagementClientConfiguration(Configuration): # pylin
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-04-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(CommunicationServiceManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-04-01-preview")
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from ._domains_operations import DomainsOperations
from ._email_services_operations import EmailServicesOperations
from ._sender_usernames_operations import SenderUsernamesOperations
from ._suppression_lists_operations import SuppressionListsOperations
from ._suppression_list_addresses_operations import SuppressionListAddressesOperations

from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
Expand All @@ -22,6 +24,8 @@
"DomainsOperations",
"EmailServicesOperations",
"SenderUsernamesOperations",
"SuppressionListsOperations",
"SuppressionListAddressesOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading

0 comments on commit e3745a6

Please sign in to comment.