Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
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
except (SyntaxError, ImportError):
from .operation_display import OperationDisplay
from .metric_specification import MetricSpecification
Expand All @@ -43,8 +45,11 @@
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 (
SignalRSkuTier,
ProvisioningState,
Expand All @@ -68,8 +73,11 @@
'RegenerateKeyParameters',
'SignalRCreateParameters',
'SignalRUpdateParameters',
'SignalRUsageName',
'SignalRUsage',
'OperationPaged',
'SignalRResourcePaged',
'SignalRUsagePaged',
'SignalRSkuTier',
'ProvisioningState',
'KeyType',
Expand Down
47 changes: 47 additions & 0 deletions azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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)
32 changes: 32 additions & 0 deletions azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 indentifier 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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 indentifier 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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 <azure.mgmt.signalr.models.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)
47 changes: 47 additions & 0 deletions azure-mgmt-signalr/azure/mgmt/signalr/models/signal_rusage_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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
2 changes: 2 additions & 0 deletions azure-mgmt-signalr/azure/mgmt/signalr/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

from .operations import Operations
from .signal_roperations import SignalROperations
from .usages_operations import UsagesOperations

__all__ = [
'Operations',
'SignalROperations',
'UsagesOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
Loading