Class: OCI::Database::Models::ManagedSoftwareUpdatePreferenceDetails
- Inherits:
-
Object
- Object
- OCI::Database::Models::ManagedSoftwareUpdatePreferenceDetails
- Defined in:
- lib/oci/database/models/managed_software_update_preference_details.rb
Overview
Oracle Managed Database Software Updates schedule will be created based on the provided update preferences
Constant Summary collapse
- UPDATE_MODE_ENUM =
[ UPDATE_MODE_ROLLING = 'ROLLING'.freeze, UPDATE_MODE_NONROLLING = 'NONROLLING'.freeze, UPDATE_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#days_of_week ⇒ Array<OCI::Database::Models::ManagedSoftwareUpdateDayOfWeek>
[Required] The update should be applied on the database for the selected days of the week.
-
#hour_of_day ⇒ Integer
[Required] The update should be applied on the database for the selected hour of the day.
-
#update_mode ⇒ String
Oracle Managed Database Software update method, either "ROLLING" or "NONROLLING".
-
#version_scheme_details ⇒ OCI::Database::Models::VersionSchemeDetails
This attribute is required.
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 = {}) ⇒ ManagedSoftwareUpdatePreferenceDetails
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 = {}) ⇒ ManagedSoftwareUpdatePreferenceDetails
Initializes the object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 73 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.days_of_week = attributes[:'daysOfWeek'] if attributes[:'daysOfWeek'] raise 'You cannot provide both :daysOfWeek and :days_of_week' if attributes.key?(:'daysOfWeek') && attributes.key?(:'days_of_week') self.days_of_week = attributes[:'days_of_week'] if attributes[:'days_of_week'] self.hour_of_day = attributes[:'hourOfDay'] if attributes[:'hourOfDay'] raise 'You cannot provide both :hourOfDay and :hour_of_day' if attributes.key?(:'hourOfDay') && attributes.key?(:'hour_of_day') self.hour_of_day = attributes[:'hour_of_day'] if attributes[:'hour_of_day'] self.update_mode = attributes[:'updateMode'] if attributes[:'updateMode'] raise 'You cannot provide both :updateMode and :update_mode' if attributes.key?(:'updateMode') && attributes.key?(:'update_mode') self.update_mode = attributes[:'update_mode'] if attributes[:'update_mode'] self.version_scheme_details = attributes[:'versionSchemeDetails'] if attributes[:'versionSchemeDetails'] raise 'You cannot provide both :versionSchemeDetails and :version_scheme_details' if attributes.key?(:'versionSchemeDetails') && attributes.key?(:'version_scheme_details') self.version_scheme_details = attributes[:'version_scheme_details'] if attributes[:'version_scheme_details'] end |
Instance Attribute Details
#days_of_week ⇒ Array<OCI::Database::Models::ManagedSoftwareUpdateDayOfWeek>
[Required] The update should be applied on the database for the selected days of the week.
22 23 24 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 22 def days_of_week @days_of_week end |
#hour_of_day ⇒ Integer
[Required] The update should be applied on the database for the selected hour of the day.
27 28 29 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 27 def hour_of_day @hour_of_day end |
#update_mode ⇒ String
Oracle Managed Database Software update method, either "ROLLING" or "NONROLLING". Default value is ROLLING. IMPORTANT: Non-rolling Database Software update update involves system down time.
33 34 35 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 33 def update_mode @update_mode end |
#version_scheme_details ⇒ OCI::Database::Models::VersionSchemeDetails
This attribute is required.
37 38 39 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 37 def version_scheme_details @version_scheme_details end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 40 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'days_of_week': :'daysOfWeek', 'hour_of_day': :'hourOfDay', 'update_mode': :'updateMode', 'version_scheme_details': :'versionSchemeDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'days_of_week': :'Array<OCI::Database::Models::ManagedSoftwareUpdateDayOfWeek>', 'hour_of_day': :'Integer', 'update_mode': :'String', 'version_scheme_details': :'OCI::Database::Models::VersionSchemeDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 132 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 124 def ==(other) return true if equal?(other) self.class == other.class && days_of_week == other.days_of_week && hour_of_day == other.hour_of_day && update_mode == other.update_mode && version_scheme_details == other.version_scheme_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 157 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
137 138 139 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 137 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
146 147 148 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 146 def hash [days_of_week, hour_of_day, update_mode, version_scheme_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 190 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
184 185 186 |
# File 'lib/oci/database/models/managed_software_update_preference_details.rb', line 184 def to_s to_hash.to_s end |