Class: OCI::FusionApps::Models::FamilyMaintenancePolicy
- Inherits:
-
Object
- Object
- OCI::FusionApps::Models::FamilyMaintenancePolicy
- Defined in:
- lib/oci/fusion_apps/models/family_maintenance_policy.rb
Overview
The policy that specifies the maintenance and upgrade preferences for an environment. For more information about the options, see Understanding Environment Maintenance.
Constant Summary collapse
- CONCURRENT_MAINTENANCE_ENUM =
[ CONCURRENT_MAINTENANCE_PROD = 'PROD'.freeze, CONCURRENT_MAINTENANCE_NON_PROD = 'NON_PROD'.freeze, CONCURRENT_MAINTENANCE_DISABLED = 'DISABLED'.freeze, CONCURRENT_MAINTENANCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#concurrent_maintenance ⇒ String
Option to upgrade both production and non-production environments at the same time.
-
#is_monthly_patching_enabled ⇒ BOOLEAN
When True, monthly patching is enabled for the environment family.
-
#quarterly_upgrade_begin_times ⇒ String
The quarterly maintenance month group schedule of the Fusion environment family.
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 = {}) ⇒ FamilyMaintenancePolicy
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 = {}) ⇒ FamilyMaintenancePolicy
Initializes the object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 62 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.quarterly_upgrade_begin_times = attributes[:'quarterlyUpgradeBeginTimes'] if attributes[:'quarterlyUpgradeBeginTimes'] raise 'You cannot provide both :quarterlyUpgradeBeginTimes and :quarterly_upgrade_begin_times' if attributes.key?(:'quarterlyUpgradeBeginTimes') && attributes.key?(:'quarterly_upgrade_begin_times') self.quarterly_upgrade_begin_times = attributes[:'quarterly_upgrade_begin_times'] if attributes[:'quarterly_upgrade_begin_times'] self.is_monthly_patching_enabled = attributes[:'isMonthlyPatchingEnabled'] unless attributes[:'isMonthlyPatchingEnabled'].nil? self.is_monthly_patching_enabled = false if is_monthly_patching_enabled.nil? && !attributes.key?(:'isMonthlyPatchingEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isMonthlyPatchingEnabled and :is_monthly_patching_enabled' if attributes.key?(:'isMonthlyPatchingEnabled') && attributes.key?(:'is_monthly_patching_enabled') self.is_monthly_patching_enabled = attributes[:'is_monthly_patching_enabled'] unless attributes[:'is_monthly_patching_enabled'].nil? self.is_monthly_patching_enabled = false if is_monthly_patching_enabled.nil? && !attributes.key?(:'isMonthlyPatchingEnabled') && !attributes.key?(:'is_monthly_patching_enabled') # rubocop:disable Style/StringLiterals self.concurrent_maintenance = attributes[:'concurrentMaintenance'] if attributes[:'concurrentMaintenance'] self.concurrent_maintenance = "DISABLED" if concurrent_maintenance.nil? && !attributes.key?(:'concurrentMaintenance') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :concurrentMaintenance and :concurrent_maintenance' if attributes.key?(:'concurrentMaintenance') && attributes.key?(:'concurrent_maintenance') self.concurrent_maintenance = attributes[:'concurrent_maintenance'] if attributes[:'concurrent_maintenance'] self.concurrent_maintenance = "DISABLED" if concurrent_maintenance.nil? && !attributes.key?(:'concurrentMaintenance') && !attributes.key?(:'concurrent_maintenance') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#concurrent_maintenance ⇒ String
Option to upgrade both production and non-production environments at the same time. When set to PROD both types of environnments are upgraded on the production schedule. When set to NON_PROD both types of environments are upgraded on the non-production schedule.
29 30 31 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 29 def concurrent_maintenance @concurrent_maintenance end |
#is_monthly_patching_enabled ⇒ BOOLEAN
When True, monthly patching is enabled for the environment family.
25 26 27 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 25 def is_monthly_patching_enabled @is_monthly_patching_enabled end |
#quarterly_upgrade_begin_times ⇒ String
The quarterly maintenance month group schedule of the Fusion environment family.
21 22 23 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 21 def quarterly_upgrade_begin_times @quarterly_upgrade_begin_times end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
32 33 34 35 36 37 38 39 40 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 32 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'quarterly_upgrade_begin_times': :'quarterlyUpgradeBeginTimes', 'is_monthly_patching_enabled': :'isMonthlyPatchingEnabled', 'concurrent_maintenance': :'concurrentMaintenance' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
43 44 45 46 47 48 49 50 51 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 43 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'quarterly_upgrade_begin_times': :'String', 'is_monthly_patching_enabled': :'BOOLEAN', 'concurrent_maintenance': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
111 112 113 114 115 116 117 118 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 111 def ==(other) return true if equal?(other) self.class == other.class && quarterly_upgrade_begin_times == other.quarterly_upgrade_begin_times && is_monthly_patching_enabled == other.is_monthly_patching_enabled && concurrent_maintenance == other.concurrent_maintenance end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 143 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
123 124 125 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 123 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
132 133 134 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 132 def hash [quarterly_upgrade_begin_times, is_monthly_patching_enabled, concurrent_maintenance].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 176 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
170 171 172 |
# File 'lib/oci/fusion_apps/models/family_maintenance_policy.rb', line 170 def to_s to_hash.to_s end |