1# coding=utf-8 2# -------------------------------------------------------------------------- 3# Copyright (c) Microsoft Corporation. All rights reserved. 4# Licensed under the MIT License. See License.txt in the project root for license information. 5# Code generated by Microsoft (R) AutoRest Code Generator. 6# Changes may cause incorrect behavior and will be lost if the code is regenerated. 7# -------------------------------------------------------------------------- 8 9from enum import Enum, EnumMeta 10from six import with_metaclass 11 12class _CaseInsensitiveEnumMeta(EnumMeta): 13 def __getitem__(self, name): 14 return super().__getitem__(name.upper()) 15 16 def __getattr__(cls, name): 17 """Return the enum member matching `name` 18 We use __getattr__ instead of descriptors or inserting into the enum 19 class' __dict__ in order to support `name` and `value` being both 20 properties for enum members (which live in the class' __dict__) and 21 enum members themselves. 22 """ 23 try: 24 return cls._member_map_[name.upper()] 25 except KeyError: 26 raise AttributeError(name) 27 28 29class ConfigurationSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 30 """Source of the configuration. 31 """ 32 33 SYSTEM_DEFAULT = "system-default" 34 USER_OVERRIDE = "user-override" 35 36class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 37 """The type of identity that created the resource. 38 """ 39 40 USER = "User" 41 APPLICATION = "Application" 42 MANAGED_IDENTITY = "ManagedIdentity" 43 KEY = "Key" 44 45class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 46 """The mode to create a new MySQL server. 47 """ 48 49 DEFAULT = "Default" 50 POINT_IN_TIME_RESTORE = "PointInTimeRestore" 51 REPLICA = "Replica" 52 GEO_RESTORE = "GeoRestore" 53 54class EnableStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 55 """Enum to indicate whether value is 'Enabled' or 'Disabled' 56 """ 57 58 ENABLED = "Enabled" 59 DISABLED = "Disabled" 60 61class HighAvailabilityMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 62 """High availability mode for a server. 63 """ 64 65 ENABLED = "Enabled" 66 DISABLED = "Disabled" 67 ZONE_REDUNDANT = "ZoneRedundant" 68 SAME_ZONE = "SameZone" 69 70class HighAvailabilityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 71 """The state of server high availability. 72 """ 73 74 NOT_ENABLED = "NotEnabled" 75 CREATING_STANDBY = "CreatingStandby" 76 HEALTHY = "Healthy" 77 FAILING_OVER = "FailingOver" 78 REMOVING_STANDBY = "RemovingStandby" 79 80class IsConfigPendingRestart(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 81 """If is the configuration pending restart or not. 82 """ 83 84 TRUE = "True" 85 FALSE = "False" 86 87class IsDynamicConfig(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 88 """If is the configuration dynamic. 89 """ 90 91 TRUE = "True" 92 FALSE = "False" 93 94class IsReadOnly(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 95 """If is the configuration read only. 96 """ 97 98 TRUE = "True" 99 FALSE = "False" 100 101class ReplicationRole(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 102 """The replication role. 103 """ 104 105 NONE = "None" 106 SOURCE = "Source" 107 REPLICA = "Replica" 108 109class ServerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 110 """The state of a server. 111 """ 112 113 READY = "Ready" 114 DROPPING = "Dropping" 115 DISABLED = "Disabled" 116 STARTING = "Starting" 117 STOPPING = "Stopping" 118 STOPPED = "Stopped" 119 UPDATING = "Updating" 120 121class ServerVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 122 """The version of a server. 123 """ 124 125 FIVE7 = "5.7" 126 EIGHT0_21 = "8.0.21" 127 128class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 129 """The tier of the particular SKU, e.g. GeneralPurpose. 130 """ 131 132 BURSTABLE = "Burstable" 133 GENERAL_PURPOSE = "GeneralPurpose" 134 MEMORY_OPTIMIZED = "MemoryOptimized" 135