forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 15907 in Azure/azure-rest-api-specs
[Web PubSub] Add new API version for GA (Azure#15907) * Add stable version * update path * Update naming * Update webpubsub.json * Change DELETE back to 200 Since it is a breaking change * Update webpubsub.json * We don't expect health check to return error body * Update to use 204 for all delete * Update webpubsub.json
- Loading branch information
SDKAuto
committed
Oct 4, 2021
1 parent
3a14782
commit 27b9605
Showing
21 changed files
with
1,949 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
# Release History | ||
|
||
## 0.1.0 (1970-01-01) | ||
|
||
* Initial Release |
This file contains 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,6 @@ | ||
include _meta.json | ||
recursive-include tests *.py *.yaml | ||
include *.md | ||
include azure/__init__.py | ||
include azure/messaging/__init__.py | ||
|
This file contains 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,27 @@ | ||
# Microsoft Azure SDK for Python | ||
|
||
This is the Microsoft Azure MyService Management Client Library. | ||
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. | ||
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). | ||
|
||
|
||
# Usage | ||
|
||
|
||
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) | ||
|
||
|
||
|
||
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) | ||
Code samples for this package can be found at [MyService Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. | ||
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) | ||
|
||
|
||
# Provide Feedback | ||
|
||
If you encounter any bugs or have suggestions, please file an issue in the | ||
[Issues](https://github.com/Azure/azure-sdk-for-python/issues) | ||
section of the project. | ||
|
||
|
||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-messaging-webpubsubservice%2FREADME.png) |
This file contains 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,8 @@ | ||
{ | ||
"autorest": "V2", | ||
"use": "@microsoft.azure/autorest.python@~4.0.71", | ||
"commit": "39c7d63c21b9a29efe3907d9b949d1c77b021907", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs", | ||
"autorest_command": "autorest specification/webpubsub/data-plane/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/autorest.python@~4.0.71 --version=V2", | ||
"readme": "specification/webpubsub/data-plane/readme.md" | ||
} |
1 change: 1 addition & 0 deletions
1
sdk/webpubsub/azure-messaging-webpubsubservice/azure/__init__.py
This file contains 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 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
1 change: 1 addition & 0 deletions
1
sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/__init__.py
This file contains 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 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
19 changes: 19 additions & 0 deletions
19
sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py
This file contains 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,19 @@ | ||
# 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 ._configuration import AzureMessagingWebPubSubServiceClientConfiguration | ||
from ._azure_messaging_web_pub_sub_service_client import AzureMessagingWebPubSubServiceClient | ||
__all__ = ['AzureMessagingWebPubSubServiceClient', 'AzureMessagingWebPubSubServiceClientConfiguration'] | ||
|
||
from .version import VERSION | ||
|
||
__version__ = VERSION | ||
|
49 changes: 49 additions & 0 deletions
49
...ubservice/azure/messaging/webpubsubservice/_azure_messaging_web_pub_sub_service_client.py
This file contains 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,49 @@ | ||
# 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 msrest.service_client import SDKClient | ||
from msrest import Serializer, Deserializer | ||
|
||
from ._configuration import AzureMessagingWebPubSubServiceClientConfiguration | ||
from msrest.exceptions import HttpOperationError | ||
from .operations import HealthApiOperations | ||
from .operations import WebPubSubOperations | ||
from . import models | ||
|
||
|
||
class AzureMessagingWebPubSubServiceClient(SDKClient): | ||
"""AzureMessagingWebPubSubServiceClient | ||
:ivar config: Configuration for client. | ||
:vartype config: AzureMessagingWebPubSubServiceClientConfiguration | ||
:ivar health_api: HealthApi operations | ||
:vartype health_api: azure.messaging.webpubsub.operations.HealthApiOperations | ||
:ivar web_pub_sub: WebPubSub operations | ||
:vartype web_pub_sub: azure.messaging.webpubsub.operations.WebPubSubOperations | ||
""" | ||
|
||
def __init__( | ||
self): | ||
|
||
self.config = AzureMessagingWebPubSubServiceClientConfiguration() | ||
super(AzureMessagingWebPubSubServiceClient, self).__init__(None, self.config) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '2021-10-01' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.health_api = HealthApiOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.web_pub_sub = WebPubSubOperations( | ||
self._client, self.config, self._serialize, self._deserialize) |
34 changes: 34 additions & 0 deletions
34
...ubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_configuration.py
This file contains 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,34 @@ | ||
# 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 msrest import Configuration | ||
|
||
from .version import VERSION | ||
|
||
|
||
class AzureMessagingWebPubSubServiceClientConfiguration(Configuration): | ||
"""Configuration for AzureMessagingWebPubSubServiceClient | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
""" | ||
|
||
def __init__( | ||
self): | ||
|
||
base_url = '{Endpoint}' | ||
|
||
super(AzureMessagingWebPubSubServiceClientConfiguration, self).__init__(base_url) | ||
|
||
# Starting Autorest.Python 4.0.64, make connection pool activated by default | ||
self.keep_alive = True | ||
|
||
self.add_user_agent('azure-messaging-webpubsubservice/{}'.format(VERSION)) |
29 changes: 29 additions & 0 deletions
29
...bsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/__init__.py
This file contains 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,29 @@ | ||
# 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. | ||
# -------------------------------------------------------------------------- | ||
|
||
try: | ||
from ._models_py3 import ClientTokenResponse | ||
from ._models_py3 import ErrorDetail, ErrorDetailException | ||
from ._models_py3 import InnerError | ||
except (SyntaxError, ImportError): | ||
from ._models import ClientTokenResponse | ||
from ._models import ErrorDetail, ErrorDetailException | ||
from ._models import InnerError | ||
from ._azure_messaging_web_pub_sub_service_client_enums import ( | ||
WebPubSubPermission, | ||
) | ||
|
||
__all__ = [ | ||
'ClientTokenResponse', | ||
'ErrorDetail', 'ErrorDetailException', | ||
'InnerError', | ||
'WebPubSubPermission', | ||
] |
18 changes: 18 additions & 0 deletions
18
...re/messaging/webpubsubservice/models/_azure_messaging_web_pub_sub_service_client_enums.py
This file contains 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,18 @@ | ||
# 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 enum import Enum | ||
|
||
|
||
class WebPubSubPermission(str, Enum): | ||
|
||
send_to_group = "sendToGroup" | ||
join_leave_group = "joinLeaveGroup" |
96 changes: 96 additions & 0 deletions
96
...ubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/models/_models.py
This file contains 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,96 @@ | ||
# 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 msrest.serialization import Model | ||
from msrest.exceptions import HttpOperationError | ||
|
||
|
||
class ClientTokenResponse(Model): | ||
"""The response object containing the token for the client. | ||
:param token: The token value for the WebSocket client to connect to the | ||
service | ||
:type token: str | ||
""" | ||
|
||
_attribute_map = { | ||
'token': {'key': 'token', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ClientTokenResponse, self).__init__(**kwargs) | ||
self.token = kwargs.get('token', None) | ||
|
||
|
||
class ErrorDetail(Model): | ||
"""The error object. | ||
:param code: One of a server-defined set of error codes. | ||
:type code: str | ||
:param message: A human-readable representation of the error. | ||
:type message: str | ||
:param target: The target of the error. | ||
:type target: str | ||
:param details: An array of details about specific errors that led to this | ||
reported error. | ||
:type details: list[~azure.messaging.webpubsub.models.ErrorDetail] | ||
:param inner: | ||
:type inner: ~azure.messaging.webpubsub.models.InnerError | ||
""" | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
'target': {'key': 'target', 'type': 'str'}, | ||
'details': {'key': 'details', 'type': '[ErrorDetail]'}, | ||
'inner': {'key': 'inner', 'type': 'InnerError'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ErrorDetail, self).__init__(**kwargs) | ||
self.code = kwargs.get('code', None) | ||
self.message = kwargs.get('message', None) | ||
self.target = kwargs.get('target', None) | ||
self.details = kwargs.get('details', None) | ||
self.inner = kwargs.get('inner', None) | ||
|
||
|
||
class ErrorDetailException(HttpOperationError): | ||
"""Server responsed with exception of type: 'ErrorDetail'. | ||
:param deserialize: A deserializer | ||
:param response: Server response to be deserialized. | ||
""" | ||
|
||
def __init__(self, deserialize, response, *args): | ||
|
||
super(ErrorDetailException, self).__init__(deserialize, response, 'ErrorDetail', *args) | ||
|
||
|
||
class InnerError(Model): | ||
"""InnerError. | ||
:param code: A more specific error code than was provided by the | ||
containing error. | ||
:type code: str | ||
:param inner: | ||
:type inner: ~azure.messaging.webpubsub.models.InnerError | ||
""" | ||
|
||
_attribute_map = { | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'inner': {'key': 'inner', 'type': 'InnerError'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(InnerError, self).__init__(**kwargs) | ||
self.code = kwargs.get('code', None) | ||
self.inner = kwargs.get('inner', None) |
Oops, something went wrong.