diff --git a/sdk/signalr/azure-mgmt-signalr/README.md b/sdk/signalr/azure-mgmt-signalr/README.md index d13cd5da41bb..8dc4f14cf656 100644 --- a/sdk/signalr/azure-mgmt-signalr/README.md +++ b/sdk/signalr/azure-mgmt-signalr/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure SignalR 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 [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [SignalR](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. -## Usage +# Provide Feedback -For code examples, see -[SignalR](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## 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) +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. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-signalr%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-signalr%2FREADME.png) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py index 9a9b15f10c6b..b29ecd7f6e57 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .signal_rmanagement_client import SignalRManagementClient -from .version import VERSION +from ._configuration import SignalRManagementClientConfiguration +from ._signal_rmanagement_client import SignalRManagementClient +__all__ = ['SignalRManagementClient', 'SignalRManagementClientConfiguration'] -__all__ = ['SignalRManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py new file mode 100644 index 000000000000..1693ad648a32 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class SignalRManagementClientConfiguration(AzureConfiguration): + """Configuration for SignalRManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Gets subscription Id which uniquely identify the + Microsoft Azure subscription. The subscription ID forms part of the URI + for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SignalRManagementClientConfiguration, 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-mgmt-signalr/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py similarity index 60% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py index c29ac66baef4..a0f08fe67a45 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/signal_rmanagement_client.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_signal_rmanagement_client.py @@ -11,46 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.signal_roperations import SignalROperations -from .operations.usages_operations import UsagesOperations -from . import models - - -class SignalRManagementClientConfiguration(AzureConfiguration): - """Configuration for SignalRManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription Id which uniquely identify the - Microsoft Azure subscription. The subscription ID forms part of the URI - for every service call. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - super(SignalRManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-signalr/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SignalRManagementClientConfiguration +from .operations import Operations +from .operations import SignalROperations +from .operations import SignalRPrivateEndpointConnectionsOperations +from .operations import SignalRPrivateLinkResourcesOperations +from .operations import UsagesOperations +from . import models class SignalRManagementClient(SDKClient): @@ -63,6 +31,10 @@ class SignalRManagementClient(SDKClient): :vartype operations: azure.mgmt.signalr.operations.Operations :ivar signal_r: SignalR operations :vartype signal_r: azure.mgmt.signalr.operations.SignalROperations + :ivar signal_rprivate_endpoint_connections: SignalRPrivateEndpointConnections operations + :vartype signal_rprivate_endpoint_connections: azure.mgmt.signalr.operations.SignalRPrivateEndpointConnectionsOperations + :ivar signal_rprivate_link_resources: SignalRPrivateLinkResources operations + :vartype signal_rprivate_link_resources: azure.mgmt.signalr.operations.SignalRPrivateLinkResourcesOperations :ivar usages: Usages operations :vartype usages: azure.mgmt.signalr.operations.UsagesOperations @@ -91,5 +63,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.signal_r = SignalROperations( self._client, self.config, self._serialize, self._deserialize) + self.signal_rprivate_endpoint_connections = SignalRPrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.signal_rprivate_link_resources = SignalRPrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py index e10229ee1525..4a5e7fe21b7d 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py @@ -10,84 +10,133 @@ # -------------------------------------------------------------------------- try: - from .operation_display_py3 import OperationDisplay - from .dimension_py3 import Dimension - from .metric_specification_py3 import MetricSpecification - from .service_specification_py3 import ServiceSpecification - from .operation_properties_py3 import OperationProperties - from .operation_py3 import Operation - from .name_availability_parameters_py3 import NameAvailabilityParameters - from .name_availability_py3 import NameAvailability - from .resource_sku_py3 import ResourceSku - from .signal_rresource_py3 import SignalRResource - from .tracked_resource_py3 import TrackedResource - from .resource_py3 import Resource - from .signal_rfeature_py3 import SignalRFeature - from .signal_rcors_settings_py3 import SignalRCorsSettings - from .signal_rcreate_or_update_properties_py3 import SignalRCreateOrUpdateProperties - from .signal_rkeys_py3 import SignalRKeys - from .regenerate_key_parameters_py3 import RegenerateKeyParameters - from .signal_rcreate_parameters_py3 import SignalRCreateParameters - from .signal_rupdate_parameters_py3 import SignalRUpdateParameters - from .signal_rusage_name_py3 import SignalRUsageName - from .signal_rusage_py3 import SignalRUsage + from ._models_py3 import Dimension + from ._models_py3 import ErrorResponse, ErrorResponseException + from ._models_py3 import ErrorResponseBody + from ._models_py3 import LogSpecification + from ._models_py3 import MetricSpecification + from ._models_py3 import NameAvailability + from ._models_py3 import NameAvailabilityParameters + from ._models_py3 import NetworkACL + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointACL + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource + from ._models_py3 import RegenerateKeyParameters + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + from ._models_py3 import ServerlessUpstreamSettings + from ._models_py3 import ServiceSpecification + from ._models_py3 import SignalRCorsSettings + from ._models_py3 import SignalRCreateOrUpdateProperties + from ._models_py3 import SignalRCreateParameters + from ._models_py3 import SignalRFeature + from ._models_py3 import SignalRKeys + from ._models_py3 import SignalRNetworkACLs + from ._models_py3 import SignalRResource + from ._models_py3 import SignalRUpdateParameters + from ._models_py3 import SignalRUsage + from ._models_py3 import SignalRUsageName + from ._models_py3 import TrackedResource + from ._models_py3 import UpstreamTemplate except (SyntaxError, ImportError): - from .operation_display import OperationDisplay - from .dimension import Dimension - from .metric_specification import MetricSpecification - from .service_specification import ServiceSpecification - from .operation_properties import OperationProperties - from .operation import Operation - from .name_availability_parameters import NameAvailabilityParameters - from .name_availability import NameAvailability - from .resource_sku import ResourceSku - from .signal_rresource import SignalRResource - from .tracked_resource import TrackedResource - from .resource import Resource - from .signal_rfeature import SignalRFeature - from .signal_rcors_settings import SignalRCorsSettings - from .signal_rcreate_or_update_properties import SignalRCreateOrUpdateProperties - from .signal_rkeys import SignalRKeys - from .regenerate_key_parameters import RegenerateKeyParameters - from .signal_rcreate_parameters import SignalRCreateParameters - from .signal_rupdate_parameters import SignalRUpdateParameters - from .signal_rusage_name import SignalRUsageName - from .signal_rusage import SignalRUsage -from .operation_paged import OperationPaged -from .signal_rresource_paged import SignalRResourcePaged -from .signal_rusage_paged import SignalRUsagePaged -from .signal_rmanagement_client_enums import ( + from ._models import Dimension + from ._models import ErrorResponse, ErrorResponseException + from ._models import ErrorResponseBody + from ._models import LogSpecification + from ._models import MetricSpecification + from ._models import NameAvailability + from ._models import NameAvailabilityParameters + from ._models import NetworkACL + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationProperties + from ._models import PrivateEndpoint + from ._models import PrivateEndpointACL + from ._models import PrivateEndpointConnection + from ._models import PrivateLinkResource + from ._models import PrivateLinkServiceConnectionState + from ._models import ProxyResource + from ._models import RegenerateKeyParameters + from ._models import Resource + from ._models import ResourceSku + from ._models import ServerlessUpstreamSettings + from ._models import ServiceSpecification + from ._models import SignalRCorsSettings + from ._models import SignalRCreateOrUpdateProperties + from ._models import SignalRCreateParameters + from ._models import SignalRFeature + from ._models import SignalRKeys + from ._models import SignalRNetworkACLs + from ._models import SignalRResource + from ._models import SignalRUpdateParameters + from ._models import SignalRUsage + from ._models import SignalRUsageName + from ._models import TrackedResource + from ._models import UpstreamTemplate +from ._paged_models import OperationPaged +from ._paged_models import PrivateLinkResourcePaged +from ._paged_models import SignalRResourcePaged +from ._paged_models import SignalRUsagePaged +from ._signal_rmanagement_client_enums import ( SignalRSkuTier, ProvisioningState, + PrivateLinkServiceConnectionStatus, + ServiceKind, + FeatureFlags, + ACLAction, KeyType, ) __all__ = [ - 'OperationDisplay', 'Dimension', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseBody', + 'LogSpecification', 'MetricSpecification', - 'ServiceSpecification', - 'OperationProperties', - 'Operation', - 'NameAvailabilityParameters', 'NameAvailability', - 'ResourceSku', - 'SignalRResource', - 'TrackedResource', + 'NameAvailabilityParameters', + 'NetworkACL', + 'Operation', + 'OperationDisplay', + 'OperationProperties', + 'PrivateEndpoint', + 'PrivateEndpointACL', + 'PrivateEndpointConnection', + 'PrivateLinkResource', + 'PrivateLinkServiceConnectionState', + 'ProxyResource', + 'RegenerateKeyParameters', 'Resource', - 'SignalRFeature', + 'ResourceSku', + 'ServerlessUpstreamSettings', + 'ServiceSpecification', 'SignalRCorsSettings', 'SignalRCreateOrUpdateProperties', - 'SignalRKeys', - 'RegenerateKeyParameters', 'SignalRCreateParameters', + 'SignalRFeature', + 'SignalRKeys', + 'SignalRNetworkACLs', + 'SignalRResource', 'SignalRUpdateParameters', - 'SignalRUsageName', 'SignalRUsage', + 'SignalRUsageName', + 'TrackedResource', + 'UpstreamTemplate', 'OperationPaged', 'SignalRResourcePaged', + 'PrivateLinkResourcePaged', 'SignalRUsagePaged', 'SignalRSkuTier', 'ProvisioningState', + 'PrivateLinkServiceConnectionStatus', + 'ServiceKind', + 'FeatureFlags', + 'ACLAction', 'KeyType', ] diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py new file mode 100644 index 000000000000..3a4cd8b2631b --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py @@ -0,0 +1,1200 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(Dimension, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.internal_name = kwargs.get('internal_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class ErrorResponse(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.signalr.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseBody(Model): + """Describes a particular API error with an error code and a message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. An error code that describes the error condition + more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + :type code: str + :param message: Required. A message that describes the error in detail and + provides debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.signalr.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, 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) + + +class LogSpecification(Model): + """Specifications of the Logs for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: The unit that makes sense for the metric. + :type unit: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was + emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for + time periods where nothing was emitted. + :type fill_gap_with_zero: str + :param category: The name of the metric category that the metric belongs + to. A metric can only belong to a single category. + :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + } + + def __init__(self, **kwargs): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.category = kwargs.get('category', None) + self.dimensions = kwargs.get('dimensions', None) + + +class NameAvailability(Model): + """Result of the request to check name availability. It contains a flag and + possible reason of failure. + + :param name_available: Indicates whether the name is available or not. + :type name_available: bool + :param reason: The reason of the availability. Required if name is not + available. + :type reason: str + :param message: The message of the operation. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailability, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class NameAvailabilityParameters(Model): + """Data POST-ed to the nameAvailability action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The resource type. Should be always + "Microsoft.SignalRService/SignalR". + :type type: str + :param name: Required. The SignalR service name to validate. + e.g."my-signalR-name-here" + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.name = kwargs.get('name', None) + + +class NetworkACL(Model): + """Network ACL. + + :param allow: Allowed request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type allow: list[str] + :param deny: Denied request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type deny: list[str] + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': '[str]'}, + 'deny': {'key': 'deny', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NetworkACL, self).__init__(**kwargs) + self.allow = kwargs.get('allow', None) + self.deny = kwargs.get('deny', None) + + +class Operation(Model): + """REST API operation supported by SignalR resource provider. + + :param name: Name of the operation with format: + {provider}/{resource}/{operation} + :type name: str + :param is_data_action: If the operation is a data action. (for data plane + rbac) + :type is_data_action: bool + :param display: The object that describes the operation. + :type display: ~azure.mgmt.signalr.models.OperationDisplay + :param origin: Optional. The intended executor of the operation; governs + the display of the operation in the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Extra properties for the operation. + :type properties: ~azure.mgmt.signalr.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(Model): + """The object that describes a operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: The localized friendly name for the operation. + :type operation: str + :param description: The localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: The service specifications. + :type service_specification: + ~azure.mgmt.signalr.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, **kwargs): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class PrivateEndpoint(Model): + """Private endpoint. + + :param id: Full qualified Id of the private endpoint + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointACL(Model): + """ACL for a private endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the private endpoint connection + :type name: str + :param allow: Allowed request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type allow: list[str] + :param deny: Denied request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type deny: list[str] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'allow': {'key': 'allow', 'type': '[str]'}, + 'deny': {'key': 'deny', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointACL, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.allow = kwargs.get('allow', None) + self.deny = kwargs.get('deny', None) + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection to SignalR resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :ivar provisioning_state: Provisioning state of the private endpoint + connection. Possible values include: 'Unknown', 'Succeeded', 'Failed', + 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :param private_endpoint: Private endpoint associated with the private + endpoint connection + :type private_endpoint: ~azure.mgmt.signalr.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state + :type private_link_service_connection_state: + ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.provisioning_state = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateLinkResource(ProxyResource): + """Private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param group_id: Group Id of the private link resource + :type group_id: str + :param required_members: Required members of the private link resource + :type required_members: list[str] + :param required_zone_names: Required private DNS zone names + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkServiceConnectionState(Model): + """Connection state of the private endpoint connection. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class RegenerateKeyParameters(Model): + """Parameters describes the request to regenerate access keys. + + :param key_type: The keyType to regenerate. Must be either 'primary' or + 'secondary'(case-insensitive). Possible values include: 'Primary', + 'Secondary' + :type key_type: str or ~azure.mgmt.signalr.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', None) + + +class ResourceSku(Model): + """The billing information of the SignalR resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Required. + Allowed values: Standard_S1, Free_F1 + :type name: str + :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. + `Basic` is deprecated, use `Standard` instead. Possible values include: + 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier + :param size: Optional string. For future use. + :type size: str + :param family: Optional string. For future use. + :type family: str + :param capacity: Optional, integer. The unit count of SignalR resource. 1 + by default. + If present, following values are allowed: + Free: 1 + Standard: 1,2,5,10,20,50,100 + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ResourceSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class ServerlessUpstreamSettings(Model): + """The settings for the Upstream when the Azure SignalR is in server-less + mode. + + :param templates: Gets or sets the list of Upstream URL templates. Order + matters, and the first matching template takes effects. + :type templates: list[~azure.mgmt.signalr.models.UpstreamTemplate] + """ + + _attribute_map = { + 'templates': {'key': 'templates', 'type': '[UpstreamTemplate]'}, + } + + def __init__(self, **kwargs): + super(ServerlessUpstreamSettings, self).__init__(**kwargs) + self.templates = kwargs.get('templates', None) + + +class ServiceSpecification(Model): + """An object that describes a specification. + + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring. + :type metric_specifications: + list[~azure.mgmt.signalr.models.MetricSpecification] + :param log_specifications: Specifications of the Logs for Azure + Monitoring. + :type log_specifications: + list[~azure.mgmt.signalr.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, **kwargs): + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) + + +class SignalRCorsSettings(Model): + """Cross-Origin Resource Sharing (CORS) settings. + + :param allowed_origins: Gets or sets the list of origins that should be + allowed to make cross-origin calls (for example: + http://example.com:12345). Use "*" to allow all. If omitted, allow all by + default. + :type allowed_origins: list[str] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SignalRCorsSettings, self).__init__(**kwargs) + self.allowed_origins = kwargs.get('allowed_origins', None) + + +class SignalRCreateOrUpdateProperties(Model): + """Settings used to provision or configure the resource. + + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :param upstream: Upstream settings when the Azure SignalR is in + server-less mode. + :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings + :param network_ac_ls: Network ACLs + :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + """ + + _attribute_map = { + 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, + 'upstream': {'key': 'upstream', 'type': 'ServerlessUpstreamSettings'}, + 'network_ac_ls': {'key': 'networkACLs', 'type': 'SignalRNetworkACLs'}, + } + + def __init__(self, **kwargs): + super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) + self.host_name_prefix = kwargs.get('host_name_prefix', None) + self.features = kwargs.get('features', None) + self.cors = kwargs.get('cors', None) + self.upstream = kwargs.get('upstream', None) + self.network_ac_ls = kwargs.get('network_ac_ls', None) + + +class SignalRUpdateParameters(Model): + """Parameters for SignalR service update operation. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + } + + def __init__(self, **kwargs): + super(SignalRUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.properties = kwargs.get('properties', None) + + +class SignalRCreateParameters(SignalRUpdateParameters): + """Parameters for SignalR service create/update operation. + Keep the same schema as AzSignalR.Models.SignalRResource. + + All required parameters must be populated in order to send to Azure. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + :param location: Required. Azure GEO region: e.g. West US | East US | + North Central US | South Central US | West Europe | North Europe | East + Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + :type location: str + :param kind: The kind of the service. (e.g. signalr vs. rawwebsockets). + Possible values include: 'SignalR', 'RawWebSockets' + :type kind: str or ~azure.mgmt.signalr.models.ServiceKind + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRCreateParameters, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.kind = kwargs.get('kind', None) + + +class SignalRFeature(Model): + """Feature of a SignalR resource, which controls the SignalR runtime behavior. + + All required parameters must be populated in order to send to Azure. + + :param flag: Required. FeatureFlags is the supported features of Azure + SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values + allowed: "Default": have your own backend server; "Serverless": your + application doesn't have a backend server; "Classic": for backward + compatibility. Support both Default and Serverless mode but not + recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the + connectivity log category respectively. Possible values include: + 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs' + :type flag: str or ~azure.mgmt.signalr.models.FeatureFlags + :param value: Required. Value of the feature flag. See Azure SignalR + service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for + allowed values. + :type value: str + :param properties: Optional properties related to this feature. + :type properties: dict[str, str] + """ + + _validation = { + 'flag': {'required': True}, + 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'flag': {'key': 'flag', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(SignalRFeature, self).__init__(**kwargs) + self.flag = kwargs.get('flag', None) + self.value = kwargs.get('value', None) + self.properties = kwargs.get('properties', None) + + +class SignalRKeys(Model): + """A class represents the access keys of SignalR service. + + :param primary_key: The primary access key. + :type primary_key: str + :param secondary_key: The secondary access key. + :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRKeys, self).__init__(**kwargs) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.primary_connection_string = kwargs.get('primary_connection_string', None) + self.secondary_connection_string = kwargs.get('secondary_connection_string', None) + + +class SignalRNetworkACLs(Model): + """Network ACLs for SignalR. + + :param default_action: Default action when no other rule matches. Possible + values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.signalr.models.ACLAction + :param public_network: ACL for requests from public network + :type public_network: ~azure.mgmt.signalr.models.NetworkACL + :param private_endpoints: ACLs for requests from private endpoints + :type private_endpoints: + list[~azure.mgmt.signalr.models.PrivateEndpointACL] + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'public_network': {'key': 'publicNetwork', 'type': 'NetworkACL'}, + 'private_endpoints': {'key': 'privateEndpoints', 'type': '[PrivateEndpointACL]'}, + } + + def __init__(self, **kwargs): + super(SignalRNetworkACLs, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', None) + self.public_network = kwargs.get('public_network', None) + self.private_endpoints = kwargs.get('private_endpoints', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class SignalRResource(TrackedResource): + """A class represent a SignalR service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param sku: SKU of the service. + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :param upstream: Upstream settings when the Azure SignalR is in + server-less mode. + :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings + :param network_ac_ls: Network ACLs + :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', + 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :ivar external_ip: The publicly accessible IP of the SignalR service. + :vartype external_ip: str + :ivar host_name: FQDN of the SignalR service instance. Format: + xxx.service.signalr.net + :vartype host_name: str + :ivar public_port: The publicly accessible port of the SignalR service + which is designed for browser/client side usage. + :vartype public_port: int + :ivar server_port: The publicly accessible port of the SignalR service + which is designed for customer server side usage. + :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str + :param private_endpoint_connections: Private endpoint connections to the + SignalR resource. + :type private_endpoint_connections: + list[~azure.mgmt.signalr.models.PrivateEndpointConnection] + :ivar kind: The kind of the service - e.g. "SignalR", or "RawWebSockets" + for "Microsoft.SignalRService/SignalR". Possible values include: + 'SignalR', 'RawWebSockets' + :vartype kind: str or ~azure.mgmt.signalr.models.ServiceKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'external_ip': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_port': {'readonly': True}, + 'server_port': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, + 'upstream': {'key': 'properties.upstream', 'type': 'ServerlessUpstreamSettings'}, + 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'SignalRNetworkACLs'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, + 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.host_name_prefix = kwargs.get('host_name_prefix', None) + self.features = kwargs.get('features', None) + self.cors = kwargs.get('cors', None) + self.upstream = kwargs.get('upstream', None) + self.network_ac_ls = kwargs.get('network_ac_ls', None) + self.provisioning_state = None + self.external_ip = None + self.host_name = None + self.public_port = None + self.server_port = None + self.version = kwargs.get('version', None) + self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.kind = None + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsage, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) + self.unit = kwargs.get('unit', None) + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The identifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SignalRUsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class UpstreamTemplate(Model): + """Upstream template item settings. It defines the Upstream URL of the + incoming requests. + The template defines the pattern of the event, the hub or the category of + the incoming request that matches current URL template. + + All required parameters must be populated in order to send to Azure. + + :param hub_pattern: Gets or sets the matching pattern for hub names. If + not set, it matches any hub. + There are 3 kind of patterns supported: + 1. "*", it to matches any hub name + 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches + "hub1" and "hub2" + 3. The single hub name, for example, "hub1", it matches "hub1" + :type hub_pattern: str + :param event_pattern: Gets or sets the matching pattern for event names. + If not set, it matches any event. + There are 3 kind of patterns supported: + 1. "*", it to matches any event name + 2. Combine multiple events with ",", for example "connect,disconnect", it + matches event "connect" and "disconnect" + 3. The single event name, for example, "connect", it matches "connect" + :type event_pattern: str + :param category_pattern: Gets or sets the matching pattern for category + names. If not set, it matches any category. + There are 3 kind of patterns supported: + 1. "*", it to matches any category name + 2. Combine multiple categories with ",", for example + "connections,messages", it matches category "connections" and "messages" + 3. The single category name, for example, "connections", it matches the + category "connections" + :type category_pattern: str + :param url_template: Required. Gets or sets the Upstream URL template. You + can use 3 predefined parameters {hub}, {category} {event} inside the + template, the value of the Upstream URL is dynamically calculated when the + client request comes in. + For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, + with a client request from hub `chat` connects, it will first POST to this + URL: `http://example.com/chat/api/connect`. + :type url_template: str + """ + + _validation = { + 'url_template': {'required': True}, + } + + _attribute_map = { + 'hub_pattern': {'key': 'hubPattern', 'type': 'str'}, + 'event_pattern': {'key': 'eventPattern', 'type': 'str'}, + 'category_pattern': {'key': 'categoryPattern', 'type': 'str'}, + 'url_template': {'key': 'urlTemplate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(UpstreamTemplate, self).__init__(**kwargs) + self.hub_pattern = kwargs.get('hub_pattern', None) + self.event_pattern = kwargs.get('event_pattern', None) + self.category_pattern = kwargs.get('category_pattern', None) + self.url_template = kwargs.get('url_template', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py new file mode 100644 index 000000000000..765a2bf0d6e5 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py @@ -0,0 +1,1200 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Dimension(Model): + """Specifications of the Dimension of metrics. + + :param name: The public facing name of the dimension. + :type name: str + :param display_name: Localized friendly display name of the dimension. + :type display_name: str + :param internal_name: Name of the dimension as it appears in MDM. + :type internal_name: str + :param to_be_exported_for_shoebox: A Boolean flag indicating whether this + dimension should be included for the shoebox export scenario. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class ErrorResponse(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.signalr.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) + + +class ErrorResponseBody(Model): + """Describes a particular API error with an error code and a message. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. An error code that describes the error condition + more precisely than an HTTP status code. + Can be used to programmatically handle specific error cases. + :type code: str + :param message: Required. A message that describes the error in detail and + provides debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.signalr.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, code: str, message: str, target: str=None, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class LogSpecification(Model): + """Specifications of the Logs for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, **kwargs) -> None: + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + + +class MetricSpecification(Model): + """Specifications of the Metrics for Azure Monitoring. + + :param name: Name of the metric. + :type name: str + :param display_name: Localized friendly display name of the metric. + :type display_name: str + :param display_description: Localized friendly description of the metric. + :type display_description: str + :param unit: The unit that makes sense for the metric. + :type unit: str + :param aggregation_type: Only provide one value for this field. Valid + values: Average, Minimum, Maximum, Total, Count. + :type aggregation_type: str + :param fill_gap_with_zero: Optional. If set to true, then zero will be + returned for time duration where no metric is emitted/published. + Ex. a metric that returns the number of times a particular error code was + emitted. The error code may not appear + often, instead of the RP publishing 0, Shoebox can auto fill in 0s for + time periods where nothing was emitted. + :type fill_gap_with_zero: str + :param category: The name of the metric category that the metric belongs + to. A metric can only belong to a single category. + :type category: str + :param dimensions: The dimensions of the metrics. + :type dimensions: list[~azure.mgmt.signalr.models.Dimension] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, dimensions=None, **kwargs) -> None: + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.fill_gap_with_zero = fill_gap_with_zero + self.category = category + self.dimensions = dimensions + + +class NameAvailability(Model): + """Result of the request to check name availability. It contains a flag and + possible reason of failure. + + :param name_available: Indicates whether the name is available or not. + :type name_available: bool + :param reason: The reason of the availability. Required if name is not + available. + :type reason: str + :param message: The message of the operation. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: + super(NameAvailability, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class NameAvailabilityParameters(Model): + """Data POST-ed to the nameAvailability action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The resource type. Should be always + "Microsoft.SignalRService/SignalR". + :type type: str + :param name: Required. The SignalR service name to validate. + e.g."my-signalR-name-here" + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, type: str, name: str, **kwargs) -> None: + super(NameAvailabilityParameters, self).__init__(**kwargs) + self.type = type + self.name = name + + +class NetworkACL(Model): + """Network ACL. + + :param allow: Allowed request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type allow: list[str] + :param deny: Denied request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type deny: list[str] + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': '[str]'}, + 'deny': {'key': 'deny', 'type': '[str]'}, + } + + def __init__(self, *, allow=None, deny=None, **kwargs) -> None: + super(NetworkACL, self).__init__(**kwargs) + self.allow = allow + self.deny = deny + + +class Operation(Model): + """REST API operation supported by SignalR resource provider. + + :param name: Name of the operation with format: + {provider}/{resource}/{operation} + :type name: str + :param is_data_action: If the operation is a data action. (for data plane + rbac) + :type is_data_action: bool + :param display: The object that describes the operation. + :type display: ~azure.mgmt.signalr.models.OperationDisplay + :param origin: Optional. The intended executor of the operation; governs + the display of the operation in the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Extra properties for the operation. + :type properties: ~azure.mgmt.signalr.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, properties=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(Model): + """The object that describes a operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param operation: The localized friendly name for the operation. + :type operation: str + :param description: The localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationProperties(Model): + """Extra Operation properties. + + :param service_specification: The service specifications. + :type service_specification: + ~azure.mgmt.signalr.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, *, service_specification=None, **kwargs) -> None: + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class PrivateEndpoint(Model): + """Private endpoint. + + :param id: Full qualified Id of the private endpoint + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointACL(Model): + """ACL for a private endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the private endpoint connection + :type name: str + :param allow: Allowed request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type allow: list[str] + :param deny: Denied request types. The value can be: ClientConnection, + ServerConnection, RESTAPI. + :type deny: list[str] + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'allow': {'key': 'allow', 'type': '[str]'}, + 'deny': {'key': 'deny', 'type': '[str]'}, + } + + def __init__(self, *, name: str, allow=None, deny=None, **kwargs) -> None: + super(PrivateEndpointACL, self).__init__(**kwargs) + self.name = name + self.allow = allow + self.deny = deny + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class PrivateEndpointConnection(ProxyResource): + """A private endpoint connection to SignalR resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :ivar provisioning_state: Provisioning state of the private endpoint + connection. Possible values include: 'Unknown', 'Succeeded', 'Failed', + 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :param private_endpoint: Private endpoint associated with the private + endpoint connection + :type private_endpoint: ~azure.mgmt.signalr.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state + :type private_link_service_connection_state: + ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkResource(ProxyResource): + """Private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param group_id: Group Id of the private link resource + :type group_id: str + :param required_members: Required members of the private link resource + :type required_members: list[str] + :param required_zone_names: Required private DNS zone names + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, *, group_id: str=None, required_members=None, required_zone_names=None, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = group_id + self.required_members = required_members + self.required_zone_names = required_zone_names + + +class PrivateLinkServiceConnectionState(Model): + """Connection state of the private endpoint connection. + + :param status: Indicates whether the connection has been + Approved/Rejected/Removed by the owner of the service. Possible values + include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service + provider require any updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class RegenerateKeyParameters(Model): + """Parameters describes the request to regenerate access keys. + + :param key_type: The keyType to regenerate. Must be either 'primary' or + 'secondary'(case-insensitive). Possible values include: 'Primary', + 'Secondary' + :type key_type: str or ~azure.mgmt.signalr.models.KeyType + """ + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + } + + def __init__(self, *, key_type=None, **kwargs) -> None: + super(RegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + + +class ResourceSku(Model): + """The billing information of the SignalR resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Required. + Allowed values: Standard_S1, Free_F1 + :type name: str + :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. + `Basic` is deprecated, use `Standard` instead. Possible values include: + 'Free', 'Basic', 'Standard', 'Premium' + :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier + :param size: Optional string. For future use. + :type size: str + :param family: Optional string. For future use. + :type family: str + :param capacity: Optional, integer. The unit count of SignalR resource. 1 + by default. + If present, following values are allowed: + Free: 1 + Standard: 1,2,5,10,20,50,100 + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: + super(ResourceSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class ServerlessUpstreamSettings(Model): + """The settings for the Upstream when the Azure SignalR is in server-less + mode. + + :param templates: Gets or sets the list of Upstream URL templates. Order + matters, and the first matching template takes effects. + :type templates: list[~azure.mgmt.signalr.models.UpstreamTemplate] + """ + + _attribute_map = { + 'templates': {'key': 'templates', 'type': '[UpstreamTemplate]'}, + } + + def __init__(self, *, templates=None, **kwargs) -> None: + super(ServerlessUpstreamSettings, self).__init__(**kwargs) + self.templates = templates + + +class ServiceSpecification(Model): + """An object that describes a specification. + + :param metric_specifications: Specifications of the Metrics for Azure + Monitoring. + :type metric_specifications: + list[~azure.mgmt.signalr.models.MetricSpecification] + :param log_specifications: Specifications of the Logs for Azure + Monitoring. + :type log_specifications: + list[~azure.mgmt.signalr.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: + super(ServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class SignalRCorsSettings(Model): + """Cross-Origin Resource Sharing (CORS) settings. + + :param allowed_origins: Gets or sets the list of origins that should be + allowed to make cross-origin calls (for example: + http://example.com:12345). Use "*" to allow all. If omitted, allow all by + default. + :type allowed_origins: list[str] + """ + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + } + + def __init__(self, *, allowed_origins=None, **kwargs) -> None: + super(SignalRCorsSettings, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + + +class SignalRCreateOrUpdateProperties(Model): + """Settings used to provision or configure the resource. + + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :param upstream: Upstream settings when the Azure SignalR is in + server-less mode. + :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings + :param network_ac_ls: Network ACLs + :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + """ + + _attribute_map = { + 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, + 'upstream': {'key': 'upstream', 'type': 'ServerlessUpstreamSettings'}, + 'network_ac_ls': {'key': 'networkACLs', 'type': 'SignalRNetworkACLs'}, + } + + def __init__(self, *, host_name_prefix: str=None, features=None, cors=None, upstream=None, network_ac_ls=None, **kwargs) -> None: + super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) + self.host_name_prefix = host_name_prefix + self.features = features + self.cors = cors + self.upstream = upstream + self.network_ac_ls = network_ac_ls + + +class SignalRUpdateParameters(Model): + """Parameters for SignalR service update operation. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + } + + def __init__(self, *, tags=None, sku=None, properties=None, **kwargs) -> None: + super(SignalRUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.properties = properties + + +class SignalRCreateParameters(SignalRUpdateParameters): + """Parameters for SignalR service create/update operation. + Keep the same schema as AzSignalR.Models.SignalRResource. + + All required parameters must be populated in order to send to Azure. + + :param tags: A list of key value pairs that describe the resource. + :type tags: dict[str, str] + :param sku: The billing information of the resource.(e.g. basic vs. + standard) + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param properties: Settings used to provision or configure the resource + :type properties: + ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties + :param location: Required. Azure GEO region: e.g. West US | East US | + North Central US | South Central US | West Europe | North Europe | East + Asia | Southeast Asia | etc. + The geo region of a resource never changes after it is created. + :type location: str + :param kind: The kind of the service. (e.g. signalr vs. rawwebsockets). + Possible values include: 'SignalR', 'RawWebSockets' + :type kind: str or ~azure.mgmt.signalr.models.ServiceKind + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, + 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, sku=None, properties=None, kind=None, **kwargs) -> None: + super(SignalRCreateParameters, self).__init__(tags=tags, sku=sku, properties=properties, **kwargs) + self.location = location + self.kind = kind + + +class SignalRFeature(Model): + """Feature of a SignalR resource, which controls the SignalR runtime behavior. + + All required parameters must be populated in order to send to Azure. + + :param flag: Required. FeatureFlags is the supported features of Azure + SignalR service. + - ServiceMode: Flag for backend server for SignalR service. Values + allowed: "Default": have your own backend server; "Serverless": your + application doesn't have a backend server; "Classic": for backward + compatibility. Support both Default and Serverless mode but not + recommended; "PredefinedOnly": for future use. + - EnableConnectivityLogs: "true"/"false", to enable/disable the + connectivity log category respectively. Possible values include: + 'ServiceMode', 'EnableConnectivityLogs', 'EnableMessagingLogs' + :type flag: str or ~azure.mgmt.signalr.models.FeatureFlags + :param value: Required. Value of the feature flag. See Azure SignalR + service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for + allowed values. + :type value: str + :param properties: Optional properties related to this feature. + :type properties: dict[str, str] + """ + + _validation = { + 'flag': {'required': True}, + 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + } + + _attribute_map = { + 'flag': {'key': 'flag', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__(self, *, flag, value: str, properties=None, **kwargs) -> None: + super(SignalRFeature, self).__init__(**kwargs) + self.flag = flag + self.value = value + self.properties = properties + + +class SignalRKeys(Model): + """A class represents the access keys of SignalR service. + + :param primary_key: The primary access key. + :type primary_key: str + :param secondary_key: The secondary access key. + :type secondary_key: str + :param primary_connection_string: SignalR connection string constructed + via the primaryKey + :type primary_connection_string: str + :param secondary_connection_string: SignalR connection string constructed + via the secondaryKey + :type secondary_connection_string: str + """ + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + } + + def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_connection_string: str=None, secondary_connection_string: str=None, **kwargs) -> None: + super(SignalRKeys, self).__init__(**kwargs) + self.primary_key = primary_key + self.secondary_key = secondary_key + self.primary_connection_string = primary_connection_string + self.secondary_connection_string = secondary_connection_string + + +class SignalRNetworkACLs(Model): + """Network ACLs for SignalR. + + :param default_action: Default action when no other rule matches. Possible + values include: 'Allow', 'Deny' + :type default_action: str or ~azure.mgmt.signalr.models.ACLAction + :param public_network: ACL for requests from public network + :type public_network: ~azure.mgmt.signalr.models.NetworkACL + :param private_endpoints: ACLs for requests from private endpoints + :type private_endpoints: + list[~azure.mgmt.signalr.models.PrivateEndpointACL] + """ + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'public_network': {'key': 'publicNetwork', 'type': 'NetworkACL'}, + 'private_endpoints': {'key': 'privateEndpoints', 'type': '[PrivateEndpointACL]'}, + } + + def __init__(self, *, default_action=None, public_network=None, private_endpoints=None, **kwargs) -> None: + super(SignalRNetworkACLs, self).__init__(**kwargs) + self.default_action = default_action + self.public_network = public_network + self.private_endpoints = private_endpoints + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class SignalRResource(TrackedResource): + """A class represent a SignalR service resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. + "Microsoft.SignalRService/SignalR", + "Microsoft.SignalRService/SignalR/PrivateEndpointConnections" + :vartype type: str + :param location: The GEO location of the SignalR service. e.g. West US | + East US | North Central US | South Central US. + :type location: str + :param tags: Tags of the service which is a list of key value pairs that + describe the resource. + :type tags: dict[str, str] + :param sku: SKU of the service. + :type sku: ~azure.mgmt.signalr.models.ResourceSku + :param host_name_prefix: Prefix for the hostName of the SignalR service. + Retained for future use. + The hostname will be of format: + <hostNamePrefix>.service.signalr.net. + :type host_name_prefix: str + :param features: List of SignalR featureFlags. e.g. ServiceMode. + FeatureFlags that are not included in the parameters for the update + operation will not be modified. + And the response will only include featureFlags that are explicitly set. + When a featureFlag is not explicitly set, SignalR service will use its + globally default value. + But keep in mind, the default value doesn't mean "false". It varies in + terms of different FeatureFlags. + :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param cors: Cross-Origin Resource Sharing (CORS) settings. + :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings + :param upstream: Upstream settings when the Azure SignalR is in + server-less mode. + :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings + :param network_ac_ls: Network ACLs + :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + :ivar provisioning_state: Provisioning state of the resource. Possible + values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', + 'Creating', 'Updating', 'Deleting', 'Moving' + :vartype provisioning_state: str or + ~azure.mgmt.signalr.models.ProvisioningState + :ivar external_ip: The publicly accessible IP of the SignalR service. + :vartype external_ip: str + :ivar host_name: FQDN of the SignalR service instance. Format: + xxx.service.signalr.net + :vartype host_name: str + :ivar public_port: The publicly accessible port of the SignalR service + which is designed for browser/client side usage. + :vartype public_port: int + :ivar server_port: The publicly accessible port of the SignalR service + which is designed for customer server side usage. + :vartype server_port: int + :param version: Version of the SignalR resource. Probably you need the + same or higher version of client SDKs. + :type version: str + :param private_endpoint_connections: Private endpoint connections to the + SignalR resource. + :type private_endpoint_connections: + list[~azure.mgmt.signalr.models.PrivateEndpointConnection] + :ivar kind: The kind of the service - e.g. "SignalR", or "RawWebSockets" + for "Microsoft.SignalRService/SignalR". Possible values include: + 'SignalR', 'RawWebSockets' + :vartype kind: str or ~azure.mgmt.signalr.models.ServiceKind + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'external_ip': {'readonly': True}, + 'host_name': {'readonly': True}, + 'public_port': {'readonly': True}, + 'server_port': {'readonly': True}, + 'kind': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, + 'upstream': {'key': 'properties.upstream', 'type': 'ServerlessUpstreamSettings'}, + 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'SignalRNetworkACLs'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, + 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, features=None, cors=None, upstream=None, network_ac_ls=None, version: str=None, private_endpoint_connections=None, **kwargs) -> None: + super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.host_name_prefix = host_name_prefix + self.features = features + self.cors = cors + self.upstream = upstream + self.network_ac_ls = network_ac_ls + self.provisioning_state = None + self.external_ip = None + self.host_name = None + self.public_port = None + self.server_port = None + self.version = version + self.private_endpoint_connections = private_endpoint_connections + self.kind = None + + +class SignalRUsage(Model): + """Object that describes a specific usage of SignalR resources. + + :param id: Fully qualified ARM resource id + :type id: str + :param current_value: Current value for the usage quota. + :type current_value: long + :param limit: The maximum permitted value for the usage quota. If there is + no limit, this value will be -1. + :type limit: long + :param name: Localizable String object containing the name and a localized + value. + :type name: ~azure.mgmt.signalr.models.SignalRUsageName + :param unit: Representing the units of the usage quota. Possible values + are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. + :type unit: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'SignalRUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, current_value: int=None, limit: int=None, name=None, unit: str=None, **kwargs) -> None: + super(SignalRUsage, self).__init__(**kwargs) + self.id = id + self.current_value = current_value + self.limit = limit + self.name = name + self.unit = unit + + +class SignalRUsageName(Model): + """Localizable String object containing the name and a localized value. + + :param value: The identifier of the usage. + :type value: str + :param localized_value: Localized name of the usage. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(SignalRUsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class UpstreamTemplate(Model): + """Upstream template item settings. It defines the Upstream URL of the + incoming requests. + The template defines the pattern of the event, the hub or the category of + the incoming request that matches current URL template. + + All required parameters must be populated in order to send to Azure. + + :param hub_pattern: Gets or sets the matching pattern for hub names. If + not set, it matches any hub. + There are 3 kind of patterns supported: + 1. "*", it to matches any hub name + 2. Combine multiple hubs with ",", for example "hub1,hub2", it matches + "hub1" and "hub2" + 3. The single hub name, for example, "hub1", it matches "hub1" + :type hub_pattern: str + :param event_pattern: Gets or sets the matching pattern for event names. + If not set, it matches any event. + There are 3 kind of patterns supported: + 1. "*", it to matches any event name + 2. Combine multiple events with ",", for example "connect,disconnect", it + matches event "connect" and "disconnect" + 3. The single event name, for example, "connect", it matches "connect" + :type event_pattern: str + :param category_pattern: Gets or sets the matching pattern for category + names. If not set, it matches any category. + There are 3 kind of patterns supported: + 1. "*", it to matches any category name + 2. Combine multiple categories with ",", for example + "connections,messages", it matches category "connections" and "messages" + 3. The single category name, for example, "connections", it matches the + category "connections" + :type category_pattern: str + :param url_template: Required. Gets or sets the Upstream URL template. You + can use 3 predefined parameters {hub}, {category} {event} inside the + template, the value of the Upstream URL is dynamically calculated when the + client request comes in. + For example, if the urlTemplate is `http://example.com/{hub}/api/{event}`, + with a client request from hub `chat` connects, it will first POST to this + URL: `http://example.com/chat/api/connect`. + :type url_template: str + """ + + _validation = { + 'url_template': {'required': True}, + } + + _attribute_map = { + 'hub_pattern': {'key': 'hubPattern', 'type': 'str'}, + 'event_pattern': {'key': 'eventPattern', 'type': 'str'}, + 'category_pattern': {'key': 'categoryPattern', 'type': 'str'}, + 'url_template': {'key': 'urlTemplate', 'type': 'str'}, + } + + def __init__(self, *, url_template: str, hub_pattern: str=None, event_pattern: str=None, category_pattern: str=None, **kwargs) -> None: + super(UpstreamTemplate, self).__init__(**kwargs) + self.hub_pattern = hub_pattern + self.event_pattern = event_pattern + self.category_pattern = category_pattern + self.url_template = url_template diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py new file mode 100644 index 000000000000..dfd570281168 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class SignalRResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SignalRResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SignalRResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SignalRResourcePaged, self).__init__(*args, **kwargs) +class PrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) +class SignalRUsagePaged(Paged): + """ + A paging container for iterating over a list of :class:`SignalRUsage ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SignalRUsage]'} + } + + def __init__(self, *args, **kwargs): + + super(SignalRUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py similarity index 65% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py index c4c1cddbb84f..a25e99c1853f 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rmanagement_client_enums.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py @@ -33,6 +33,33 @@ class ProvisioningState(str, Enum): moving = "Moving" +class PrivateLinkServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class ServiceKind(str, Enum): + + signal_r = "SignalR" + raw_web_sockets = "RawWebSockets" + + +class FeatureFlags(str, Enum): + + service_mode = "ServiceMode" + enable_connectivity_logs = "EnableConnectivityLogs" + enable_messaging_logs = "EnableMessagingLogs" + + +class ACLAction(str, Enum): + + allow = "Allow" + deny = "Deny" + + class KeyType(str, Enum): primary = "Primary" diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py deleted file mode 100644 index b85f606bcf94..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class Dimension(Model): - """Specifications of the Dimension of metrics. - - :param name: The public facing name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A Boolean flag indicating whether this - dimension should be included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(Dimension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.internal_name = kwargs.get('internal_name', None) - self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py deleted file mode 100644 index 52390cd419c7..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/dimension_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class Dimension(Model): - """Specifications of the Dimension of metrics. - - :param name: The public facing name of the dimension. - :type name: str - :param display_name: Localized friendly display name of the dimension. - :type display_name: str - :param internal_name: Name of the dimension as it appears in MDM. - :type internal_name: str - :param to_be_exported_for_shoebox: A Boolean flag indicating whether this - dimension should be included for the shoebox export scenario. - :type to_be_exported_for_shoebox: bool - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, internal_name: str=None, to_be_exported_for_shoebox: bool=None, **kwargs) -> None: - super(Dimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - self.to_be_exported_for_shoebox = to_be_exported_for_shoebox diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py deleted file mode 100644 index 1e36394f1aef..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 - - -class MetricSpecification(Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: The unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid - values: Average, Minimum, Maximum, Total, Count. - :type aggregation_type: str - :param fill_gap_with_zero: Optional. If set to true, then zero will be - returned for time duration where no metric is emitted/published. - Ex. a metric that returns the number of times a particular error code was - emitted. The error code may not appear - often, instead of the RP publishing 0, Shoebox can auto fill in 0s for - time periods where nothing was emitted. - :type fill_gap_with_zero: str - :param category: The name of the metric category that the metric belongs - to. A metric can only belong to a single category. - :type category: str - :param dimensions: The dimensions of the metrics. - :type dimensions: list[~azure.mgmt.signalr.models.Dimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - } - - def __init__(self, **kwargs): - super(MetricSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.display_description = kwargs.get('display_description', None) - self.unit = kwargs.get('unit', None) - self.aggregation_type = kwargs.get('aggregation_type', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.category = kwargs.get('category', None) - self.dimensions = kwargs.get('dimensions', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py deleted file mode 100644 index 7ac715b718ca..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/metric_specification_py3.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 - - -class MetricSpecification(Model): - """Specifications of the Metrics for Azure Monitoring. - - :param name: Name of the metric. - :type name: str - :param display_name: Localized friendly display name of the metric. - :type display_name: str - :param display_description: Localized friendly description of the metric. - :type display_description: str - :param unit: The unit that makes sense for the metric. - :type unit: str - :param aggregation_type: Only provide one value for this field. Valid - values: Average, Minimum, Maximum, Total, Count. - :type aggregation_type: str - :param fill_gap_with_zero: Optional. If set to true, then zero will be - returned for time duration where no metric is emitted/published. - Ex. a metric that returns the number of times a particular error code was - emitted. The error code may not appear - often, instead of the RP publishing 0, Shoebox can auto fill in 0s for - time periods where nothing was emitted. - :type fill_gap_with_zero: str - :param category: The name of the metric category that the metric belongs - to. A metric can only belong to a single category. - :type category: str - :param dimensions: The dimensions of the metrics. - :type dimensions: list[~azure.mgmt.signalr.models.Dimension] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'display_description': {'key': 'displayDescription', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - } - - def __init__(self, *, name: str=None, display_name: str=None, display_description: str=None, unit: str=None, aggregation_type: str=None, fill_gap_with_zero: str=None, category: str=None, dimensions=None, **kwargs) -> None: - super(MetricSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.display_description = display_description - self.unit = unit - self.aggregation_type = aggregation_type - self.fill_gap_with_zero = fill_gap_with_zero - self.category = category - self.dimensions = dimensions diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py deleted file mode 100644 index 7b56e67c6704..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 - - -class NameAvailability(Model): - """Result of the request to check name availability. It contains a flag and - possible reason of failure. - - :param name_available: Indicates whether the name is available or not. - :type name_available: bool - :param reason: The reason of the availability. Required if name is not - available. - :type reason: str - :param message: The message of the operation. - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailability, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py deleted file mode 100644 index 69d961776458..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class NameAvailabilityParameters(Model): - """Data POST-ed to the nameAvailability action. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. The resource type. Should be always - "Microsoft.SignalRService/SignalR". - :type type: str - :param name: Required. The SignalR service name to validate. - e.g."my-signalR-name-here" - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityParameters, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.name = kwargs.get('name', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py deleted file mode 100644 index caefb77011fd..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_parameters_py3.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - - -class NameAvailabilityParameters(Model): - """Data POST-ed to the nameAvailability action. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. The resource type. Should be always - "Microsoft.SignalRService/SignalR". - :type type: str - :param name: Required. The SignalR service name to validate. - e.g."my-signalR-name-here" - :type name: str - """ - - _validation = { - 'type': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, type: str, name: str, **kwargs) -> None: - super(NameAvailabilityParameters, self).__init__(**kwargs) - self.type = type - self.name = name diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py deleted file mode 100644 index 9792b3765937..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/name_availability_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 - - -class NameAvailability(Model): - """Result of the request to check name availability. It contains a flag and - possible reason of failure. - - :param name_available: Indicates whether the name is available or not. - :type name_available: bool - :param reason: The reason of the availability. Required if name is not - available. - :type reason: str - :param message: The message of the operation. - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, name_available: bool=None, reason: str=None, message: str=None, **kwargs) -> None: - super(NameAvailability, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py deleted file mode 100644 index 77f115a4d2fc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 - - -class Operation(Model): - """REST API operation supported by SignalR resource provider. - - :param name: Name of the operation with format: - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.signalr.models.OperationDisplay - :param origin: Optional. The intended executor of the operation; governs - the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: Extra properties for the operation. - :type properties: ~azure.mgmt.signalr.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py deleted file mode 100644 index d368ed731f5b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 - - -class OperationDisplay(Model): - """The object that describes a operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: The localized friendly name for the operation. - :type operation: str - :param description: The localized friendly description for the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py deleted file mode 100644 index 6e8283000f0a..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_display_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 - - -class OperationDisplay(Model): - """The object that describes a operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param operation: The localized friendly name for the operation. - :type operation: str - :param description: The localized friendly description for the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py deleted file mode 100644 index 60109137961f..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py deleted file mode 100644 index 5884decce60a..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 - - -class OperationProperties(Model): - """Extra Operation properties. - - :param service_specification: The service specifications. - :type service_specification: - ~azure.mgmt.signalr.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, **kwargs): - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = kwargs.get('service_specification', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py deleted file mode 100644 index c78e2043ebff..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_properties_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 - - -class OperationProperties(Model): - """Extra Operation properties. - - :param service_specification: The service specifications. - :type service_specification: - ~azure.mgmt.signalr.models.ServiceSpecification - """ - - _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, - } - - def __init__(self, *, service_specification=None, **kwargs) -> None: - super(OperationProperties, self).__init__(**kwargs) - self.service_specification = service_specification diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py deleted file mode 100644 index 47e90891f0cd..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/operation_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 - - -class Operation(Model): - """REST API operation supported by SignalR resource provider. - - :param name: Name of the operation with format: - {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.signalr.models.OperationDisplay - :param origin: Optional. The intended executor of the operation; governs - the display of the operation in the RBAC UX and the audit logs UX. - :type origin: str - :param properties: Extra properties for the operation. - :type properties: ~azure.mgmt.signalr.models.OperationProperties - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'OperationProperties'}, - } - - def __init__(self, *, name: str=None, display=None, origin: str=None, properties=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py deleted file mode 100644 index 5e313a7a9fce..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class RegenerateKeyParameters(Model): - """Parameters describes the request to regenerate access keys. - - :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: 'Primary', - 'Secondary' - :type key_type: str or ~azure.mgmt.signalr.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py deleted file mode 100644 index 84996057d07f..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/regenerate_key_parameters_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class RegenerateKeyParameters(Model): - """Parameters describes the request to regenerate access keys. - - :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: 'Primary', - 'Secondary' - :type key_type: str or ~azure.mgmt.signalr.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__(self, *, key_type=None, **kwargs) -> None: - super(RegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = key_type diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py deleted file mode 100644 index 68f3fe6e233c..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py deleted file mode 100644 index 132b0a6a2a88..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 - - -class Resource(Model): - """The core properties of ARM resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py deleted file mode 100644 index 68a842d44372..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 - - -class ResourceSku(Model): - """The billing information of the SignalR resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Required. - Allowed values: Standard_S1, Free_F1 - :type name: str - :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. - `Basic` is deprecated, use `Standard` instead. Possible values include: - 'Free', 'Basic', 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier - :param size: Optional string. For future use. - :type size: str - :param family: Optional string. For future use. - :type family: str - :param capacity: Optional, integer. The unit count of SignalR resource. 1 - by default. - If present, following values are allowed: - Free: 1 - Standard: 1,2,5,10,20,50,100 - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(ResourceSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.size = kwargs.get('size', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py deleted file mode 100644 index 0c26509b2ed7..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/resource_sku_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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 - - -class ResourceSku(Model): - """The billing information of the SignalR resource. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the SKU. Required. - Allowed values: Standard_S1, Free_F1 - :type name: str - :param tier: Optional tier of this particular SKU. 'Standard' or 'Free'. - `Basic` is deprecated, use `Standard` instead. Possible values include: - 'Free', 'Basic', 'Standard', 'Premium' - :type tier: str or ~azure.mgmt.signalr.models.SignalRSkuTier - :param size: Optional string. For future use. - :type size: str - :param family: Optional string. For future use. - :type family: str - :param capacity: Optional, integer. The unit count of SignalR resource. 1 - by default. - If present, following values are allowed: - Free: 1 - Standard: 1,2,5,10,20,50,100 - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name: str, tier=None, size: str=None, family: str=None, capacity: int=None, **kwargs) -> None: - super(ResourceSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.size = size - self.family = family - self.capacity = capacity diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py deleted file mode 100644 index 3c1c6a87bcea..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class ServiceSpecification(Model): - """An object that describes a specification. - - :param metric_specifications: Specifications of the Metrics for Azure - Monitoring. - :type metric_specifications: - list[~azure.mgmt.signalr.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, **kwargs): - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py deleted file mode 100644 index 16125e83ba09..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/service_specification_py3.py +++ /dev/null @@ -1,30 +0,0 @@ -# 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 - - -class ServiceSpecification(Model): - """An object that describes a specification. - - :param metric_specifications: Specifications of the Metrics for Azure - Monitoring. - :type metric_specifications: - list[~azure.mgmt.signalr.models.MetricSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - } - - def __init__(self, *, metric_specifications=None, **kwargs) -> None: - super(ServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_specifications diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings.py deleted file mode 100644 index d1d3a29e3893..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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 - - -class SignalRCorsSettings(Model): - """Cross-Origin Resource Sharing (CORS) settings. - - :param allowed_origins: Gets or sets the list of origins that should be - allowed to make cross-origin calls (for example: - http://example.com:12345). Use "*" to allow all. If omitted, allow all by - default. - :type allowed_origins: list[str] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(SignalRCorsSettings, self).__init__(**kwargs) - self.allowed_origins = kwargs.get('allowed_origins', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings_py3.py deleted file mode 100644 index 10974f51c18f..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcors_settings_py3.py +++ /dev/null @@ -1,31 +0,0 @@ -# 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 - - -class SignalRCorsSettings(Model): - """Cross-Origin Resource Sharing (CORS) settings. - - :param allowed_origins: Gets or sets the list of origins that should be - allowed to make cross-origin calls (for example: - http://example.com:12345). Use "*" to allow all. If omitted, allow all by - default. - :type allowed_origins: list[str] - """ - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, - } - - def __init__(self, *, allowed_origins=None, **kwargs) -> None: - super(SignalRCorsSettings, self).__init__(**kwargs) - self.allowed_origins = allowed_origins diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py deleted file mode 100644 index b4a4557546ab..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 - - -class SignalRCreateOrUpdateProperties(Model): - """Settings used to provision or configure the resource. - - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :param features: List of SignalR featureFlags. e.g. ServiceMode. - FeatureFlags that are not included in the parameters for the update - operation will not be modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, SignalR service will use its - globally default value. - But keep in mind, the default value doesn't mean "false". It varies in - terms of different FeatureFlags. - :type features: list[~azure.mgmt.signalr.models.SignalRFeature] - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings - """ - - _attribute_map = { - 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, - 'features': {'key': 'features', 'type': '[SignalRFeature]'}, - 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, - } - - def __init__(self, **kwargs): - super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) - self.host_name_prefix = kwargs.get('host_name_prefix', None) - self.features = kwargs.get('features', None) - self.cors = kwargs.get('cors', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py deleted file mode 100644 index 4b9e55fbe4d1..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_or_update_properties_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# 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 - - -class SignalRCreateOrUpdateProperties(Model): - """Settings used to provision or configure the resource. - - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :param features: List of SignalR featureFlags. e.g. ServiceMode. - FeatureFlags that are not included in the parameters for the update - operation will not be modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, SignalR service will use its - globally default value. - But keep in mind, the default value doesn't mean "false". It varies in - terms of different FeatureFlags. - :type features: list[~azure.mgmt.signalr.models.SignalRFeature] - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings - """ - - _attribute_map = { - 'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'}, - 'features': {'key': 'features', 'type': '[SignalRFeature]'}, - 'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'}, - } - - def __init__(self, *, host_name_prefix: str=None, features=None, cors=None, **kwargs) -> None: - super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs) - self.host_name_prefix = host_name_prefix - self.features = features - self.cors = cors diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py deleted file mode 100644 index 69ee100c20c8..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .signal_rupdate_parameters import SignalRUpdateParameters - - -class SignalRCreateParameters(SignalRUpdateParameters): - """Parameters for SignalR service create/update operation. - Keep the same schema as AzSignalR.Models.SignalRResource. - - All required parameters must be populated in order to send to Azure. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - :param location: Required. Azure GEO region: e.g. West US | East US | - North Central US | South Central US | West Europe | North Europe | East - Asia | Southeast Asia | etc. - The geo region of a resource never changes after it is created. - :type location: str - """ - - _validation = { - 'location': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRCreateParameters, self).__init__(**kwargs) - self.location = kwargs.get('location', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py deleted file mode 100644 index 23a3a44488cc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rcreate_parameters_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 .signal_rupdate_parameters_py3 import SignalRUpdateParameters - - -class SignalRCreateParameters(SignalRUpdateParameters): - """Parameters for SignalR service create/update operation. - Keep the same schema as AzSignalR.Models.SignalRResource. - - All required parameters must be populated in order to send to Azure. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - :param location: Required. Azure GEO region: e.g. West US | East US | - North Central US | South Central US | West Europe | North Europe | East - Asia | Southeast Asia | etc. - The geo region of a resource never changes after it is created. - :type location: str - """ - - _validation = { - 'location': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, sku=None, properties=None, **kwargs) -> None: - super(SignalRCreateParameters, self).__init__(tags=tags, sku=sku, properties=properties, **kwargs) - self.location = location diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature.py deleted file mode 100644 index da7d329e8f8e..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 - - -class SignalRFeature(Model): - """Feature of a SignalR resource, which controls the SignalR runtime behavior. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar flag: Required. Kind of feature. Required. Default value: - "ServiceMode" . - :vartype flag: str - :param value: Required. Value of the feature flag. See Azure SignalR - service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for - allowed values. - :type value: str - :param properties: Optional properties related to this feature. - :type properties: dict[str, str] - """ - - _validation = { - 'flag': {'required': True, 'constant': True}, - 'value': {'required': True, 'max_length': 128, 'min_length': 1}, - } - - _attribute_map = { - 'flag': {'key': 'flag', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - } - - flag = "ServiceMode" - - def __init__(self, **kwargs): - super(SignalRFeature, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature_py3.py deleted file mode 100644 index 52e1864e7c69..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rfeature_py3.py +++ /dev/null @@ -1,50 +0,0 @@ -# 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 - - -class SignalRFeature(Model): - """Feature of a SignalR resource, which controls the SignalR runtime behavior. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar flag: Required. Kind of feature. Required. Default value: - "ServiceMode" . - :vartype flag: str - :param value: Required. Value of the feature flag. See Azure SignalR - service document https://docs.microsoft.com/en-us/azure/azure-signalr/ for - allowed values. - :type value: str - :param properties: Optional properties related to this feature. - :type properties: dict[str, str] - """ - - _validation = { - 'flag': {'required': True, 'constant': True}, - 'value': {'required': True, 'max_length': 128, 'min_length': 1}, - } - - _attribute_map = { - 'flag': {'key': 'flag', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, - } - - flag = "ServiceMode" - - def __init__(self, *, value: str, properties=None, **kwargs) -> None: - super(SignalRFeature, self).__init__(**kwargs) - self.value = value - self.properties = properties diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py deleted file mode 100644 index ff01c2aa4aeb..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 - - -class SignalRKeys(Model): - """A class represents the access keys of SignalR service. - - :param primary_key: The primary access key. - :type primary_key: str - :param secondary_key: The secondary access key. - :type secondary_key: str - :param primary_connection_string: SignalR connection string constructed - via the primaryKey - :type primary_connection_string: str - :param secondary_connection_string: SignalR connection string constructed - via the secondaryKey - :type secondary_connection_string: str - """ - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRKeys, self).__init__(**kwargs) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.primary_connection_string = kwargs.get('primary_connection_string', None) - self.secondary_connection_string = kwargs.get('secondary_connection_string', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py deleted file mode 100644 index 77c5768eff41..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rkeys_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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 - - -class SignalRKeys(Model): - """A class represents the access keys of SignalR service. - - :param primary_key: The primary access key. - :type primary_key: str - :param secondary_key: The secondary access key. - :type secondary_key: str - :param primary_connection_string: SignalR connection string constructed - via the primaryKey - :type primary_connection_string: str - :param secondary_connection_string: SignalR connection string constructed - via the secondaryKey - :type secondary_connection_string: str - """ - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, - 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, - } - - def __init__(self, *, primary_key: str=None, secondary_key: str=None, primary_connection_string: str=None, secondary_connection_string: str=None, **kwargs) -> None: - super(SignalRKeys, self).__init__(**kwargs) - self.primary_key = primary_key - self.secondary_key = secondary_key - self.primary_connection_string = primary_connection_string - self.secondary_connection_string = secondary_connection_string diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py deleted file mode 100644 index bc4d094b09d0..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 .tracked_resource import TrackedResource - - -class SignalRResource(TrackedResource): - """A class represent a SignalR service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - :param sku: SKU of the service. - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :param features: List of SignalR featureFlags. e.g. ServiceMode. - FeatureFlags that are not included in the parameters for the update - operation will not be modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, SignalR service will use its - globally default value. - But keep in mind, the default value doesn't mean "false". It varies in - terms of different FeatureFlags. - :type features: list[~azure.mgmt.signalr.models.SignalRFeature] - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', - 'Creating', 'Updating', 'Deleting', 'Moving' - :vartype provisioning_state: str or - ~azure.mgmt.signalr.models.ProvisioningState - :ivar external_ip: The publicly accessible IP of the SignalR service. - :vartype external_ip: str - :ivar host_name: FQDN of the SignalR service instance. Format: - xxx.service.signalr.net - :vartype host_name: str - :ivar public_port: The publicly accessible port of the SignalR service - which is designed for browser/client side usage. - :vartype public_port: int - :ivar server_port: The publicly accessible port of the SignalR service - which is designed for customer server side usage. - :vartype server_port: int - :param version: Version of the SignalR resource. Probably you need the - same or higher version of client SDKs. - :type version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'external_ip': {'readonly': True}, - 'host_name': {'readonly': True}, - 'public_port': {'readonly': True}, - 'server_port': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, - 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, - 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, - 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRResource, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.host_name_prefix = kwargs.get('host_name_prefix', None) - self.features = kwargs.get('features', None) - self.cors = kwargs.get('cors', None) - self.provisioning_state = None - self.external_ip = None - self.host_name = None - self.public_port = None - self.server_port = None - self.version = kwargs.get('version', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py deleted file mode 100644 index 98b0225b9fa0..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class SignalRResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`SignalRResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SignalRResource]'} - } - - def __init__(self, *args, **kwargs): - - super(SignalRResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py deleted file mode 100644 index 5d3180ab2a9e..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_py3.py +++ /dev/null @@ -1,113 +0,0 @@ -# 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 .tracked_resource_py3 import TrackedResource - - -class SignalRResource(TrackedResource): - """A class represent a SignalR service resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - :param sku: SKU of the service. - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param host_name_prefix: Prefix for the hostName of the SignalR service. - Retained for future use. - The hostname will be of format: - <hostNamePrefix>.service.signalr.net. - :type host_name_prefix: str - :param features: List of SignalR featureFlags. e.g. ServiceMode. - FeatureFlags that are not included in the parameters for the update - operation will not be modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, SignalR service will use its - globally default value. - But keep in mind, the default value doesn't mean "false". It varies in - terms of different FeatureFlags. - :type features: list[~azure.mgmt.signalr.models.SignalRFeature] - :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings - :ivar provisioning_state: Provisioning state of the resource. Possible - values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', - 'Creating', 'Updating', 'Deleting', 'Moving' - :vartype provisioning_state: str or - ~azure.mgmt.signalr.models.ProvisioningState - :ivar external_ip: The publicly accessible IP of the SignalR service. - :vartype external_ip: str - :ivar host_name: FQDN of the SignalR service instance. Format: - xxx.service.signalr.net - :vartype host_name: str - :ivar public_port: The publicly accessible port of the SignalR service - which is designed for browser/client side usage. - :vartype public_port: int - :ivar server_port: The publicly accessible port of the SignalR service - which is designed for customer server side usage. - :vartype server_port: int - :param version: Version of the SignalR resource. Probably you need the - same or higher version of client SDKs. - :type version: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'external_ip': {'readonly': True}, - 'host_name': {'readonly': True}, - 'public_port': {'readonly': True}, - 'server_port': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, - 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, - 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'external_ip': {'key': 'properties.externalIP', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'public_port': {'key': 'properties.publicPort', 'type': 'int'}, - 'server_port': {'key': 'properties.serverPort', 'type': 'int'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - } - - def __init__(self, *, location: str=None, tags=None, sku=None, host_name_prefix: str=None, features=None, cors=None, version: str=None, **kwargs) -> None: - super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) - self.sku = sku - self.host_name_prefix = host_name_prefix - self.features = features - self.cors = cors - self.provisioning_state = None - self.external_ip = None - self.host_name = None - self.public_port = None - self.server_port = None - self.version = version diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py deleted file mode 100644 index 2f177255176b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 - - -class SignalRUpdateParameters(Model): - """Parameters for SignalR service update operation. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - } - - def __init__(self, **kwargs): - super(SignalRUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.sku = kwargs.get('sku', None) - self.properties = kwargs.get('properties', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py deleted file mode 100644 index da20f519dd5d..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rupdate_parameters_py3.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 - - -class SignalRUpdateParameters(Model): - """Parameters for SignalR service update operation. - - :param tags: A list of key value pairs that describe the resource. - :type tags: dict[str, str] - :param sku: The billing information of the resource.(e.g. basic vs. - standard) - :type sku: ~azure.mgmt.signalr.models.ResourceSku - :param properties: Settings used to provision or configure the resource - :type properties: - ~azure.mgmt.signalr.models.SignalRCreateOrUpdateProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'properties': {'key': 'properties', 'type': 'SignalRCreateOrUpdateProperties'}, - } - - def __init__(self, *, tags=None, sku=None, properties=None, **kwargs) -> None: - super(SignalRUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.sku = sku - self.properties = properties diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py deleted file mode 100644 index c745ce0603eb..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 - - -class SignalRUsage(Model): - """Object that describes a specific usage of SignalR resources. - - :param id: Fully qualified ARM resource id - :type id: str - :param current_value: Current value for the usage quota. - :type current_value: long - :param limit: The maximum permitted value for the usage quota. If there is - no limit, this value will be -1. - :type limit: long - :param name: Localizable String object containing the name and a localized - value. - :type name: ~azure.mgmt.signalr.models.SignalRUsageName - :param unit: Representing the units of the usage quota. Possible values - are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. - :type unit: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'SignalRUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRUsage, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.current_value = kwargs.get('current_value', None) - self.limit = kwargs.get('limit', None) - self.name = kwargs.get('name', None) - self.unit = kwargs.get('unit', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py deleted file mode 100644 index d750ca741cbc..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 - - -class SignalRUsageName(Model): - """Localizable String object containing the name and a localized value. - - :param value: The identifier of the usage. - :type value: str - :param localized_value: Localized name of the usage. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SignalRUsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py deleted file mode 100644 index 0ab09ab51882..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 - - -class SignalRUsageName(Model): - """Localizable String object containing the name and a localized value. - - :param value: The identifier of the usage. - :type value: str - :param localized_value: Localized name of the usage. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: - super(SignalRUsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py deleted file mode 100644 index 08faca32802b..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_paged.py +++ /dev/null @@ -1,27 +0,0 @@ -# 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.paging import Paged - - -class SignalRUsagePaged(Paged): - """ - A paging container for iterating over a list of :class:`SignalRUsage ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SignalRUsage]'} - } - - def __init__(self, *args, **kwargs): - - super(SignalRUsagePaged, self).__init__(*args, **kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py deleted file mode 100644 index 2c46b4a391de..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 - - -class SignalRUsage(Model): - """Object that describes a specific usage of SignalR resources. - - :param id: Fully qualified ARM resource id - :type id: str - :param current_value: Current value for the usage quota. - :type current_value: long - :param limit: The maximum permitted value for the usage quota. If there is - no limit, this value will be -1. - :type limit: long - :param name: Localizable String object containing the name and a localized - value. - :type name: ~azure.mgmt.signalr.models.SignalRUsageName - :param unit: Representing the units of the usage quota. Possible values - are: Count, Bytes, Seconds, Percent, CountPerSecond, BytesPerSecond. - :type unit: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'SignalRUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, current_value: int=None, limit: int=None, name=None, unit: str=None, **kwargs) -> None: - super(SignalRUsage, self).__init__(**kwargs) - self.id = id - self.current_value = current_value - self.limit = limit - self.name = name - self.unit = unit diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py deleted file mode 100644 index da0c0fee8e9d..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .resource import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py deleted file mode 100644 index 3cad20d9175e..000000000000 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/tracked_resource_py3.py +++ /dev/null @@ -1,53 +0,0 @@ -# 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 .resource_py3 import Resource - - -class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Fully qualified resource Id for the resource. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the service - e.g. - "Microsoft.SignalRService/SignalR" - :vartype type: str - :param location: The GEO location of the SignalR service. e.g. West US | - East US | North Central US | South Central US. - :type location: str - :param tags: Tags of the service which is a list of key value pairs that - describe the resource. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.location = location - self.tags = tags diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py index 31c21decde4f..7c73aef2e2c1 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py @@ -9,12 +9,16 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .signal_roperations import SignalROperations -from .usages_operations import UsagesOperations +from ._operations import Operations +from ._signal_roperations import SignalROperations +from ._signal_rprivate_endpoint_connections_operations import SignalRPrivateEndpointConnectionsOperations +from ._signal_rprivate_link_resources_operations import SignalRPrivateLinkResourcesOperations +from ._usages_operations import UsagesOperations __all__ = [ 'Operations', 'SignalROperations', + 'SignalRPrivateEndpointConnectionsOperations', + 'SignalRPrivateLinkResourcesOperations', 'UsagesOperations', ] diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py similarity index 85% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py index a942e212ecff..f871f8cdff1a 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -19,6 +18,8 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,10 +51,10 @@ def list( :return: An iterator like instance of Operation :rtype: ~azure.mgmt.signalr.models.OperationPaged[~azure.mgmt.signalr.models.Operation] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,22 +79,23 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.SignalRService/operations'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py similarity index 93% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py index ebed77772a4b..8745912b3e18 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/signal_roperations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_roperations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling @@ -21,6 +20,8 @@ class SignalROperations(object): """SignalROperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +60,8 @@ def check_name_availability( :return: NameAvailability or ClientRawResponse if raw=true :rtype: ~azure.mgmt.signalr.models.NameAvailability or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ parameters = None if type is not None or name is not None: @@ -99,12 +101,9 @@ def check_name_availability( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NameAvailability', response) @@ -127,10 +126,10 @@ def list_by_subscription( :return: An iterator like instance of SignalRResource :rtype: ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -159,22 +158,23 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/SignalR'} @@ -195,10 +195,10 @@ def list_by_resource_group( :return: An iterator like instance of SignalRResource :rtype: ~azure.mgmt.signalr.models.SignalRResourcePaged[~azure.mgmt.signalr.models.SignalRResource] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -228,22 +228,23 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SignalRResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR'} @@ -266,7 +267,8 @@ def list_keys( :return: SignalRKeys or ClientRawResponse if raw=true :rtype: ~azure.mgmt.signalr.models.SignalRKeys or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.list_keys.metadata['url'] @@ -296,12 +298,9 @@ def list_keys( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SignalRKeys', response) @@ -310,7 +309,7 @@ def list_keys( return client_raw_response return deserialized - list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/listKeys'} + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/listKeys'} def _regenerate_key_initial( @@ -354,9 +353,7 @@ def _regenerate_key_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -395,7 +392,8 @@ def regenerate_key( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRKeys] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRKeys]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._regenerate_key_initial( resource_group_name=resource_group_name, @@ -422,7 +420,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}/regenerateKey'} + regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/regenerateKey'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -442,7 +440,8 @@ def get( :return: SignalRResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.signalr.models.SignalRResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -472,12 +471,9 @@ def get( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SignalRResource', response) @@ -525,13 +521,13 @@ def _create_or_update_initial( request = self._client.put(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 201, 202]: + raise models.ErrorResponseException(self._deserialize, response) deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SignalRResource', response) if response.status_code == 201: deserialized = self._deserialize('SignalRResource', response) @@ -564,7 +560,8 @@ def create_or_update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -623,9 +620,7 @@ def _delete_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -650,7 +645,8 @@ def delete( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -712,9 +708,7 @@ def _update_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) deserialized = None @@ -750,7 +744,8 @@ def update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.SignalRResource] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.SignalRResource]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -809,9 +804,7 @@ def _restart_initial( response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [202, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) if raw: client_raw_response = ClientRawResponse(None, response) @@ -836,7 +829,8 @@ def restart( ClientRawResponse if raw==True :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ raw_result = self._restart_initial( resource_group_name=resource_group_name, diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py new file mode 100644 index 000000000000..0c35b6bed8b4 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py @@ -0,0 +1,316 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SignalRPrivateEndpointConnectionsOperations(object): + """SignalRPrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def get( + self, private_endpoint_connection_name, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the specified private endpoint connection associated with a SignalR + resource. + + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the SignalR resource. + :type private_endpoint_connection_name: str + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.signalr.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _create_initial( + self, private_endpoint_connection_name, resource_group_name, resource_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, **operation_config): + parameters = None + if private_endpoint is not None or private_link_service_connection_state is not None: + parameters = models.PrivateEndpointConnection(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state) + + # Construct URL + url = self.create.metadata['url'] + path_format_arguments = { + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if parameters is not None: + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + else: + body_content = None + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, private_endpoint_connection_name, resource_group_name, resource_name, private_endpoint=None, private_link_service_connection_state=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update the state of specified private endpoint connection associated + with a SignalR resource. + + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the SignalR resource. + :type private_endpoint_connection_name: str + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param private_endpoint: Private endpoint associated with the private + endpoint connection + :type private_endpoint: ~azure.mgmt.signalr.models.PrivateEndpoint + :param private_link_service_connection_state: Connection state + :type private_link_service_connection_state: + ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionState + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.signalr.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.signalr.models.PrivateEndpointConnection]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + private_endpoint_connection_name=private_endpoint_connection_name, + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint=private_endpoint, + private_link_service_connection_state=private_link_service_connection_state, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_initial( + self, private_endpoint_connection_name, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, private_endpoint_connection_name, resource_group_name, resource_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete the specified private endpoint connection associated with a + SignalR resource. + + :param private_endpoint_connection_name: The name of the private + endpoint connection associated with the SignalR resource. + :type private_endpoint_connection_name: str + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + private_endpoint_connection_name=private_endpoint_connection_name, + resource_group_name=resource_group_name, + resource_name=resource_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py new file mode 100644 index 000000000000..1f9706d1b4da --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py @@ -0,0 +1,113 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class SignalRPrivateLinkResourcesOperations(object): + """SignalRPrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Client Api Version. Constant value: "2018-10-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-10-01" + + self.config = config + + def list( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get the private link resources that need to be created for a SignalR + resource. + + :param resource_group_name: The name of the resource group that + contains the resource. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the SignalR resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.mgmt.signalr.models.PrivateLinkResourcePaged[~azure.mgmt.signalr.models.PrivateLinkResource] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/privateLinkResources'} diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py similarity index 86% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py index 39df40d45d28..a79825ec8bd8 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/usages_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -19,6 +18,8 @@ class UsagesOperations(object): """UsagesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,10 +52,10 @@ def list( :return: An iterator like instance of SignalRUsage :rtype: ~azure.mgmt.signalr.models.SignalRUsagePaged[~azure.mgmt.signalr.models.SignalRUsage] - :raises: :class:`CloudError` + :raises: + :class:`ErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -84,22 +85,23 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.ErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SignalRUsagePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.SignalRService/locations/{location}/usages'} diff --git a/sdk/signalr/azure-mgmt-signalr/setup.py b/sdk/signalr/azure-mgmt-signalr/setup.py index fef5ae53eac2..9a2f53ad4a3b 100644 --- a/sdk/signalr/azure-mgmt-signalr/setup.py +++ b/sdk/signalr/azure-mgmt-signalr/setup.py @@ -36,7 +36,10 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +70,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,