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..49c4bcbbb641 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,12 @@ 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 UsagesOperations +from . import models class SignalRManagementClient(SDKClient): 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..2c02721da05c 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,95 @@ # -------------------------------------------------------------------------- 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 Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationProperties + from ._models_py3 import RegenerateKeyParameters + from ._models_py3 import Resource + from ._models_py3 import ResourceSku + 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 SignalRResource + from ._models_py3 import SignalRUpdateParameters + from ._models_py3 import SignalRUsage + from ._models_py3 import SignalRUsageName + from ._models_py3 import TrackedResource 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 Operation + from ._models import OperationDisplay + from ._models import OperationProperties + from ._models import RegenerateKeyParameters + from ._models import Resource + from ._models import ResourceSku + 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 SignalRResource + from ._models import SignalRUpdateParameters + from ._models import SignalRUsage + from ._models import SignalRUsageName + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import SignalRResourcePaged +from ._paged_models import SignalRUsagePaged +from ._signal_rmanagement_client_enums import ( SignalRSkuTier, ProvisioningState, + FeatureFlags, KeyType, ) __all__ = [ - 'OperationDisplay', 'Dimension', + 'ErrorResponse', 'ErrorResponseException', + 'ErrorResponseBody', + 'LogSpecification', 'MetricSpecification', - 'ServiceSpecification', - 'OperationProperties', - 'Operation', - 'NameAvailabilityParameters', 'NameAvailability', - 'ResourceSku', - 'SignalRResource', - 'TrackedResource', + 'NameAvailabilityParameters', + 'Operation', + 'OperationDisplay', + 'OperationProperties', + 'RegenerateKeyParameters', 'Resource', - 'SignalRFeature', + 'ResourceSku', + 'ServiceSpecification', 'SignalRCorsSettings', 'SignalRCreateOrUpdateProperties', - 'SignalRKeys', - 'RegenerateKeyParameters', 'SignalRCreateParameters', + 'SignalRFeature', + 'SignalRKeys', + 'SignalRResource', 'SignalRUpdateParameters', - 'SignalRUsageName', 'SignalRUsage', + 'SignalRUsageName', + 'TrackedResource', 'OperationPaged', 'SignalRResourcePaged', 'SignalRUsagePaged', 'SignalRSkuTier', 'ProvisioningState', + 'FeatureFlags', '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..c0a71051612f --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py @@ -0,0 +1,825 @@ +# 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 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) + + +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 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 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 + + +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 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 + """ + + _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) + + +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 + """ + + _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) + + +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' + :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/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 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) + + +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) + + +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) 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..43bc1bc37dd0 --- /dev/null +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py @@ -0,0 +1,825 @@ +# 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 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 + + +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 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 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 + + +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 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 + """ + + _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 + + +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 + """ + + _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 + + +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' + :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/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 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 + + +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 + + +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 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/_paged_models.py similarity index 52% rename from sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py rename to sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py index 98b0225b9fa0..c8c6f4172a18 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rresource_paged.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_paged_models.py @@ -12,6 +12,19 @@ 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 @@ -25,3 +38,16 @@ class SignalRResourcePaged(Paged): def __init__(self, *args, **kwargs): super(SignalRResourcePaged, 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 88% 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..28e744f16465 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,12 @@ class ProvisioningState(str, Enum): moving = "Moving" +class FeatureFlags(str, Enum): + + service_mode = "ServiceMode" + enable_connectivity_logs = "EnableConnectivityLogs" + + 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_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..20867572040a 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,9 +9,9 @@ # 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 ._usages_operations import UsagesOperations __all__ = [ 'Operations', 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..126bb484ef8d 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) @@ -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, @@ -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/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'}