Class: OCI::Mysql::Models::MaintenanceDetails
- Inherits:
-
Object
- Object
- OCI::Mysql::Models::MaintenanceDetails
- Defined in:
- lib/oci/mysql/models/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, VERSION_PREFERENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.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, VERSION_TRACK_PREFERENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MAINTENANCE_SCHEDULE_TYPE_ENUM =
[ MAINTENANCE_SCHEDULE_TYPE_EARLY = 'EARLY'.freeze, MAINTENANCE_SCHEDULE_TYPE_REGULAR = 'REGULAR'.freeze, MAINTENANCE_SCHEDULE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.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.
-
#target_version ⇒ String
The version that is expected to be targeted during the next scheduled maintenance run.
-
#time_scheduled ⇒ DateTime
The time the scheduled maintenance is expected to start, as described by RFC 3339.
-
#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 time of the 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 = {}) ⇒ MaintenanceDetails
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 = {}) ⇒ MaintenanceDetails
Initializes the object
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 131 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'] 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_track_preference = attributes[:'versionTrackPreference'] if attributes[:'versionTrackPreference'] 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.maintenance_schedule_type = attributes[:'maintenanceScheduleType'] if attributes[:'maintenanceScheduleType'] 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.time_scheduled = attributes[:'timeScheduled'] if attributes[:'timeScheduled'] raise 'You cannot provide both :timeScheduled and :time_scheduled' if attributes.key?(:'timeScheduled') && attributes.key?(:'time_scheduled') self.time_scheduled = attributes[:'time_scheduled'] if attributes[:'time_scheduled'] self.target_version = attributes[:'targetVersion'] if attributes[:'targetVersion'] raise 'You cannot provide both :targetVersion and :target_version' if attributes.key?(:'targetVersion') && attributes.key?(:'target_version') self.target_version = attributes[:'target_version'] if attributes[:'target_version'] 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.
86 87 88 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 86 def maintenance_disabled_windows @maintenance_disabled_windows end |
#maintenance_schedule_type ⇒ String
The maintenance schedule type of the DB system. 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.
68 69 70 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 68 def maintenance_schedule_type @maintenance_schedule_type end |
#target_version ⇒ String
The version that is expected to be targeted during the next scheduled maintenance run.
79 80 81 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 79 def target_version @target_version end |
#time_scheduled ⇒ DateTime
The time the scheduled maintenance is expected to start, as described by RFC 3339.
74 75 76 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 74 def time_scheduled @time_scheduled end |
#version_preference ⇒ String
The preferred version to target when performing an automatic MySQL upgrade.
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.
53 54 55 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 53 def version_preference @version_preference end |
#version_track_preference ⇒ String
The preferred version track to target when performing an automatic MySQL upgrade. 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.
61 62 63 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 61 def version_track_preference @version_track_preference end |
#window_start_time ⇒ String
The start time of the 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 "" or if not specified, the read replica is set same as the DB system maintenance window.
44 45 46 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 44 def window_start_time @window_start_time end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 89 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'window_start_time': :'windowStartTime', 'version_preference': :'versionPreference', 'version_track_preference': :'versionTrackPreference', 'maintenance_schedule_type': :'maintenanceScheduleType', 'time_scheduled': :'timeScheduled', 'target_version': :'targetVersion', 'maintenance_disabled_windows': :'maintenanceDisabledWindows' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 104 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'window_start_time': :'String', 'version_preference': :'String', 'version_track_preference': :'String', 'maintenance_schedule_type': :'String', 'time_scheduled': :'DateTime', 'target_version': :'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.
226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 226 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 && time_scheduled == other.time_scheduled && target_version == other.target_version && maintenance_disabled_windows == other.maintenance_disabled_windows end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 262 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
242 243 244 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 242 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
251 252 253 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 251 def hash [window_start_time, version_preference, version_track_preference, maintenance_schedule_type, time_scheduled, target_version, maintenance_disabled_windows].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
295 296 297 298 299 300 301 302 303 304 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 295 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
289 290 291 |
# File 'lib/oci/mysql/models/maintenance_details.rb', line 289 def to_s to_hash.to_s end |