diff --git a/sdk/redis/azure-mgmt-redis/MANIFEST.in b/sdk/redis/azure-mgmt-redis/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/sdk/redis/azure-mgmt-redis/MANIFEST.in +++ b/sdk/redis/azure-mgmt-redis/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/sdk/redis/azure-mgmt-redis/README.rst b/sdk/redis/azure-mgmt-redis/README.rst index bb3fa5fa3a5e..66ae47f98df0 100644 --- a/sdk/redis/azure-mgmt-redis/README.rst +++ b/sdk/redis/azure-mgmt-redis/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Redis Cache Management Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__init__.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__init__.py index 1d2fcdcf58c4..f1f7e1053ce5 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__init__.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .redis_management_client import RedisManagementClient -from .version import VERSION +from ._configuration import RedisManagementClientConfiguration +from ._redis_management_client import RedisManagementClient +__all__ = ['RedisManagementClient', 'RedisManagementClientConfiguration'] -__all__ = ['RedisManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py new file mode 100644 index 000000000000..7f6f283412d9 --- /dev/null +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_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 RedisManagementClientConfiguration(AzureConfiguration): + """Configuration for RedisManagementClient + 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 credentials 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(RedisManagementClientConfiguration, 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-redis/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/redis_management_client.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py similarity index 62% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/redis_management_client.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py index 54383690dce2..918fe092823f 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/redis_management_client.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py @@ -11,48 +11,14 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.redis_operations import RedisOperations -from .operations.firewall_rules_operations import FirewallRulesOperations -from .operations.patch_schedules_operations import PatchSchedulesOperations -from .operations.linked_server_operations import LinkedServerOperations -from . import models - - -class RedisManagementClientConfiguration(AzureConfiguration): - """Configuration for RedisManagementClient - 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 credentials 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(RedisManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('azure-mgmt-redis/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import RedisManagementClientConfiguration +from .operations import Operations +from .operations import RedisOperations +from .operations import FirewallRulesOperations +from .operations import PatchSchedulesOperations +from .operations import LinkedServerOperations +from . import models class RedisManagementClient(SDKClient): @@ -89,7 +55,7 @@ def __init__( super(RedisManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-03-01' + self.api_version = '2019-07-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py index ef3205181237..e3195f664086 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py @@ -10,63 +10,65 @@ # -------------------------------------------------------------------------- try: - from .sku_py3 import Sku - from .redis_access_keys_py3 import RedisAccessKeys - from .redis_linked_server_py3 import RedisLinkedServer - from .resource_py3 import Resource - from .proxy_resource_py3 import ProxyResource - from .tracked_resource_py3 import TrackedResource - from .redis_create_parameters_py3 import RedisCreateParameters - from .redis_update_parameters_py3 import RedisUpdateParameters - from .redis_firewall_rule_py3 import RedisFirewallRule - from .redis_firewall_rule_create_parameters_py3 import RedisFirewallRuleCreateParameters - from .redis_resource_py3 import RedisResource - from .redis_regenerate_key_parameters_py3 import RedisRegenerateKeyParameters - from .redis_reboot_parameters_py3 import RedisRebootParameters - from .export_rdb_parameters_py3 import ExportRDBParameters - from .import_rdb_parameters_py3 import ImportRDBParameters - from .schedule_entry_py3 import ScheduleEntry - from .redis_patch_schedule_py3 import RedisPatchSchedule - from .redis_force_reboot_response_py3 import RedisForceRebootResponse - from .redis_linked_server_with_properties_py3 import RedisLinkedServerWithProperties - from .redis_linked_server_create_parameters_py3 import RedisLinkedServerCreateParameters - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters - from .upgrade_notification_py3 import UpgradeNotification - from .notification_list_response_py3 import NotificationListResponse + from ._models_py3 import CheckNameAvailabilityParameters + from ._models_py3 import ExportRDBParameters + from ._models_py3 import ImportRDBParameters + from ._models_py3 import NotificationListResponse + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import ProxyResource + from ._models_py3 import RedisAccessKeys + from ._models_py3 import RedisCreateParameters + from ._models_py3 import RedisFirewallRule + from ._models_py3 import RedisFirewallRuleCreateParameters + from ._models_py3 import RedisForceRebootResponse + from ._models_py3 import RedisInstanceDetails + from ._models_py3 import RedisLinkedServer + from ._models_py3 import RedisLinkedServerCreateParameters + from ._models_py3 import RedisLinkedServerWithProperties + from ._models_py3 import RedisPatchSchedule + from ._models_py3 import RedisRebootParameters + from ._models_py3 import RedisRegenerateKeyParameters + from ._models_py3 import RedisResource + from ._models_py3 import RedisUpdateParameters + from ._models_py3 import Resource + from ._models_py3 import ScheduleEntry + from ._models_py3 import Sku + from ._models_py3 import TrackedResource + from ._models_py3 import UpgradeNotification except (SyntaxError, ImportError): - from .sku import Sku - from .redis_access_keys import RedisAccessKeys - from .redis_linked_server import RedisLinkedServer - from .resource import Resource - from .proxy_resource import ProxyResource - from .tracked_resource import TrackedResource - from .redis_create_parameters import RedisCreateParameters - from .redis_update_parameters import RedisUpdateParameters - from .redis_firewall_rule import RedisFirewallRule - from .redis_firewall_rule_create_parameters import RedisFirewallRuleCreateParameters - from .redis_resource import RedisResource - from .redis_regenerate_key_parameters import RedisRegenerateKeyParameters - from .redis_reboot_parameters import RedisRebootParameters - from .export_rdb_parameters import ExportRDBParameters - from .import_rdb_parameters import ImportRDBParameters - from .schedule_entry import ScheduleEntry - from .redis_patch_schedule import RedisPatchSchedule - from .redis_force_reboot_response import RedisForceRebootResponse - from .redis_linked_server_with_properties import RedisLinkedServerWithProperties - from .redis_linked_server_create_parameters import RedisLinkedServerCreateParameters - from .operation_display import OperationDisplay - from .operation import Operation - from .check_name_availability_parameters import CheckNameAvailabilityParameters - from .upgrade_notification import UpgradeNotification - from .notification_list_response import NotificationListResponse -from .operation_paged import OperationPaged -from .redis_resource_paged import RedisResourcePaged -from .redis_firewall_rule_paged import RedisFirewallRulePaged -from .redis_patch_schedule_paged import RedisPatchSchedulePaged -from .redis_linked_server_with_properties_paged import RedisLinkedServerWithPropertiesPaged -from .redis_management_client_enums import ( + from ._models import CheckNameAvailabilityParameters + from ._models import ExportRDBParameters + from ._models import ImportRDBParameters + from ._models import NotificationListResponse + from ._models import Operation + from ._models import OperationDisplay + from ._models import ProxyResource + from ._models import RedisAccessKeys + from ._models import RedisCreateParameters + from ._models import RedisFirewallRule + from ._models import RedisFirewallRuleCreateParameters + from ._models import RedisForceRebootResponse + from ._models import RedisInstanceDetails + from ._models import RedisLinkedServer + from ._models import RedisLinkedServerCreateParameters + from ._models import RedisLinkedServerWithProperties + from ._models import RedisPatchSchedule + from ._models import RedisRebootParameters + from ._models import RedisRegenerateKeyParameters + from ._models import RedisResource + from ._models import RedisUpdateParameters + from ._models import Resource + from ._models import ScheduleEntry + from ._models import Sku + from ._models import TrackedResource + from ._models import UpgradeNotification +from ._paged_models import OperationPaged +from ._paged_models import RedisFirewallRulePaged +from ._paged_models import RedisLinkedServerWithPropertiesPaged +from ._paged_models import RedisPatchSchedulePaged +from ._paged_models import RedisResourcePaged +from ._redis_management_client_enums import ( SkuName, SkuFamily, TlsVersion, @@ -78,31 +80,32 @@ ) __all__ = [ - 'Sku', - 'RedisAccessKeys', - 'RedisLinkedServer', - 'Resource', + 'CheckNameAvailabilityParameters', + 'ExportRDBParameters', + 'ImportRDBParameters', + 'NotificationListResponse', + 'Operation', + 'OperationDisplay', 'ProxyResource', - 'TrackedResource', + 'RedisAccessKeys', 'RedisCreateParameters', - 'RedisUpdateParameters', 'RedisFirewallRule', 'RedisFirewallRuleCreateParameters', - 'RedisResource', - 'RedisRegenerateKeyParameters', - 'RedisRebootParameters', - 'ExportRDBParameters', - 'ImportRDBParameters', - 'ScheduleEntry', - 'RedisPatchSchedule', 'RedisForceRebootResponse', - 'RedisLinkedServerWithProperties', + 'RedisInstanceDetails', + 'RedisLinkedServer', 'RedisLinkedServerCreateParameters', - 'OperationDisplay', - 'Operation', - 'CheckNameAvailabilityParameters', + 'RedisLinkedServerWithProperties', + 'RedisPatchSchedule', + 'RedisRebootParameters', + 'RedisRegenerateKeyParameters', + 'RedisResource', + 'RedisUpdateParameters', + 'Resource', + 'ScheduleEntry', + 'Sku', + 'TrackedResource', 'UpgradeNotification', - 'NotificationListResponse', 'OperationPaged', 'RedisResourcePaged', 'RedisFirewallRulePaged', diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py new file mode 100644 index 000000000000..c06ef1776621 --- /dev/null +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py @@ -0,0 +1,1131 @@ +# 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 CheckNameAvailabilityParameters(Model): + """Parameters body to pass for resource name availability check. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name. + :type name: str + :param type: Required. Resource type. The only legal value of this + property for checking redis cache name availability is + 'Microsoft.Cache/redis'. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ExportRDBParameters(Model): + """Parameters for Redis export operation. + + All required parameters must be populated in order to send to Azure. + + :param format: File format. + :type format: str + :param prefix: Required. Prefix to use for exported files. + :type prefix: str + :param container: Required. Container name to export to. + :type container: str + """ + + _validation = { + 'prefix': {'required': True}, + 'container': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExportRDBParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.prefix = kwargs.get('prefix', None) + self.container = kwargs.get('container', None) + + +class ImportRDBParameters(Model): + """Parameters for Redis import operation. + + All required parameters must be populated in order to send to Azure. + + :param format: File format. + :type format: str + :param files: Required. files to import. + :type files: list[str] + """ + + _validation = { + 'files': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ImportRDBParameters, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.files = kwargs.get('files', None) + + +class NotificationListResponse(Model): + """The response of listUpgradeNotifications. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: List of all notifications. + :type value: list[~azure.mgmt.redis.models.UpgradeNotification] + :ivar next_link: Link for next set of notifications. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NotificationListResponse, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.redis.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.operation = kwargs.get('operation', None) + self.resource = kwargs.get('resource', None) + self.description = kwargs.get('description', None) + + +class Resource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) + + +class RedisAccessKeys(Model): + """Redis cache access keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The current primary key that clients can use to + authenticate with Redis cache. + :vartype primary_key: str + :ivar secondary_key: The current secondary key that clients can use to + authenticate with Redis cache. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisAccessKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class RedisCommonProperties(Model): + """Create/Update/Get common properties of the redis cache. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + """ + + _attribute_map = { + 'redis_configuration': {'key': 'redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisCommonProperties, self).__init__(**kwargs) + self.redis_configuration = kwargs.get('redis_configuration', None) + self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) + self.replicas_per_master = kwargs.get('replicas_per_master', None) + self.tenant_settings = kwargs.get('tenant_settings', None) + self.shard_count = kwargs.get('shard_count', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) + + +class RedisCreateParameters(Model): + """Parameters supplied to the Create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + 'location': {'required': True}, + } + + _attribute_map = { + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RedisCreateParameters, self).__init__(**kwargs) + self.redis_configuration = kwargs.get('redis_configuration', None) + self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) + self.replicas_per_master = kwargs.get('replicas_per_master', None) + self.tenant_settings = kwargs.get('tenant_settings', None) + self.shard_count = kwargs.get('shard_count', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.static_ip = kwargs.get('static_ip', None) + self.zones = kwargs.get('zones', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class RedisCreateProperties(RedisCommonProperties): + """Properties supplied to Create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + """ + + _validation = { + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + } + + _attribute_map = { + 'redis_configuration': {'key': 'redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'static_ip': {'key': 'staticIP', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisCreateProperties, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.static_ip = kwargs.get('static_ip', None) + + +class RedisFirewallRule(ProxyResource): + """A firewall rule on a redis cache has a name, and describes a contiguous + range of IP addresses permitted to connect. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param start_ip: Required. lowest IP address included in the range + :type start_ip: str + :param end_ip: Required. highest IP address included in the range + :type end_ip: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip': {'required': True}, + 'end_ip': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, + 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisFirewallRule, self).__init__(**kwargs) + self.start_ip = kwargs.get('start_ip', None) + self.end_ip = kwargs.get('end_ip', None) + + +class RedisFirewallRuleCreateParameters(Model): + """Parameters required for creating a firewall rule on redis cache. + + All required parameters must be populated in order to send to Azure. + + :param start_ip: Required. lowest IP address included in the range + :type start_ip: str + :param end_ip: Required. highest IP address included in the range + :type end_ip: str + """ + + _validation = { + 'start_ip': {'required': True}, + 'end_ip': {'required': True}, + } + + _attribute_map = { + 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, + 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisFirewallRuleCreateParameters, self).__init__(**kwargs) + self.start_ip = kwargs.get('start_ip', None) + self.end_ip = kwargs.get('end_ip', None) + + +class RedisForceRebootResponse(Model): + """Response to force reboot for Redis cache. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: Status message + :vartype message: str + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisForceRebootResponse, self).__init__(**kwargs) + self.message = None + + +class RedisInstanceDetails(Model): + """Details of single instance of redis. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ssl_port: Redis instance SSL port. + :vartype ssl_port: int + :ivar non_ssl_port: If enableNonSslPort is true, provides Redis instance + Non-SSL port. + :vartype non_ssl_port: int + :ivar zone: If the Cache uses availability zones, specifies availability + zone where this instance is located. + :vartype zone: str + :ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance + :vartype shard_id: int + """ + + _validation = { + 'ssl_port': {'readonly': True}, + 'non_ssl_port': {'readonly': True}, + 'zone': {'readonly': True}, + 'shard_id': {'readonly': True}, + } + + _attribute_map = { + 'ssl_port': {'key': 'sslPort', 'type': 'int'}, + 'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'}, + 'zone': {'key': 'zone', 'type': 'str'}, + 'shard_id': {'key': 'shardId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RedisInstanceDetails, self).__init__(**kwargs) + self.ssl_port = None + self.non_ssl_port = None + self.zone = None + self.shard_id = None + + +class RedisLinkedServer(Model): + """Linked server Id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Linked server Id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisLinkedServer, self).__init__(**kwargs) + self.id = None + + +class RedisLinkedServerCreateParameters(Model): + """Parameter required for creating a linked server to redis cache. + + All required parameters must be populated in order to send to Azure. + + :param linked_redis_cache_id: Required. Fully qualified resourceId of the + linked redis cache. + :type linked_redis_cache_id: str + :param linked_redis_cache_location: Required. Location of the linked redis + cache. + :type linked_redis_cache_location: str + :param server_role: Required. Role of the linked server. Possible values + include: 'Primary', 'Secondary' + :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole + """ + + _validation = { + 'linked_redis_cache_id': {'required': True}, + 'linked_redis_cache_location': {'required': True}, + 'server_role': {'required': True}, + } + + _attribute_map = { + 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, + 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, + } + + def __init__(self, **kwargs): + super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) + self.linked_redis_cache_id = kwargs.get('linked_redis_cache_id', None) + self.linked_redis_cache_location = kwargs.get('linked_redis_cache_location', None) + self.server_role = kwargs.get('server_role', None) + + +class RedisLinkedServerWithProperties(ProxyResource): + """Response to put/get linked server (with properties) for Redis cache. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param linked_redis_cache_id: Required. Fully qualified resourceId of the + linked redis cache. + :type linked_redis_cache_id: str + :param linked_redis_cache_location: Required. Location of the linked redis + cache. + :type linked_redis_cache_location: str + :param server_role: Required. Role of the linked server. Possible values + include: 'Primary', 'Secondary' + :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole + :ivar provisioning_state: Terminal state of the link between primary and + secondary redis cache. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'linked_redis_cache_id': {'required': True}, + 'linked_redis_cache_location': {'required': True}, + 'server_role': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, + 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RedisLinkedServerWithProperties, self).__init__(**kwargs) + self.linked_redis_cache_id = kwargs.get('linked_redis_cache_id', None) + self.linked_redis_cache_location = kwargs.get('linked_redis_cache_location', None) + self.server_role = kwargs.get('server_role', None) + self.provisioning_state = None + + +class RedisPatchSchedule(ProxyResource): + """Response to put/get patch schedules for Redis cache. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param schedule_entries: Required. List of patch schedules for a Redis + cache. + :type schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schedule_entries': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, + } + + def __init__(self, **kwargs): + super(RedisPatchSchedule, self).__init__(**kwargs) + self.schedule_entries = kwargs.get('schedule_entries', None) + + +class RedisRebootParameters(Model): + """Specifies which Redis node(s) to reboot. + + All required parameters must be populated in order to send to Azure. + + :param reboot_type: Required. Which Redis node(s) to reboot. Depending on + this value data loss is possible. Possible values include: 'PrimaryNode', + 'SecondaryNode', 'AllNodes' + :type reboot_type: str or ~azure.mgmt.redis.models.RebootType + :param shard_id: If clustering is enabled, the ID of the shard to be + rebooted. + :type shard_id: int + """ + + _validation = { + 'reboot_type': {'required': True}, + } + + _attribute_map = { + 'reboot_type': {'key': 'rebootType', 'type': 'str'}, + 'shard_id': {'key': 'shardId', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(RedisRebootParameters, self).__init__(**kwargs) + self.reboot_type = kwargs.get('reboot_type', None) + self.shard_id = kwargs.get('shard_id', None) + + +class RedisRegenerateKeyParameters(Model): + """Specifies which Redis access keys to reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The Redis access key to regenerate. Possible + values include: 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.redis.models.RedisKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'RedisKeyType'}, + } + + def __init__(self, **kwargs): + super(RedisRegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs.get('key_type', 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. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class RedisResource(TrackedResource): + """A single Redis item in List or Get Operation. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + :ivar redis_version: Redis version. + :vartype redis_version: str + :ivar provisioning_state: Redis instance provisioning status. Possible + values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', + 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', + 'Unlinking', 'Unprovisioning', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.redis.models.ProvisioningState + :ivar host_name: Redis host name. + :vartype host_name: str + :ivar port: Redis non-SSL port. + :vartype port: int + :ivar ssl_port: Redis SSL port. + :vartype ssl_port: int + :ivar access_keys: The keys of the Redis cache - not set if this object is + not the response to Create or Update redis cache + :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys + :ivar linked_servers: List of the linked servers associated with the cache + :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] + :ivar instances: List of the Redis instances associated with the cache + :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + 'redis_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'port': {'readonly': True}, + 'ssl_port': {'readonly': True}, + 'access_keys': {'readonly': True}, + 'linked_servers': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, + 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, + 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, + 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, + 'instances': {'key': 'properties.instances', 'type': '[RedisInstanceDetails]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RedisResource, self).__init__(**kwargs) + self.redis_configuration = kwargs.get('redis_configuration', None) + self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) + self.replicas_per_master = kwargs.get('replicas_per_master', None) + self.tenant_settings = kwargs.get('tenant_settings', None) + self.shard_count = kwargs.get('shard_count', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) + self.sku = kwargs.get('sku', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.static_ip = kwargs.get('static_ip', None) + self.redis_version = None + self.provisioning_state = None + self.host_name = None + self.port = None + self.ssl_port = None + self.access_keys = None + self.linked_servers = None + self.instances = None + self.zones = kwargs.get('zones', None) + + +class RedisUpdateParameters(Model): + """Parameters supplied to the Update Redis operation. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(RedisUpdateParameters, self).__init__(**kwargs) + self.redis_configuration = kwargs.get('redis_configuration', None) + self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) + self.replicas_per_master = kwargs.get('replicas_per_master', None) + self.tenant_settings = kwargs.get('tenant_settings', None) + self.shard_count = kwargs.get('shard_count', None) + self.minimum_tls_version = kwargs.get('minimum_tls_version', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + + +class ScheduleEntry(Model): + """Patch schedule entry for a Premium Redis Cache. + + All required parameters must be populated in order to send to Azure. + + :param day_of_week: Required. Day of the week when a cache can be patched. + Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', + 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' + :type day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek + :param start_hour_utc: Required. Start hour after which cache patching can + start. + :type start_hour_utc: int + :param maintenance_window: ISO8601 timespan specifying how much time cache + patching can take. + :type maintenance_window: timedelta + """ + + _validation = { + 'day_of_week': {'required': True}, + 'start_hour_utc': {'required': True}, + } + + _attribute_map = { + 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, + 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, + 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, + } + + def __init__(self, **kwargs): + super(ScheduleEntry, self).__init__(**kwargs) + self.day_of_week = kwargs.get('day_of_week', None) + self.start_hour_utc = kwargs.get('start_hour_utc', None) + self.maintenance_window = kwargs.get('maintenance_window', None) + + +class Sku(Model): + """SKU parameters supplied to the create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The type of Redis cache to deploy. Valid values: + (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', + 'Premium' + :type name: str or ~azure.mgmt.redis.models.SkuName + :param family: Required. The SKU family to use. Valid values: (C, P). (C = + Basic/Standard, P = Premium). Possible values include: 'C', 'P' + :type family: str or ~azure.mgmt.redis.models.SkuFamily + :param capacity: Required. The size of the Redis cache to deploy. Valid + values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P + (Premium) family (1, 2, 3, 4). + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'family': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class UpgradeNotification(Model): + """Properties of upgrade notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of upgrade notification. + :vartype name: str + :ivar timestamp: Timestamp when upgrade notification occurred. + :vartype timestamp: datetime + :ivar upsell_notification: Details about this upgrade notification + :vartype upsell_notification: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'upsell_notification': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(UpgradeNotification, self).__init__(**kwargs) + self.name = None + self.timestamp = None + self.upsell_notification = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py new file mode 100644 index 000000000000..def2565847ed --- /dev/null +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py @@ -0,0 +1,1131 @@ +# 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 CheckNameAvailabilityParameters(Model): + """Parameters body to pass for resource name availability check. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Resource name. + :type name: str + :param type: Required. Resource type. The only legal value of this + property for checking redis cache name availability is + 'Microsoft.Cache/redis'. + :type type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, name: str, type: str, **kwargs) -> None: + super(CheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class ExportRDBParameters(Model): + """Parameters for Redis export operation. + + All required parameters must be populated in order to send to Azure. + + :param format: File format. + :type format: str + :param prefix: Required. Prefix to use for exported files. + :type prefix: str + :param container: Required. Container name to export to. + :type container: str + """ + + _validation = { + 'prefix': {'required': True}, + 'container': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'prefix': {'key': 'prefix', 'type': 'str'}, + 'container': {'key': 'container', 'type': 'str'}, + } + + def __init__(self, *, prefix: str, container: str, format: str=None, **kwargs) -> None: + super(ExportRDBParameters, self).__init__(**kwargs) + self.format = format + self.prefix = prefix + self.container = container + + +class ImportRDBParameters(Model): + """Parameters for Redis import operation. + + All required parameters must be populated in order to send to Azure. + + :param format: File format. + :type format: str + :param files: Required. files to import. + :type files: list[str] + """ + + _validation = { + 'files': {'required': True}, + } + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[str]'}, + } + + def __init__(self, *, files, format: str=None, **kwargs) -> None: + super(ImportRDBParameters, self).__init__(**kwargs) + self.format = format + self.files = files + + +class NotificationListResponse(Model): + """The response of listUpgradeNotifications. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: List of all notifications. + :type value: list[~azure.mgmt.redis.models.UpgradeNotification] + :ivar next_link: Link for next set of notifications. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(NotificationListResponse, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Operation(Model): + """REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that describes the operation. + :type display: ~azure.mgmt.redis.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that describes the operation. + + :param provider: Friendly name of the resource provider + :type provider: str + :param operation: Operation type: read, write, delete, listKeys/action, + etc. + :type operation: str + :param resource: Resource type on which the operation is performed. + :type resource: str + :param description: Friendly name of the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.operation = operation + self.resource = resource + self.description = description + + +class Resource(Model): + """The Resource definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class RedisAccessKeys(Model): + """Redis cache access keys. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The current primary key that clients can use to + authenticate with Redis cache. + :vartype primary_key: str + :ivar secondary_key: The current secondary key that clients can use to + authenticate with Redis cache. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RedisAccessKeys, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class RedisCommonProperties(Model): + """Create/Update/Get common properties of the redis cache. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + """ + + _attribute_map = { + 'redis_configuration': {'key': 'redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + } + + def __init__(self, *, redis_configuration=None, enable_non_ssl_port: bool=None, replicas_per_master: int=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, **kwargs) -> None: + super(RedisCommonProperties, self).__init__(**kwargs) + self.redis_configuration = redis_configuration + self.enable_non_ssl_port = enable_non_ssl_port + self.replicas_per_master = replicas_per_master + self.tenant_settings = tenant_settings + self.shard_count = shard_count + self.minimum_tls_version = minimum_tls_version + + +class RedisCreateParameters(Model): + """Parameters supplied to the Create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + 'location': {'required': True}, + } + + _attribute_map = { + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, sku, location: str, redis_configuration=None, enable_non_ssl_port: bool=None, replicas_per_master: int=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, subnet_id: str=None, static_ip: str=None, zones=None, tags=None, **kwargs) -> None: + super(RedisCreateParameters, self).__init__(**kwargs) + self.redis_configuration = redis_configuration + self.enable_non_ssl_port = enable_non_ssl_port + self.replicas_per_master = replicas_per_master + self.tenant_settings = tenant_settings + self.shard_count = shard_count + self.minimum_tls_version = minimum_tls_version + self.sku = sku + self.subnet_id = subnet_id + self.static_ip = static_ip + self.zones = zones + self.location = location + self.tags = tags + + +class RedisCreateProperties(RedisCommonProperties): + """Properties supplied to Create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + """ + + _validation = { + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + } + + _attribute_map = { + 'redis_configuration': {'key': 'redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'static_ip': {'key': 'staticIP', 'type': 'str'}, + } + + def __init__(self, *, sku, redis_configuration=None, enable_non_ssl_port: bool=None, replicas_per_master: int=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, subnet_id: str=None, static_ip: str=None, **kwargs) -> None: + super(RedisCreateProperties, self).__init__(redis_configuration=redis_configuration, enable_non_ssl_port=enable_non_ssl_port, replicas_per_master=replicas_per_master, tenant_settings=tenant_settings, shard_count=shard_count, minimum_tls_version=minimum_tls_version, **kwargs) + self.sku = sku + self.subnet_id = subnet_id + self.static_ip = static_ip + + +class RedisFirewallRule(ProxyResource): + """A firewall rule on a redis cache has a name, and describes a contiguous + range of IP addresses permitted to connect. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param start_ip: Required. lowest IP address included in the range + :type start_ip: str + :param end_ip: Required. highest IP address included in the range + :type end_ip: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'start_ip': {'required': True}, + 'end_ip': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, + 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, + } + + def __init__(self, *, start_ip: str, end_ip: str, **kwargs) -> None: + super(RedisFirewallRule, self).__init__(**kwargs) + self.start_ip = start_ip + self.end_ip = end_ip + + +class RedisFirewallRuleCreateParameters(Model): + """Parameters required for creating a firewall rule on redis cache. + + All required parameters must be populated in order to send to Azure. + + :param start_ip: Required. lowest IP address included in the range + :type start_ip: str + :param end_ip: Required. highest IP address included in the range + :type end_ip: str + """ + + _validation = { + 'start_ip': {'required': True}, + 'end_ip': {'required': True}, + } + + _attribute_map = { + 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, + 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, + } + + def __init__(self, *, start_ip: str, end_ip: str, **kwargs) -> None: + super(RedisFirewallRuleCreateParameters, self).__init__(**kwargs) + self.start_ip = start_ip + self.end_ip = end_ip + + +class RedisForceRebootResponse(Model): + """Response to force reboot for Redis cache. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar message: Status message + :vartype message: str + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RedisForceRebootResponse, self).__init__(**kwargs) + self.message = None + + +class RedisInstanceDetails(Model): + """Details of single instance of redis. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar ssl_port: Redis instance SSL port. + :vartype ssl_port: int + :ivar non_ssl_port: If enableNonSslPort is true, provides Redis instance + Non-SSL port. + :vartype non_ssl_port: int + :ivar zone: If the Cache uses availability zones, specifies availability + zone where this instance is located. + :vartype zone: str + :ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance + :vartype shard_id: int + """ + + _validation = { + 'ssl_port': {'readonly': True}, + 'non_ssl_port': {'readonly': True}, + 'zone': {'readonly': True}, + 'shard_id': {'readonly': True}, + } + + _attribute_map = { + 'ssl_port': {'key': 'sslPort', 'type': 'int'}, + 'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'}, + 'zone': {'key': 'zone', 'type': 'str'}, + 'shard_id': {'key': 'shardId', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(RedisInstanceDetails, self).__init__(**kwargs) + self.ssl_port = None + self.non_ssl_port = None + self.zone = None + self.shard_id = None + + +class RedisLinkedServer(Model): + """Linked server Id. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Linked server Id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(RedisLinkedServer, self).__init__(**kwargs) + self.id = None + + +class RedisLinkedServerCreateParameters(Model): + """Parameter required for creating a linked server to redis cache. + + All required parameters must be populated in order to send to Azure. + + :param linked_redis_cache_id: Required. Fully qualified resourceId of the + linked redis cache. + :type linked_redis_cache_id: str + :param linked_redis_cache_location: Required. Location of the linked redis + cache. + :type linked_redis_cache_location: str + :param server_role: Required. Role of the linked server. Possible values + include: 'Primary', 'Secondary' + :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole + """ + + _validation = { + 'linked_redis_cache_id': {'required': True}, + 'linked_redis_cache_location': {'required': True}, + 'server_role': {'required': True}, + } + + _attribute_map = { + 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, + 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, + } + + def __init__(self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role, **kwargs) -> None: + super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) + self.linked_redis_cache_id = linked_redis_cache_id + self.linked_redis_cache_location = linked_redis_cache_location + self.server_role = server_role + + +class RedisLinkedServerWithProperties(ProxyResource): + """Response to put/get linked server (with properties) for Redis cache. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param linked_redis_cache_id: Required. Fully qualified resourceId of the + linked redis cache. + :type linked_redis_cache_id: str + :param linked_redis_cache_location: Required. Location of the linked redis + cache. + :type linked_redis_cache_location: str + :param server_role: Required. Role of the linked server. Possible values + include: 'Primary', 'Secondary' + :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole + :ivar provisioning_state: Terminal state of the link between primary and + secondary redis cache. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'linked_redis_cache_id': {'required': True}, + 'linked_redis_cache_location': {'required': True}, + 'server_role': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, + 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, + 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__(self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role, **kwargs) -> None: + super(RedisLinkedServerWithProperties, self).__init__(**kwargs) + self.linked_redis_cache_id = linked_redis_cache_id + self.linked_redis_cache_location = linked_redis_cache_location + self.server_role = server_role + self.provisioning_state = None + + +class RedisPatchSchedule(ProxyResource): + """Response to put/get patch schedules for Redis cache. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param schedule_entries: Required. List of patch schedules for a Redis + cache. + :type schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'schedule_entries': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, + } + + def __init__(self, *, schedule_entries, **kwargs) -> None: + super(RedisPatchSchedule, self).__init__(**kwargs) + self.schedule_entries = schedule_entries + + +class RedisRebootParameters(Model): + """Specifies which Redis node(s) to reboot. + + All required parameters must be populated in order to send to Azure. + + :param reboot_type: Required. Which Redis node(s) to reboot. Depending on + this value data loss is possible. Possible values include: 'PrimaryNode', + 'SecondaryNode', 'AllNodes' + :type reboot_type: str or ~azure.mgmt.redis.models.RebootType + :param shard_id: If clustering is enabled, the ID of the shard to be + rebooted. + :type shard_id: int + """ + + _validation = { + 'reboot_type': {'required': True}, + } + + _attribute_map = { + 'reboot_type': {'key': 'rebootType', 'type': 'str'}, + 'shard_id': {'key': 'shardId', 'type': 'int'}, + } + + def __init__(self, *, reboot_type, shard_id: int=None, **kwargs) -> None: + super(RedisRebootParameters, self).__init__(**kwargs) + self.reboot_type = reboot_type + self.shard_id = shard_id + + +class RedisRegenerateKeyParameters(Model): + """Specifies which Redis access keys to reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The Redis access key to regenerate. Possible + values include: 'Primary', 'Secondary' + :type key_type: str or ~azure.mgmt.redis.models.RedisKeyType + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'RedisKeyType'}, + } + + def __init__(self, *, key_type, **kwargs) -> None: + super(RedisRegenerateKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + + +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. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class RedisResource(TrackedResource): + """A single Redis item in List or Get Operation. + + 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 id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: Required. The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param subnet_id: The full resource ID of a subnet in a virtual network to + deploy the Redis cache in. Example format: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 + :type subnet_id: str + :param static_ip: Static IP address. Required when deploying a Redis cache + inside an existing Azure Virtual Network. + :type static_ip: str + :ivar redis_version: Redis version. + :vartype redis_version: str + :ivar provisioning_state: Redis instance provisioning status. Possible + values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', + 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', + 'Unlinking', 'Unprovisioning', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.redis.models.ProvisioningState + :ivar host_name: Redis host name. + :vartype host_name: str + :ivar port: Redis non-SSL port. + :vartype port: int + :ivar ssl_port: Redis SSL port. + :vartype ssl_port: int + :ivar access_keys: The keys of the Redis cache - not set if this object is + not the response to Create or Update redis cache + :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys + :ivar linked_servers: List of the linked servers associated with the cache + :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] + :ivar instances: List of the Redis instances associated with the cache + :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] + :param zones: A list of availability zones denoting where the resource + needs to come from. + :type zones: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'sku': {'required': True}, + 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, + 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, + 'redis_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'host_name': {'readonly': True}, + 'port': {'readonly': True}, + 'ssl_port': {'readonly': True}, + 'access_keys': {'readonly': True}, + 'linked_servers': {'readonly': True}, + 'instances': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, + 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, + 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, + 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, + 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, + 'instances': {'key': 'properties.instances', 'type': '[RedisInstanceDetails]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__(self, *, location: str, sku, tags=None, redis_configuration=None, enable_non_ssl_port: bool=None, replicas_per_master: int=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, subnet_id: str=None, static_ip: str=None, zones=None, **kwargs) -> None: + super(RedisResource, self).__init__(tags=tags, location=location, **kwargs) + self.redis_configuration = redis_configuration + self.enable_non_ssl_port = enable_non_ssl_port + self.replicas_per_master = replicas_per_master + self.tenant_settings = tenant_settings + self.shard_count = shard_count + self.minimum_tls_version = minimum_tls_version + self.sku = sku + self.subnet_id = subnet_id + self.static_ip = static_ip + self.redis_version = None + self.provisioning_state = None + self.host_name = None + self.port = None + self.ssl_port = None + self.access_keys = None + self.linked_servers = None + self.instances = None + self.zones = zones + + +class RedisUpdateParameters(Model): + """Parameters supplied to the Update Redis operation. + + :param redis_configuration: All Redis Settings. Few possible keys: + rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value + etc. + :type redis_configuration: dict[str, str] + :param enable_non_ssl_port: Specifies whether the non-ssl Redis server + port (6379) is enabled. + :type enable_non_ssl_port: bool + :param replicas_per_master: The number of replicas to be created per + master. + :type replicas_per_master: int + :param tenant_settings: A dictionary of tenant settings + :type tenant_settings: dict[str, str] + :param shard_count: The number of shards to be created on a Premium + Cluster Cache. + :type shard_count: int + :param minimum_tls_version: Optional: requires clients to use a specified + TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible + values include: '1.0', '1.1', '1.2' + :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion + :param sku: The SKU of the Redis cache to deploy. + :type sku: ~azure.mgmt.redis.models.Sku + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, + 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, + 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, + 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, + 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, + 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, + 'sku': {'key': 'properties.sku', 'type': 'Sku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, redis_configuration=None, enable_non_ssl_port: bool=None, replicas_per_master: int=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, sku=None, tags=None, **kwargs) -> None: + super(RedisUpdateParameters, self).__init__(**kwargs) + self.redis_configuration = redis_configuration + self.enable_non_ssl_port = enable_non_ssl_port + self.replicas_per_master = replicas_per_master + self.tenant_settings = tenant_settings + self.shard_count = shard_count + self.minimum_tls_version = minimum_tls_version + self.sku = sku + self.tags = tags + + +class ScheduleEntry(Model): + """Patch schedule entry for a Premium Redis Cache. + + All required parameters must be populated in order to send to Azure. + + :param day_of_week: Required. Day of the week when a cache can be patched. + Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', + 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' + :type day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek + :param start_hour_utc: Required. Start hour after which cache patching can + start. + :type start_hour_utc: int + :param maintenance_window: ISO8601 timespan specifying how much time cache + patching can take. + :type maintenance_window: timedelta + """ + + _validation = { + 'day_of_week': {'required': True}, + 'start_hour_utc': {'required': True}, + } + + _attribute_map = { + 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, + 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, + 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, + } + + def __init__(self, *, day_of_week, start_hour_utc: int, maintenance_window=None, **kwargs) -> None: + super(ScheduleEntry, self).__init__(**kwargs) + self.day_of_week = day_of_week + self.start_hour_utc = start_hour_utc + self.maintenance_window = maintenance_window + + +class Sku(Model): + """SKU parameters supplied to the create Redis operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The type of Redis cache to deploy. Valid values: + (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', + 'Premium' + :type name: str or ~azure.mgmt.redis.models.SkuName + :param family: Required. The SKU family to use. Valid values: (C, P). (C = + Basic/Standard, P = Premium). Possible values include: 'C', 'P' + :type family: str or ~azure.mgmt.redis.models.SkuFamily + :param capacity: Required. The size of the Redis cache to deploy. Valid + values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P + (Premium) family (1, 2, 3, 4). + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'family': {'required': True}, + 'capacity': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__(self, *, name, family, capacity: int, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + self.family = family + self.capacity = capacity + + +class UpgradeNotification(Model): + """Properties of upgrade notification. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of upgrade notification. + :vartype name: str + :ivar timestamp: Timestamp when upgrade notification occurred. + :vartype timestamp: datetime + :ivar upsell_notification: Details about this upgrade notification + :vartype upsell_notification: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'upsell_notification': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, + } + + def __init__(self, **kwargs) -> None: + super(UpgradeNotification, self).__init__(**kwargs) + self.name = None + self.timestamp = None + self.upsell_notification = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_paged_models.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_paged_models.py new file mode 100644 index 000000000000..8b9d7b951f13 --- /dev/null +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_paged_models.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class RedisResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`RedisResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RedisResource]'} + } + + def __init__(self, *args, **kwargs): + + super(RedisResourcePaged, self).__init__(*args, **kwargs) +class RedisFirewallRulePaged(Paged): + """ + A paging container for iterating over a list of :class:`RedisFirewallRule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RedisFirewallRule]'} + } + + def __init__(self, *args, **kwargs): + + super(RedisFirewallRulePaged, self).__init__(*args, **kwargs) +class RedisPatchSchedulePaged(Paged): + """ + A paging container for iterating over a list of :class:`RedisPatchSchedule ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RedisPatchSchedule]'} + } + + def __init__(self, *args, **kwargs): + + super(RedisPatchSchedulePaged, self).__init__(*args, **kwargs) +class RedisLinkedServerWithPropertiesPaged(Paged): + """ + A paging container for iterating over a list of :class:`RedisLinkedServerWithProperties ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RedisLinkedServerWithProperties]'} + } + + def __init__(self, *args, **kwargs): + + super(RedisLinkedServerWithPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_management_client_enums.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py similarity index 100% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_management_client_enums.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_redis_management_client_enums.py diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_name_availability_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_name_availability_parameters.py deleted file mode 100644 index 9bb074b9b03f..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_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 CheckNameAvailabilityParameters(Model): - """Parameters body to pass for resource name availability check. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name. - :type name: str - :param type: Required. Resource type. The only legal value of this - property for checking redis cache name availability is - 'Microsoft.Cache/redis'. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_name_availability_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_name_availability_parameters_py3.py deleted file mode 100644 index 0c9e0e2f63da..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/check_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 CheckNameAvailabilityParameters(Model): - """Parameters body to pass for resource name availability check. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Resource name. - :type name: str - :param type: Required. Resource type. The only legal value of this - property for checking redis cache name availability is - 'Microsoft.Cache/redis'. - :type type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str, type: str, **kwargs) -> None: - super(CheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters.py deleted file mode 100644 index 58892151d87f..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters.py +++ /dev/null @@ -1,43 +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 ExportRDBParameters(Model): - """Parameters for Redis export operation. - - All required parameters must be populated in order to send to Azure. - - :param format: File format. - :type format: str - :param prefix: Required. Prefix to use for exported files. - :type prefix: str - :param container: Required. Container name to export to. - :type container: str - """ - - _validation = { - 'prefix': {'required': True}, - 'container': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ExportRDBParameters, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.prefix = kwargs.get('prefix', None) - self.container = kwargs.get('container', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters_py3.py deleted file mode 100644 index 161d9bceeb74..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/export_rdb_parameters_py3.py +++ /dev/null @@ -1,43 +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 ExportRDBParameters(Model): - """Parameters for Redis export operation. - - All required parameters must be populated in order to send to Azure. - - :param format: File format. - :type format: str - :param prefix: Required. Prefix to use for exported files. - :type prefix: str - :param container: Required. Container name to export to. - :type container: str - """ - - _validation = { - 'prefix': {'required': True}, - 'container': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'str'}, - } - - def __init__(self, *, prefix: str, container: str, format: str=None, **kwargs) -> None: - super(ExportRDBParameters, self).__init__(**kwargs) - self.format = format - self.prefix = prefix - self.container = container diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_parameters.py deleted file mode 100644 index a41e32f71aae..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_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 ImportRDBParameters(Model): - """Parameters for Redis import operation. - - All required parameters must be populated in order to send to Azure. - - :param format: File format. - :type format: str - :param files: Required. files to import. - :type files: list[str] - """ - - _validation = { - 'files': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'files': {'key': 'files', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(ImportRDBParameters, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.files = kwargs.get('files', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_parameters_py3.py deleted file mode 100644 index 8c077e7fe779..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/import_rdb_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 ImportRDBParameters(Model): - """Parameters for Redis import operation. - - All required parameters must be populated in order to send to Azure. - - :param format: File format. - :type format: str - :param files: Required. files to import. - :type files: list[str] - """ - - _validation = { - 'files': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'files': {'key': 'files', 'type': '[str]'}, - } - - def __init__(self, *, files, format: str=None, **kwargs) -> None: - super(ImportRDBParameters, self).__init__(**kwargs) - self.format = format - self.files = files diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response.py deleted file mode 100644 index 94c031595548..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response.py +++ /dev/null @@ -1,39 +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 NotificationListResponse(Model): - """The response of listUpgradeNotifications. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: List of all notifications. - :type value: list[~azure.mgmt.redis.models.UpgradeNotification] - :ivar next_link: Link for next set of notifications. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NotificationListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response_py3.py deleted file mode 100644 index e24afe3b445b..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/notification_list_response_py3.py +++ /dev/null @@ -1,39 +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 NotificationListResponse(Model): - """The response of listUpgradeNotifications. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param value: List of all notifications. - :type value: list[~azure.mgmt.redis.models.UpgradeNotification] - :ivar next_link: Link for next set of notifications. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(NotificationListResponse, self).__init__(**kwargs) - self.value = value - self.next_link = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation.py deleted file mode 100644 index 954a6c5f9d38..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation.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 Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.redis.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display.py deleted file mode 100644 index d0fde0c4a0b9..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display.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 OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.operation = kwargs.get('operation', None) - self.resource = kwargs.get('resource', None) - self.description = kwargs.get('description', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display_py3.py deleted file mode 100644 index 37858ea03adb..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_display_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 OperationDisplay(Model): - """The object that describes the operation. - - :param provider: Friendly name of the resource provider - :type provider: str - :param operation: Operation type: read, write, delete, listKeys/action, - etc. - :type operation: str - :param resource: Resource type on which the operation is performed. - :type resource: str - :param description: Friendly name of the operation - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, operation: str=None, resource: str=None, description: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.operation = operation - self.resource = resource - self.description = description diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_paged.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_paged.py deleted file mode 100644 index 2f01752d3404..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/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/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_py3.py deleted file mode 100644 index 031e0253a7bd..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/operation_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 Operation(Model): - """REST API operation. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: The object that describes the operation. - :type display: ~azure.mgmt.redis.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource.py deleted file mode 100644 index 012ff087a08b..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource.py +++ /dev/null @@ -1,43 +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 ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource_py3.py deleted file mode 100644 index 63938413f36c..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/proxy_resource_py3.py +++ /dev/null @@ -1,43 +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 ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ProxyResource, self).__init__(**kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys.py deleted file mode 100644 index d3834847addb..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys.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 RedisAccessKeys(Model): - """Redis cache access keys. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The current primary key that clients can use to - authenticate with Redis cache. - :vartype primary_key: str - :ivar secondary_key: The current secondary key that clients can use to - authenticate with Redis cache. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisAccessKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys_py3.py deleted file mode 100644 index b096d23be9a0..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_access_keys_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 RedisAccessKeys(Model): - """Redis cache access keys. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The current primary key that clients can use to - authenticate with Redis cache. - :vartype primary_key: str - :ivar secondary_key: The current secondary key that clients can use to - authenticate with Redis cache. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RedisAccessKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters.py deleted file mode 100644 index fa6342821fe4..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters.py +++ /dev/null @@ -1,87 +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 RedisCreateParameters(Model): - """Parameters supplied to the Create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: Required. The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param subnet_id: The full resource ID of a subnet in a virtual network to - deploy the Redis cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - :type subnet_id: str - :param static_ip: Static IP address. Required when deploying a Redis cache - inside an existing Azure Virtual Network. - :type static_ip: str - :param zones: A list of availability zones denoting where the resource - needs to come from. - :type zones: list[str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'location': {'required': True}, - } - - _attribute_map = { - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RedisCreateParameters, self).__init__(**kwargs) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.sku = kwargs.get('sku', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.static_ip = kwargs.get('static_ip', None) - self.zones = kwargs.get('zones', None) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters_py3.py deleted file mode 100644 index 3e2d65274514..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_create_parameters_py3.py +++ /dev/null @@ -1,87 +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 RedisCreateParameters(Model): - """Parameters supplied to the Create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: Required. The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param subnet_id: The full resource ID of a subnet in a virtual network to - deploy the Redis cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - :type subnet_id: str - :param static_ip: Static IP address. Required when deploying a Redis cache - inside an existing Azure Virtual Network. - :type static_ip: str - :param zones: A list of availability zones denoting where the resource - needs to come from. - :type zones: list[str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'location': {'required': True}, - } - - _attribute_map = { - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, sku, location: str, redis_configuration=None, enable_non_ssl_port: bool=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, subnet_id: str=None, static_ip: str=None, zones=None, tags=None, **kwargs) -> None: - super(RedisCreateParameters, self).__init__(**kwargs) - self.redis_configuration = redis_configuration - self.enable_non_ssl_port = enable_non_ssl_port - self.tenant_settings = tenant_settings - self.shard_count = shard_count - self.minimum_tls_version = minimum_tls_version - self.sku = sku - self.subnet_id = subnet_id - self.static_ip = static_ip - self.zones = zones - self.location = location - self.tags = tags diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule.py deleted file mode 100644 index 7dce7e164a66..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule.py +++ /dev/null @@ -1,55 +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 .proxy_resource import ProxyResource - - -class RedisFirewallRule(ProxyResource): - """A firewall rule on a redis cache has a name, and describes a contiguous - range of IP addresses permitted to connect. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param start_ip: Required. lowest IP address included in the range - :type start_ip: str - :param end_ip: Required. highest IP address included in the range - :type end_ip: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisFirewallRule, self).__init__(**kwargs) - self.start_ip = kwargs.get('start_ip', None) - self.end_ip = kwargs.get('end_ip', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters.py deleted file mode 100644 index e550027f98d3..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters.py +++ /dev/null @@ -1,39 +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 RedisFirewallRuleCreateParameters(Model): - """Parameters required for creating a firewall rule on redis cache. - - All required parameters must be populated in order to send to Azure. - - :param start_ip: Required. lowest IP address included in the range - :type start_ip: str - :param end_ip: Required. highest IP address included in the range - :type end_ip: str - """ - - _validation = { - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisFirewallRuleCreateParameters, self).__init__(**kwargs) - self.start_ip = kwargs.get('start_ip', None) - self.end_ip = kwargs.get('end_ip', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters_py3.py deleted file mode 100644 index c780849f2fcf..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_create_parameters_py3.py +++ /dev/null @@ -1,39 +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 RedisFirewallRuleCreateParameters(Model): - """Parameters required for creating a firewall rule on redis cache. - - All required parameters must be populated in order to send to Azure. - - :param start_ip: Required. lowest IP address included in the range - :type start_ip: str - :param end_ip: Required. highest IP address included in the range - :type end_ip: str - """ - - _validation = { - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__(self, *, start_ip: str, end_ip: str, **kwargs) -> None: - super(RedisFirewallRuleCreateParameters, self).__init__(**kwargs) - self.start_ip = start_ip - self.end_ip = end_ip diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_paged.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_paged.py deleted file mode 100644 index 62eec4d47ecf..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_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 RedisFirewallRulePaged(Paged): - """ - A paging container for iterating over a list of :class:`RedisFirewallRule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RedisFirewallRule]'} - } - - def __init__(self, *args, **kwargs): - - super(RedisFirewallRulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_py3.py deleted file mode 100644 index 3825c8f2e6da..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_firewall_rule_py3.py +++ /dev/null @@ -1,55 +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 .proxy_resource_py3 import ProxyResource - - -class RedisFirewallRule(ProxyResource): - """A firewall rule on a redis cache has a name, and describes a contiguous - range of IP addresses permitted to connect. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param start_ip: Required. lowest IP address included in the range - :type start_ip: str - :param end_ip: Required. highest IP address included in the range - :type end_ip: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__(self, *, start_ip: str, end_ip: str, **kwargs) -> None: - super(RedisFirewallRule, self).__init__(**kwargs) - self.start_ip = start_ip - self.end_ip = end_ip diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response.py deleted file mode 100644 index 53c1a5a81b92..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response.py +++ /dev/null @@ -1,35 +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 RedisForceRebootResponse(Model): - """Response to force reboot for Redis cache. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: Status message - :vartype message: str - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisForceRebootResponse, self).__init__(**kwargs) - self.message = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response_py3.py deleted file mode 100644 index 88e585bb33c4..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_force_reboot_response_py3.py +++ /dev/null @@ -1,35 +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 RedisForceRebootResponse(Model): - """Response to force reboot for Redis cache. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar message: Status message - :vartype message: str - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RedisForceRebootResponse, self).__init__(**kwargs) - self.message = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server.py deleted file mode 100644 index 4f0e1508255f..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server.py +++ /dev/null @@ -1,35 +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 RedisLinkedServer(Model): - """Linked server Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Linked server Id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisLinkedServer, self).__init__(**kwargs) - self.id = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters.py deleted file mode 100644 index efea29185bdf..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters.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 RedisLinkedServerCreateParameters(Model): - """Parameter required for creating a linked server to redis cache. - - All required parameters must be populated in order to send to Azure. - - :param linked_redis_cache_id: Required. Fully qualified resourceId of the - linked redis cache. - :type linked_redis_cache_id: str - :param linked_redis_cache_location: Required. Location of the linked redis - cache. - :type linked_redis_cache_location: str - :param server_role: Required. Role of the linked server. Possible values - include: 'Primary', 'Secondary' - :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - - _validation = { - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - } - - _attribute_map = { - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, - } - - def __init__(self, **kwargs): - super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) - self.linked_redis_cache_id = kwargs.get('linked_redis_cache_id', None) - self.linked_redis_cache_location = kwargs.get('linked_redis_cache_location', None) - self.server_role = kwargs.get('server_role', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters_py3.py deleted file mode 100644 index 8b8d16ae799a..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_create_parameters_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 RedisLinkedServerCreateParameters(Model): - """Parameter required for creating a linked server to redis cache. - - All required parameters must be populated in order to send to Azure. - - :param linked_redis_cache_id: Required. Fully qualified resourceId of the - linked redis cache. - :type linked_redis_cache_id: str - :param linked_redis_cache_location: Required. Location of the linked redis - cache. - :type linked_redis_cache_location: str - :param server_role: Required. Role of the linked server. Possible values - include: 'Primary', 'Secondary' - :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - - _validation = { - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - } - - _attribute_map = { - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, - } - - def __init__(self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role, **kwargs) -> None: - super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) - self.linked_redis_cache_id = linked_redis_cache_id - self.linked_redis_cache_location = linked_redis_cache_location - self.server_role = server_role diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_py3.py deleted file mode 100644 index 2dac0b9ce4fd..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_py3.py +++ /dev/null @@ -1,35 +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 RedisLinkedServer(Model): - """Linked server Id. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Linked server Id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(RedisLinkedServer, self).__init__(**kwargs) - self.id = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties.py deleted file mode 100644 index d4982b6a62d0..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties.py +++ /dev/null @@ -1,68 +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 .proxy_resource import ProxyResource - - -class RedisLinkedServerWithProperties(ProxyResource): - """Response to put/get linked server (with properties) for Redis cache. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param linked_redis_cache_id: Required. Fully qualified resourceId of the - linked redis cache. - :type linked_redis_cache_id: str - :param linked_redis_cache_location: Required. Location of the linked redis - cache. - :type linked_redis_cache_location: str - :param server_role: Required. Role of the linked server. Possible values - include: 'Primary', 'Secondary' - :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole - :ivar provisioning_state: Terminal state of the link between primary and - secondary redis cache. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(RedisLinkedServerWithProperties, self).__init__(**kwargs) - self.linked_redis_cache_id = kwargs.get('linked_redis_cache_id', None) - self.linked_redis_cache_location = kwargs.get('linked_redis_cache_location', None) - self.server_role = kwargs.get('server_role', None) - self.provisioning_state = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_paged.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_paged.py deleted file mode 100644 index c9997c25f9f3..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_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 RedisLinkedServerWithPropertiesPaged(Paged): - """ - A paging container for iterating over a list of :class:`RedisLinkedServerWithProperties ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RedisLinkedServerWithProperties]'} - } - - def __init__(self, *args, **kwargs): - - super(RedisLinkedServerWithPropertiesPaged, self).__init__(*args, **kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_py3.py deleted file mode 100644 index 2dd908e478ea..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_linked_server_with_properties_py3.py +++ /dev/null @@ -1,68 +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 .proxy_resource_py3 import ProxyResource - - -class RedisLinkedServerWithProperties(ProxyResource): - """Response to put/get linked server (with properties) for Redis cache. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param linked_redis_cache_id: Required. Fully qualified resourceId of the - linked redis cache. - :type linked_redis_cache_id: str - :param linked_redis_cache_location: Required. Location of the linked redis - cache. - :type linked_redis_cache_location: str - :param server_role: Required. Role of the linked server. Possible values - include: 'Primary', 'Secondary' - :type server_role: str or ~azure.mgmt.redis.models.ReplicationRole - :ivar provisioning_state: Terminal state of the link between primary and - secondary redis cache. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'ReplicationRole'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, linked_redis_cache_id: str, linked_redis_cache_location: str, server_role, **kwargs) -> None: - super(RedisLinkedServerWithProperties, self).__init__(**kwargs) - self.linked_redis_cache_id = linked_redis_cache_id - self.linked_redis_cache_location = linked_redis_cache_location - self.server_role = server_role - self.provisioning_state = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule.py deleted file mode 100644 index 4c49a4a89927..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule.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 .proxy_resource import ProxyResource - - -class RedisPatchSchedule(ProxyResource): - """Response to put/get patch schedules for Redis cache. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param schedule_entries: Required. List of patch schedules for a Redis - cache. - :type schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schedule_entries': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, - } - - def __init__(self, **kwargs): - super(RedisPatchSchedule, self).__init__(**kwargs) - self.schedule_entries = kwargs.get('schedule_entries', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_paged.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_paged.py deleted file mode 100644 index c5196704d8b8..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_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 RedisPatchSchedulePaged(Paged): - """ - A paging container for iterating over a list of :class:`RedisPatchSchedule ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RedisPatchSchedule]'} - } - - def __init__(self, *args, **kwargs): - - super(RedisPatchSchedulePaged, self).__init__(*args, **kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_py3.py deleted file mode 100644 index a3a72874e8c4..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_patch_schedule_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 .proxy_resource_py3 import ProxyResource - - -class RedisPatchSchedule(ProxyResource): - """Response to put/get patch schedules for Redis cache. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param schedule_entries: Required. List of patch schedules for a Redis - cache. - :type schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schedule_entries': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, - } - - def __init__(self, *, schedule_entries, **kwargs) -> None: - super(RedisPatchSchedule, self).__init__(**kwargs) - self.schedule_entries = schedule_entries diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_parameters.py deleted file mode 100644 index b43bc6f4ad9b..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_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 RedisRebootParameters(Model): - """Specifies which Redis node(s) to reboot. - - All required parameters must be populated in order to send to Azure. - - :param reboot_type: Required. Which Redis node(s) to reboot. Depending on - this value data loss is possible. Possible values include: 'PrimaryNode', - 'SecondaryNode', 'AllNodes' - :type reboot_type: str or ~azure.mgmt.redis.models.RebootType - :param shard_id: If clustering is enabled, the ID of the shard to be - rebooted. - :type shard_id: int - """ - - _validation = { - 'reboot_type': {'required': True}, - } - - _attribute_map = { - 'reboot_type': {'key': 'rebootType', 'type': 'str'}, - 'shard_id': {'key': 'shardId', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(RedisRebootParameters, self).__init__(**kwargs) - self.reboot_type = kwargs.get('reboot_type', None) - self.shard_id = kwargs.get('shard_id', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_parameters_py3.py deleted file mode 100644 index 0a6e741a5b44..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_reboot_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 RedisRebootParameters(Model): - """Specifies which Redis node(s) to reboot. - - All required parameters must be populated in order to send to Azure. - - :param reboot_type: Required. Which Redis node(s) to reboot. Depending on - this value data loss is possible. Possible values include: 'PrimaryNode', - 'SecondaryNode', 'AllNodes' - :type reboot_type: str or ~azure.mgmt.redis.models.RebootType - :param shard_id: If clustering is enabled, the ID of the shard to be - rebooted. - :type shard_id: int - """ - - _validation = { - 'reboot_type': {'required': True}, - } - - _attribute_map = { - 'reboot_type': {'key': 'rebootType', 'type': 'str'}, - 'shard_id': {'key': 'shardId', 'type': 'int'}, - } - - def __init__(self, *, reboot_type, shard_id: int=None, **kwargs) -> None: - super(RedisRebootParameters, self).__init__(**kwargs) - self.reboot_type = reboot_type - self.shard_id = shard_id diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters.py deleted file mode 100644 index 989dedf553f6..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters.py +++ /dev/null @@ -1,35 +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 RedisRegenerateKeyParameters(Model): - """Specifies which Redis access keys to reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The Redis access key to regenerate. Possible - values include: 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.redis.models.RedisKeyType - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'RedisKeyType'}, - } - - def __init__(self, **kwargs): - super(RedisRegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters_py3.py deleted file mode 100644 index a95b676264f7..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_regenerate_key_parameters_py3.py +++ /dev/null @@ -1,35 +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 RedisRegenerateKeyParameters(Model): - """Specifies which Redis access keys to reset. - - All required parameters must be populated in order to send to Azure. - - :param key_type: Required. The Redis access key to regenerate. Possible - values include: 'Primary', 'Secondary' - :type key_type: str or ~azure.mgmt.redis.models.RedisKeyType - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'RedisKeyType'}, - } - - def __init__(self, *, key_type, **kwargs) -> None: - super(RedisRegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = key_type diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource.py deleted file mode 100644 index 50892f16123d..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource.py +++ /dev/null @@ -1,140 +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 RedisResource(TrackedResource): - """A single Redis item in List or Get Operation. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: Required. The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param subnet_id: The full resource ID of a subnet in a virtual network to - deploy the Redis cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - :type subnet_id: str - :param static_ip: Static IP address. Required when deploying a Redis cache - inside an existing Azure Virtual Network. - :type static_ip: str - :ivar redis_version: Redis version. - :vartype redis_version: str - :ivar provisioning_state: Redis instance provisioning status. Possible - values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', - 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', - 'Unlinking', 'Unprovisioning', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.redis.models.ProvisioningState - :ivar host_name: Redis host name. - :vartype host_name: str - :ivar port: Redis non-SSL port. - :vartype port: int - :ivar ssl_port: Redis SSL port. - :vartype ssl_port: int - :ivar access_keys: The keys of the Redis cache - not set if this object is - not the response to Create or Update redis cache - :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys - :ivar linked_servers: List of the linked servers associated with the cache - :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] - :param zones: A list of availability zones denoting where the resource - needs to come from. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'redis_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_name': {'readonly': True}, - 'port': {'readonly': True}, - 'ssl_port': {'readonly': True}, - 'access_keys': {'readonly': True}, - 'linked_servers': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, - 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, - 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(RedisResource, self).__init__(**kwargs) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.sku = kwargs.get('sku', None) - self.subnet_id = kwargs.get('subnet_id', None) - self.static_ip = kwargs.get('static_ip', None) - self.redis_version = None - self.provisioning_state = None - self.host_name = None - self.port = None - self.ssl_port = None - self.access_keys = None - self.linked_servers = None - self.zones = kwargs.get('zones', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_paged.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_paged.py deleted file mode 100644 index b356a1a0296e..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_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 RedisResourcePaged(Paged): - """ - A paging container for iterating over a list of :class:`RedisResource ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[RedisResource]'} - } - - def __init__(self, *args, **kwargs): - - super(RedisResourcePaged, self).__init__(*args, **kwargs) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_py3.py deleted file mode 100644 index f255542bb7ba..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_resource_py3.py +++ /dev/null @@ -1,140 +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 RedisResource(TrackedResource): - """A single Redis item in List or Get Operation. - - 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 id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: Required. The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param subnet_id: The full resource ID of a subnet in a virtual network to - deploy the Redis cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1 - :type subnet_id: str - :param static_ip: Static IP address. Required when deploying a Redis cache - inside an existing Azure Virtual Network. - :type static_ip: str - :ivar redis_version: Redis version. - :vartype redis_version: str - :ivar provisioning_state: Redis instance provisioning status. Possible - values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', - 'Provisioning', 'RecoveringScaleFailure', 'Scaling', 'Succeeded', - 'Unlinking', 'Unprovisioning', 'Updating' - :vartype provisioning_state: str or - ~azure.mgmt.redis.models.ProvisioningState - :ivar host_name: Redis host name. - :vartype host_name: str - :ivar port: Redis non-SSL port. - :vartype port: int - :ivar ssl_port: Redis SSL port. - :vartype ssl_port: int - :ivar access_keys: The keys of the Redis cache - not set if this object is - not the response to Create or Update redis cache - :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys - :ivar linked_servers: List of the linked servers associated with the cache - :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] - :param zones: A list of availability zones denoting where the resource - needs to come from. - :type zones: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'redis_version': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'host_name': {'readonly': True}, - 'port': {'readonly': True}, - 'ssl_port': {'readonly': True}, - 'access_keys': {'readonly': True}, - 'linked_servers': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, - 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, - 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - } - - def __init__(self, *, location: str, sku, tags=None, redis_configuration=None, enable_non_ssl_port: bool=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, subnet_id: str=None, static_ip: str=None, zones=None, **kwargs) -> None: - super(RedisResource, self).__init__(tags=tags, location=location, **kwargs) - self.redis_configuration = redis_configuration - self.enable_non_ssl_port = enable_non_ssl_port - self.tenant_settings = tenant_settings - self.shard_count = shard_count - self.minimum_tls_version = minimum_tls_version - self.sku = sku - self.subnet_id = subnet_id - self.static_ip = static_ip - self.redis_version = None - self.provisioning_state = None - self.host_name = None - self.port = None - self.ssl_port = None - self.access_keys = None - self.linked_servers = None - self.zones = zones diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters.py deleted file mode 100644 index dbdb5941733e..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters.py +++ /dev/null @@ -1,58 +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 RedisUpdateParameters(Model): - """Parameters supplied to the Update Redis operation. - - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(RedisUpdateParameters, self).__init__(**kwargs) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.sku = kwargs.get('sku', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py deleted file mode 100644 index 89b7a30e037f..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/redis_update_parameters_py3.py +++ /dev/null @@ -1,58 +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 RedisUpdateParameters(Model): - """Parameters supplied to the Update Redis operation. - - :param redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :type redis_configuration: dict[str, str] - :param enable_non_ssl_port: Specifies whether the non-ssl Redis server - port (6379) is enabled. - :type enable_non_ssl_port: bool - :param tenant_settings: A dictionary of tenant settings - :type tenant_settings: dict[str, str] - :param shard_count: The number of shards to be created on a Premium - Cluster Cache. - :type shard_count: int - :param minimum_tls_version: Optional: requires clients to use a specified - TLS version (or higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible - values include: '1.0', '1.1', '1.2' - :type minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :param sku: The SKU of the Redis cache to deploy. - :type sku: ~azure.mgmt.redis.models.Sku - :param tags: Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': '{str}'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, redis_configuration=None, enable_non_ssl_port: bool=None, tenant_settings=None, shard_count: int=None, minimum_tls_version=None, sku=None, tags=None, **kwargs) -> None: - super(RedisUpdateParameters, self).__init__(**kwargs) - self.redis_configuration = redis_configuration - self.enable_non_ssl_port = enable_non_ssl_port - self.tenant_settings = tenant_settings - self.shard_count = shard_count - self.minimum_tls_version = minimum_tls_version - self.sku = sku - self.tags = tags diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource.py deleted file mode 100644 index 9706b9c2a5fa..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource.py +++ /dev/null @@ -1,45 +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 Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :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/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource_py3.py deleted file mode 100644 index 3fb7e9f8a2b0..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/resource_py3.py +++ /dev/null @@ -1,45 +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 Resource definition. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :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/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry.py deleted file mode 100644 index 9121b5ed67a9..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry.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 ScheduleEntry(Model): - """Patch schedule entry for a Premium Redis Cache. - - All required parameters must be populated in order to send to Azure. - - :param day_of_week: Required. Day of the week when a cache can be patched. - Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', - 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' - :type day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek - :param start_hour_utc: Required. Start hour after which cache patching can - start. - :type start_hour_utc: int - :param maintenance_window: ISO8601 timespan specifying how much time cache - patching can take. - :type maintenance_window: timedelta - """ - - _validation = { - 'day_of_week': {'required': True}, - 'start_hour_utc': {'required': True}, - } - - _attribute_map = { - 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, - 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, - 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, - } - - def __init__(self, **kwargs): - super(ScheduleEntry, self).__init__(**kwargs) - self.day_of_week = kwargs.get('day_of_week', None) - self.start_hour_utc = kwargs.get('start_hour_utc', None) - self.maintenance_window = kwargs.get('maintenance_window', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry_py3.py deleted file mode 100644 index 1819b1faacff..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry_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 ScheduleEntry(Model): - """Patch schedule entry for a Premium Redis Cache. - - All required parameters must be populated in order to send to Azure. - - :param day_of_week: Required. Day of the week when a cache can be patched. - Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', - 'Friday', 'Saturday', 'Sunday', 'Everyday', 'Weekend' - :type day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek - :param start_hour_utc: Required. Start hour after which cache patching can - start. - :type start_hour_utc: int - :param maintenance_window: ISO8601 timespan specifying how much time cache - patching can take. - :type maintenance_window: timedelta - """ - - _validation = { - 'day_of_week': {'required': True}, - 'start_hour_utc': {'required': True}, - } - - _attribute_map = { - 'day_of_week': {'key': 'dayOfWeek', 'type': 'DayOfWeek'}, - 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, - 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, - } - - def __init__(self, *, day_of_week, start_hour_utc: int, maintenance_window=None, **kwargs) -> None: - super(ScheduleEntry, self).__init__(**kwargs) - self.day_of_week = day_of_week - self.start_hour_utc = start_hour_utc - self.maintenance_window = maintenance_window diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku.py deleted file mode 100644 index 528e638372ac..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku.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 msrest.serialization import Model - - -class Sku(Model): - """SKU parameters supplied to the create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The type of Redis cache to deploy. Valid values: - (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', - 'Premium' - :type name: str or ~azure.mgmt.redis.models.SkuName - :param family: Required. The SKU family to use. Valid values: (C, P). (C = - Basic/Standard, P = Premium). Possible values include: 'C', 'P' - :type family: str or ~azure.mgmt.redis.models.SkuFamily - :param capacity: Required. The size of the Redis cache to deploy. Valid - values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P - (Premium) family (1, 2, 3, 4). - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - 'family': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.family = kwargs.get('family', None) - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku_py3.py deleted file mode 100644 index 0710a4ae474b..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/sku_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 msrest.serialization import Model - - -class Sku(Model): - """SKU parameters supplied to the create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The type of Redis cache to deploy. Valid values: - (Basic, Standard, Premium). Possible values include: 'Basic', 'Standard', - 'Premium' - :type name: str or ~azure.mgmt.redis.models.SkuName - :param family: Required. The SKU family to use. Valid values: (C, P). (C = - Basic/Standard, P = Premium). Possible values include: 'C', 'P' - :type family: str or ~azure.mgmt.redis.models.SkuFamily - :param capacity: Required. The size of the Redis cache to deploy. Valid - values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P - (Premium) family (1, 2, 3, 4). - :type capacity: int - """ - - _validation = { - 'name': {'required': True}, - 'family': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__(self, *, name, family, capacity: int, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - self.family = family - self.capacity = capacity diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/tracked_resource.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/tracked_resource.py deleted file mode 100644 index 7895c56cc28b..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/tracked_resource_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/tracked_resource_py3.py deleted file mode 100644 index 399c8104ccbb..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/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. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, location: str, tags=None, **kwargs) -> None: - super(TrackedResource, self).__init__(**kwargs) - self.tags = tags - self.location = location diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification.py deleted file mode 100644 index 2c15877908ec..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification.py +++ /dev/null @@ -1,45 +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 UpgradeNotification(Model): - """Properties of upgrade notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of upgrade notification. - :vartype name: str - :ivar timestamp: Timestamp when upgrade notification occurred. - :vartype timestamp: datetime - :ivar upsell_notification: Details about this upgrade notification - :vartype upsell_notification: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'upsell_notification': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(UpgradeNotification, self).__init__(**kwargs) - self.name = None - self.timestamp = None - self.upsell_notification = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification_py3.py deleted file mode 100644 index dd1fd8c3066d..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/upgrade_notification_py3.py +++ /dev/null @@ -1,45 +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 UpgradeNotification(Model): - """Properties of upgrade notification. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of upgrade notification. - :vartype name: str - :ivar timestamp: Timestamp when upgrade notification occurred. - :vartype timestamp: datetime - :ivar upsell_notification: Details about this upgrade notification - :vartype upsell_notification: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'upsell_notification': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, - } - - def __init__(self, **kwargs) -> None: - super(UpgradeNotification, self).__init__(**kwargs) - self.name = None - self.timestamp = None - self.upsell_notification = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/__init__.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/__init__.py index 0429554e8abc..11b9d4d15725 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/__init__.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/__init__.py @@ -9,11 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .redis_operations import RedisOperations -from .firewall_rules_operations import FirewallRulesOperations -from .patch_schedules_operations import PatchSchedulesOperations -from .linked_server_operations import LinkedServerOperations +from ._operations import Operations +from ._redis_operations import RedisOperations +from ._firewall_rules_operations import FirewallRulesOperations +from ._patch_schedules_operations import PatchSchedulesOperations +from ._linked_server_operations import LinkedServerOperations __all__ = [ 'Operations', diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/firewall_rules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py similarity index 96% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/firewall_rules_operations.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py index dc8ad9ba54ae..75af00d09455 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/firewall_rules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py @@ -19,11 +19,13 @@ class FirewallRulesOperations(object): """FirewallRulesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2019-07-01-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2019-07-01-preview" self.config = config @@ -55,8 +57,7 @@ def list_by_redis_resource( ~azure.mgmt.redis.models.RedisFirewallRulePaged[~azure.mgmt.redis.models.RedisFirewallRule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_redis_resource.metadata['url'] @@ -87,6 +88,11 @@ 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]: @@ -97,12 +103,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RedisFirewallRulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RedisFirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RedisFirewallRulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_redis_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules'} @@ -171,7 +175,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisFirewallRule', response) if response.status_code == 201: @@ -238,7 +241,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisFirewallRule', response) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/linked_server_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py similarity index 96% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/linked_server_operations.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py index ced93d5094a8..359df8595dfe 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/linked_server_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py @@ -21,11 +21,13 @@ class LinkedServerOperations(object): """LinkedServerOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2019-07-01-preview". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2019-07-01-preview" self.config = config @@ -262,7 +264,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisLinkedServerWithProperties', response) @@ -292,8 +293,7 @@ def list( ~azure.mgmt.redis.models.RedisLinkedServerWithPropertiesPaged[~azure.mgmt.redis.models.RedisLinkedServerWithProperties] :raises: :class:`CloudError` """ - 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'] @@ -324,6 +324,11 @@ 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]: @@ -334,12 +339,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RedisLinkedServerWithPropertiesPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RedisLinkedServerWithPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RedisLinkedServerWithPropertiesPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers'} diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py similarity index 87% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/operations.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py index 064b8a11bd8b..dd93a8c34c46 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py @@ -19,11 +19,13 @@ 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. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2019-07-01-preview". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2019-07-01-preview" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.redis.models.OperationPaged[~azure.mgmt.redis.models.Operation] :raises: :class:`CloudError` """ - 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,6 +79,11 @@ 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]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): 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.Cache/operations'} diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/patch_schedules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py similarity index 96% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/patch_schedules_operations.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py index 17b4d1a7de85..840e50a7f051 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/patch_schedules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py @@ -19,11 +19,13 @@ class PatchSchedulesOperations(object): """PatchSchedulesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2019-07-01-preview". :ivar default: Default string modeled as parameter for auto generation to work correctly. Constant value: "default". """ @@ -34,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2019-07-01-preview" self.default = "default" self.config = config @@ -58,8 +60,7 @@ def list_by_redis_resource( ~azure.mgmt.redis.models.RedisPatchSchedulePaged[~azure.mgmt.redis.models.RedisPatchSchedule] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_redis_resource.metadata['url'] @@ -90,6 +91,11 @@ 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]: @@ -100,12 +106,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RedisPatchSchedulePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RedisPatchSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RedisPatchSchedulePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_redis_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/patchSchedules'} @@ -171,7 +175,6 @@ def create_or_update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisPatchSchedule', response) if response.status_code == 201: @@ -290,7 +293,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisPatchSchedule', response) diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/redis_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py similarity index 98% rename from sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/redis_operations.py rename to sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py index ad59bee4c081..7e5087e8febc 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/redis_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py @@ -21,11 +21,13 @@ class RedisOperations(object): """RedisOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2018-03-01". + :ivar api_version: Client Api Version. Constant value: "2019-07-01-preview". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-03-01" + self.api_version = "2019-07-01-preview" self.config = config @@ -152,7 +154,6 @@ def list_upgrade_notifications( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('NotificationListResponse', response) @@ -323,7 +324,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisResource', response) @@ -464,7 +464,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisResource', response) @@ -491,8 +490,7 @@ def list_by_resource_group( ~azure.mgmt.redis.models.RedisResourcePaged[~azure.mgmt.redis.models.RedisResource] :raises: :class:`CloudError` """ - 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'] @@ -522,6 +520,11 @@ 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]: @@ -532,12 +535,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis'} @@ -556,8 +557,7 @@ def list( ~azure.mgmt.redis.models.RedisResourcePaged[~azure.mgmt.redis.models.RedisResource] :raises: :class:`CloudError` """ - 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'] @@ -586,6 +586,11 @@ 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]: @@ -596,12 +601,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.RedisResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis'} @@ -658,7 +661,6 @@ def list_keys( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisAccessKeys', response) @@ -730,7 +732,6 @@ def regenerate_key( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisAccessKeys', response) @@ -806,7 +807,6 @@ def force_reboot( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('RedisForceRebootResponse', response) diff --git a/sdk/redis/azure-mgmt-redis/setup.py b/sdk/redis/azure-mgmt-redis/setup.py index e9f9148f8e99..32a32ecea714 100644 --- a/sdk/redis/azure-mgmt-redis/setup.py +++ b/sdk/redis/azure-mgmt-redis/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', @@ -63,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',