-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Queues] Generated Queues using newest autorest version #16148
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
tasherif-msft
merged 5 commits into
Azure:master
from
tasherif-msft:queue-new-generator
Jan 18, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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
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
16 changes: 7 additions & 9 deletions
16
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/__init__.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 |
|---|---|---|
| @@ -1,18 +1,16 @@ | ||
| # 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. | ||
| # | ||
| # 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. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._azure_queue_storage import AzureQueueStorage | ||
| __all__ = ['AzureQueueStorage'] | ||
|
|
||
| from .version import VERSION | ||
|
|
||
| __version__ = VERSION | ||
|
|
||
| try: | ||
| from ._patch import patch_sdk # type: ignore | ||
| patch_sdk() | ||
| except ImportError: | ||
| pass |
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
46 changes: 26 additions & 20 deletions
46
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/_configuration.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 |
|---|---|---|
| @@ -1,52 +1,58 @@ | ||
| # 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. | ||
| # | ||
| # 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. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import TYPE_CHECKING | ||
|
|
||
| from azure.core.configuration import Configuration | ||
| from azure.core.pipeline import policies | ||
|
|
||
| from .version import VERSION | ||
| if TYPE_CHECKING: | ||
| # pylint: disable=unused-import,ungrouped-imports | ||
| from typing import Any | ||
|
|
||
| VERSION = "unknown" | ||
|
|
||
| class AzureQueueStorageConfiguration(Configuration): | ||
| """Configuration for AzureQueueStorage | ||
| """Configuration for AzureQueueStorage. | ||
|
|
||
| Note that all parameters used to create this instance are saved as instance | ||
| attributes. | ||
|
|
||
| :param url: The URL of the service account, queue or message that is the | ||
| targe of the desired operation. | ||
| :param url: The URL of the service account, queue or message that is the targe of the desired operation. | ||
| :type url: str | ||
| :ivar version: Specifies the version of the operation to use for this | ||
| request. | ||
| :type version: str | ||
| """ | ||
|
|
||
| def __init__(self, url, **kwargs): | ||
|
|
||
| def __init__( | ||
| self, | ||
| url, # type: str | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| if url is None: | ||
| raise ValueError("Parameter 'url' must not be None.") | ||
|
|
||
| super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
| self._configure(**kwargs) | ||
|
|
||
| self.user_agent_policy.add_user_agent('azsdk-python-azurequeuestorage/{}'.format(VERSION)) | ||
| self.generate_client_request_id = True | ||
|
|
||
| self.url = url | ||
| self.version = "2018-03-28" | ||
| kwargs.setdefault('sdk_moniker', 'azurequeuestorage/{}'.format(VERSION)) | ||
| self._configure(**kwargs) | ||
|
|
||
| def _configure(self, **kwargs): | ||
| def _configure( | ||
| self, | ||
| **kwargs # type: Any | ||
| ): | ||
| # type: (...) -> None | ||
| self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
| self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
| self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
| self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
| self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
| self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) | ||
| self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
| self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) | ||
| self.authentication_policy = kwargs.get('authentication_policy') |
9 changes: 3 additions & 6 deletions
9
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/__init__.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 |
|---|---|---|
| @@ -1,13 +1,10 @@ | ||
| # 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. | ||
| # | ||
| # 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. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._azure_queue_storage_async import AzureQueueStorage | ||
| from ._azure_queue_storage import AzureQueueStorage | ||
| __all__ = ['AzureQueueStorage'] |
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
43 changes: 21 additions & 22 deletions
43
...ue/_generated/aio/_configuration_async.py → ...ge/queue/_generated/aio/_configuration.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 |
|---|---|---|
| @@ -1,53 +1,52 @@ | ||
| # 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. | ||
| # | ||
| # 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. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from typing import Any | ||
|
|
||
| from azure.core.configuration import Configuration | ||
| from azure.core.pipeline import policies | ||
|
|
||
| from ..version import VERSION | ||
|
|
||
| VERSION = "unknown" | ||
|
|
||
| class AzureQueueStorageConfiguration(Configuration): | ||
| """Configuration for AzureQueueStorage | ||
| """Configuration for AzureQueueStorage. | ||
|
|
||
| Note that all parameters used to create this instance are saved as instance | ||
| attributes. | ||
|
|
||
| :param url: The URL of the service account, queue or message that is the | ||
| targe of the desired operation. | ||
| :param url: The URL of the service account, queue or message that is the targe of the desired operation. | ||
| :type url: str | ||
| :ivar version: Specifies the version of the operation to use for this | ||
| request. | ||
| :type version: str | ||
| """ | ||
|
|
||
| def __init__(self, url, **kwargs): | ||
|
|
||
| def __init__( | ||
| self, | ||
| url: str, | ||
| **kwargs: Any | ||
| ) -> None: | ||
| if url is None: | ||
| raise ValueError("Parameter 'url' must not be None.") | ||
|
|
||
| super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
| self._configure(**kwargs) | ||
|
|
||
| self.user_agent_policy.add_user_agent('azsdk-python-azurequeuestorage/{}'.format(VERSION)) | ||
| self.generate_client_request_id = True | ||
| self.accept_language = None | ||
|
|
||
| self.url = url | ||
| self.version = "2018-03-28" | ||
| kwargs.setdefault('sdk_moniker', 'azurequeuestorage/{}'.format(VERSION)) | ||
| self._configure(**kwargs) | ||
|
|
||
| def _configure(self, **kwargs): | ||
| def _configure( | ||
| self, | ||
| **kwargs: Any | ||
| ) -> None: | ||
| self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
| self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
| self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
| self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
| self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
| self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) | ||
| self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
| self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) | ||
| self.authentication_policy = kwargs.get('authentication_policy') |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these intended to be ServiceOperations operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it’s in generated not blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question, I'll check to see if this is intended behavior