-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Update service client and client and add new api version #25865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AikoBB
merged 20 commits into
Azure:main
from
maximrytych-ms:feature/maximrytych/add-support-for-token-custom-expiration
Oct 11, 2022
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a8ec219
Update service client and client and add new api version
maximrytych-ms e9b0477
Update parameter type
maximrytych-ms 6bb65f5
Merge branch 'main' into feature/maximrytych/add-support-for-token-cu…
maximrytych-ms 1122600
Add tests, update test recordings, samples, readme and changelog
maximrytych-ms 8c263da
Revert manual changes from generated code
maximrytych-ms 93f980b
fixed API view comments
AikoBB fa5e73c
fixed lint issues
AikoBB 12b3e55
fixed api-version issue
AikoBB 131d27e
Rename token expiration parameter based on review
maximrytych-ms 462ecba
Refactor clients, tests, update samples, readme and changelog
maximrytych-ms 651ae32
Merge main
maximrytych-ms 43649b3
Merge main
maximrytych-ms 0ff0867
Update test recordings
maximrytych-ms 2f70490
fixed PR comments
AikoBB 7308463
fixed creation of the request body
AikoBB 10ca0ff
refactored sync tests
AikoBB 73348a8
fixed lint issues
AikoBB 0a1933a
reverted back unwanted changes in ml sdk
AikoBB d4bb7d9
fixed doctype
AikoBB 032c600
fixed linting issues
AikoBB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 4 additions & 6 deletions
10
sdk/communication/azure-communication-identity/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
...unication/azure-communication-identity/azure/communication/identity/_generated/_client.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from copy import deepcopy | ||
| from typing import Any, TYPE_CHECKING | ||
|
|
||
| from azure.core import PipelineClient | ||
| from azure.core.rest import HttpRequest, HttpResponse | ||
|
|
||
| from ._configuration import CommunicationIdentityClientConfiguration | ||
| from ._serialization import Deserializer, Serializer | ||
| from .operations import CommunicationIdentityOperations | ||
|
|
||
| if TYPE_CHECKING: | ||
| # pylint: disable=unused-import,ungrouped-imports | ||
| from typing import Dict | ||
|
|
||
|
|
||
| class CommunicationIdentityClient: # pylint: disable=client-accepts-api-version-keyword | ||
| """Azure Communication Identity Service. | ||
|
|
||
| :ivar communication_identity: CommunicationIdentityOperations operations | ||
| :vartype communication_identity: | ||
| azure.communication.identity.operations.CommunicationIdentityOperations | ||
| :param endpoint: The communication resource, for example | ||
| https://my-resource.communication.azure.com. Required. | ||
| :type endpoint: str | ||
| :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this | ||
| default value may result in unsupported behavior. | ||
| :paramtype api_version: str | ||
| """ | ||
|
|
||
| def __init__( # pylint: disable=missing-client-constructor-parameter-credential | ||
| self, endpoint: str, **kwargs: Any | ||
| ) -> None: | ||
| _endpoint = "{endpoint}" | ||
| self._config = CommunicationIdentityClientConfiguration(endpoint=endpoint, **kwargs) | ||
| self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) | ||
|
|
||
| self._serialize = Serializer() | ||
| self._deserialize = Deserializer() | ||
| self._serialize.client_side_validation = False | ||
| self.communication_identity = CommunicationIdentityOperations( | ||
| 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. | ||
|
|
||
| >>> from azure.core.rest import HttpRequest | ||
| >>> request = HttpRequest("GET", "https://www.example.org/") | ||
| <HttpRequest [GET], url: 'https://www.example.org/'> | ||
| >>> response = client.send_request(request) | ||
| <HttpResponse: 200 OK> | ||
|
|
||
| For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request | ||
|
|
||
| :param request: The network request you want to make. Required. | ||
| :type request: ~azure.core.rest.HttpRequest | ||
| :keyword bool stream: Whether the response payload will be streamed. Defaults to False. | ||
| :return: The response of your network call. Does not do error handling on your response. | ||
| :rtype: ~azure.core.rest.HttpResponse | ||
| """ | ||
|
|
||
| request_copy = deepcopy(request) | ||
| path_format_arguments = { | ||
| "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), | ||
| } | ||
|
|
||
| request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) | ||
| return self._client.send_request(request_copy, **kwargs) | ||
|
|
||
| def close(self): | ||
| # type: () -> None | ||
| self._client.close() | ||
|
|
||
| def __enter__(self): | ||
| # type: () -> CommunicationIdentityClient | ||
| self._client.__enter__() | ||
| return self | ||
|
|
||
| def __exit__(self, *exc_details): | ||
| # type: (Any) -> None | ||
| self._client.__exit__(*exc_details) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.