Class: OCI::Mysql::Models::UpdateMaintenanceDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::UpdateMaintenanceDetails
- Defined in:
- lib/oci/mysql/models/update_maintenance_details.rb
Overview
The Maintenance Policy for the DB System or Read Replica that this model is included in.
Constant Summary collapse
- VERSION_PREFERENCE_ENUM =
[ VERSION_PREFERENCE_OLDEST = 'OLDEST'.freeze, VERSION_PREFERENCE_SECOND_NEWEST = 'SECOND_NEWEST'.freeze, VERSION_PREFERENCE_NEWEST = 'NEWEST'.freeze ].freeze
- VERSION_TRACK_PREFERENCE_ENUM =
[ VERSION_TRACK_PREFERENCE_LONG_TERM_SUPPORT = 'LONG_TERM_SUPPORT'.freeze, VERSION_TRACK_PREFERENCE_INNOVATION = 'INNOVATION'.freeze, VERSION_TRACK_PREFERENCE_FOLLOW = 'FOLLOW'.freeze ].freeze
- MAINTENANCE_SCHEDULE_TYPE_ENUM =
[ MAINTENANCE_SCHEDULE_TYPE_EARLY = 'EARLY'.freeze, MAINTENANCE_SCHEDULE_TYPE_REGULAR = 'REGULAR'.freeze ].freeze
Instance Attribute Summary collapse
-
#maintenance_disabled_windows ⇒ Array<OCI::Mysql::Models::MaintenanceDisabledWindow>
Time window during which downtime-inducing maintenance shall not be performed.
-
#maintenance_schedule_type ⇒ String
The maintenance schedule type of the DB system.
-
#version_preference ⇒ String
The preferred version to target when performing an automatic MySQL upgrade.
-
#version_track_preference ⇒ String
The preferred version track to target when performing an automatic MySQL upgrade.
-
#window_start_time ⇒ String
The start of the 2 hour maintenance window.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateMaintenanceDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ UpdateMaintenanceDetails
Initializes the object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 111 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.window_start_time = attributes[:'windowStartTime'] if attributes[:'windowStartTime'] raise 'You cannot provide both :windowStartTime and :window_start_time' if attributes.key?(:'windowStartTime') && attributes.key?(:'window_start_time') self.window_start_time = attributes[:'window_start_time'] if attributes[:'window_start_time'] self.version_preference = attributes[:'versionPreference'] if attributes[:'versionPreference'] self.version_preference = "OLDEST" if version_preference.nil? && !attributes.key?(:'versionPreference') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :versionPreference and :version_preference' if attributes.key?(:'versionPreference') && attributes.key?(:'version_preference') self.version_preference = attributes[:'version_preference'] if attributes[:'version_preference'] self.version_preference = "OLDEST" if version_preference.nil? && !attributes.key?(:'versionPreference') && !attributes.key?(:'version_preference') # rubocop:disable Style/StringLiterals self.version_track_preference = attributes[:'versionTrackPreference'] if attributes[:'versionTrackPreference'] self.version_track_preference = "FOLLOW" if version_track_preference.nil? && !attributes.key?(:'versionTrackPreference') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :versionTrackPreference and :version_track_preference' if attributes.key?(:'versionTrackPreference') && attributes.key?(:'version_track_preference') self.version_track_preference = attributes[:'version_track_preference'] if attributes[:'version_track_preference'] self.version_track_preference = "FOLLOW" if version_track_preference.nil? && !attributes.key?(:'versionTrackPreference') && !attributes.key?(:'version_track_preference') # rubocop:disable Style/StringLiterals self.maintenance_schedule_type = attributes[:'maintenanceScheduleType'] if attributes[:'maintenanceScheduleType'] self.maintenance_schedule_type = "REGULAR" if maintenance_schedule_type.nil? && !attributes.key?(:'maintenanceScheduleType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :maintenanceScheduleType and :maintenance_schedule_type' if attributes.key?(:'maintenanceScheduleType') && attributes.key?(:'maintenance_schedule_type') self.maintenance_schedule_type = attributes[:'maintenance_schedule_type'] if attributes[:'maintenance_schedule_type'] self.maintenance_schedule_type = "REGULAR" if maintenance_schedule_type.nil? && !attributes.key?(:'maintenanceScheduleType') && !attributes.key?(:'maintenance_schedule_type') # rubocop:disable Style/StringLiterals self.maintenance_disabled_windows = attributes[:'maintenanceDisabledWindows'] if attributes[:'maintenanceDisabledWindows'] raise 'You cannot provide both :maintenanceDisabledWindows and :maintenance_disabled_windows' if attributes.key?(:'maintenanceDisabledWindows') && attributes.key?(:'maintenance_disabled_windows') self.maintenance_disabled_windows = attributes[:'maintenance_disabled_windows'] if attributes[:'maintenance_disabled_windows'] end |
Instance Attribute Details
#maintenance_disabled_windows ⇒ Array<OCI::Mysql::Models::MaintenanceDisabledWindow>
Time window during which downtime-inducing maintenance shall not be performed. Downtime-free maintenance may be performed to apply required security patches. At most one configured window is supported.
72 73 74 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 72 def maintenance_disabled_windows @maintenance_disabled_windows end |
#maintenance_schedule_type ⇒ String
The maintenance schedule type of the DB system. Defaults to REGULAR. EARLY: Maintenance schedule follows a cycle where upgrades are performed when versions become deprecated. REGULAR: Maintenance schedule follows the normal cycle where upgrades are performed when versions become unavailable.
65 66 67 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 65 def maintenance_schedule_type @maintenance_schedule_type end |
#version_preference ⇒ String
The preferred version to target when performing an automatic MySQL upgrade. Defaults to OLDEST.
OLDEST: Choose the oldest available MySQL version based on the current version of the DB System. SECOND_NEWEST: Choose the MySQL version before the newest for auto-upgrade. NEWEST: Choose the latest and greatest MySQL version available for auto-upgrade.
50 51 52 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 50 def version_preference @version_preference end |
#version_track_preference ⇒ String
The preferred version track to target when performing an automatic MySQL upgrade. Defaults to FOLLOW. LONG_TERM_SUPPORT: No MySQL database behavior changes. INNOVATION: Provides access to the latest features and all bug fixes. FOLLOW: Follows the track of the current MySQL version.
58 59 60 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 58 def version_track_preference @version_track_preference end |
#window_start_time ⇒ String
The start of the 2 hour maintenance window.
This string is of the format: "day-of-week time-of-day".
"day-of-week" is a case-insensitive string like "mon", "tue", &c.
"time-of-day" is the "Time" portion of an RFC3339-formatted timestamp. Any second or sub-second time data will be truncated to zero.
If you set the read replica maintenance window to "", the read replica is set same as the DB system maintenance window. If not specific by the user, there will be no changes to the maintenace window.
41 42 43 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 41 def window_start_time @window_start_time end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 75 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'window_start_time': :'windowStartTime', 'version_preference': :'versionPreference', 'version_track_preference': :'versionTrackPreference', 'maintenance_schedule_type': :'maintenanceScheduleType', 'maintenance_disabled_windows': :'maintenanceDisabledWindows' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 88 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'window_start_time': :'String', 'version_preference': :'String', 'version_track_preference': :'String', 'maintenance_schedule_type': :'String', 'maintenance_disabled_windows': :'Array<OCI::Mysql::Models::MaintenanceDisabledWindow>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 185 def ==(other) return true if equal?(other) self.class == other.class && window_start_time == other.window_start_time && version_preference == other.version_preference && version_track_preference == other.version_track_preference && maintenance_schedule_type == other.maintenance_schedule_type && maintenance_disabled_windows == other.maintenance_disabled_windows end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 219 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
199 200 201 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 199 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
208 209 210 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 208 def hash [window_start_time, version_preference, version_track_preference, maintenance_schedule_type, maintenance_disabled_windows].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
252 253 254 255 256 257 258 259 260 261 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 252 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
246 247 248 |
# File 'lib/oci/mysql/models/update_maintenance_details.rb', line 246 def to_s to_hash.to_s end |