Class: OCI::Database::Models::MaintenanceRunSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::MaintenanceRunSummary
- Defined in:
- lib/oci/database/models/maintenance_run_summary.rb
Overview
Details of a Maintenance Run.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_SCHEDULED = 'SCHEDULED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_SKIPPED = 'SKIPPED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- TARGET_RESOURCE_TYPE_ENUM =
[ TARGET_RESOURCE_TYPE_AUTONOMOUS_EXADATA_INFRASTRUCTURE = 'AUTONOMOUS_EXADATA_INFRASTRUCTURE'.freeze, TARGET_RESOURCE_TYPE_AUTONOMOUS_CONTAINER_DATABASE = 'AUTONOMOUS_CONTAINER_DATABASE'.freeze, TARGET_RESOURCE_TYPE_EXADATA_DB_SYSTEM = 'EXADATA_DB_SYSTEM'.freeze, TARGET_RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MAINTENANCE_TYPE_ENUM =
[ MAINTENANCE_TYPE_PLANNED = 'PLANNED'.freeze, MAINTENANCE_TYPE_UNPLANNED = 'UNPLANNED'.freeze, MAINTENANCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MAINTENANCE_SUBTYPE_ENUM =
[ MAINTENANCE_SUBTYPE_QUARTERLY = 'QUARTERLY'.freeze, MAINTENANCE_SUBTYPE_HARDWARE = 'HARDWARE'.freeze, MAINTENANCE_SUBTYPE_CRITICAL = 'CRITICAL'.freeze, MAINTENANCE_SUBTYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
-
#description ⇒ String
The text describing this Maintenance Run.
-
#display_name ⇒ String
[Required] The user-friendly name for the Maintenance Run.
-
#id ⇒ String
[Required] The OCID of the Maintenance Run.
-
#lifecycle_details ⇒ String
Additional information about the current lifecycleState.
-
#lifecycle_state ⇒ String
[Required] The current state of the Maintenance Run.
-
#maintenance_subtype ⇒ String
Maintenance sub-type.
-
#maintenance_type ⇒ String
Maintenance type.
-
#target_resource_id ⇒ String
The ID of the target resource on which the Maintenance Run occurs.
-
#target_resource_type ⇒ String
The type of the target resource on which the Maintenance Run occurs.
-
#time_ended ⇒ DateTime
The date and time the Maintenance Run was completed.
-
#time_scheduled ⇒ DateTime
[Required] The date and time the Maintenance Run is scheduled for.
-
#time_started ⇒ DateTime
The date and time the Maintenance Run starts.
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 = {}) ⇒ MaintenanceRunSummary
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 = {}) ⇒ MaintenanceRunSummary
Initializes the object
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 157 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.id = attributes[:'id'] if attributes[:'id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] 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.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted'] raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started') self.time_started = attributes[:'time_started'] if attributes[:'time_started'] self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded'] raise 'You cannot provide both :timeEnded and :time_ended' if attributes.key?(:'timeEnded') && attributes.key?(:'time_ended') self.time_ended = attributes[:'time_ended'] if attributes[:'time_ended'] self.target_resource_type = attributes[:'targetResourceType'] if attributes[:'targetResourceType'] raise 'You cannot provide both :targetResourceType and :target_resource_type' if attributes.key?(:'targetResourceType') && attributes.key?(:'target_resource_type') self.target_resource_type = attributes[:'target_resource_type'] if attributes[:'target_resource_type'] self.target_resource_id = attributes[:'targetResourceId'] if attributes[:'targetResourceId'] raise 'You cannot provide both :targetResourceId and :target_resource_id' if attributes.key?(:'targetResourceId') && attributes.key?(:'target_resource_id') self.target_resource_id = attributes[:'target_resource_id'] if attributes[:'target_resource_id'] self.maintenance_type = attributes[:'maintenanceType'] if attributes[:'maintenanceType'] raise 'You cannot provide both :maintenanceType and :maintenance_type' if attributes.key?(:'maintenanceType') && attributes.key?(:'maintenance_type') self.maintenance_type = attributes[:'maintenance_type'] if attributes[:'maintenance_type'] self.maintenance_subtype = attributes[:'maintenanceSubtype'] if attributes[:'maintenanceSubtype'] raise 'You cannot provide both :maintenanceSubtype and :maintenance_subtype' if attributes.key?(:'maintenanceSubtype') && attributes.key?(:'maintenance_subtype') self.maintenance_subtype = attributes[:'maintenance_subtype'] if attributes[:'maintenance_subtype'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] The OCID of the compartment.
50 51 52 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 50 def compartment_id @compartment_id end |
#description ⇒ String
The text describing this Maintenance Run.
58 59 60 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 58 def description @description end |
#display_name ⇒ String
[Required] The user-friendly name for the Maintenance Run.
54 55 56 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 54 def display_name @display_name end |
#id ⇒ String
[Required] The OCID of the Maintenance Run.
46 47 48 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 46 def id @id end |
#lifecycle_details ⇒ String
Additional information about the current lifecycleState.
66 67 68 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 66 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the Maintenance Run.
62 63 64 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 62 def lifecycle_state @lifecycle_state end |
#maintenance_subtype ⇒ String
Maintenance sub-type.
94 95 96 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 94 def maintenance_subtype @maintenance_subtype end |
#maintenance_type ⇒ String
Maintenance type.
90 91 92 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 90 def maintenance_type @maintenance_type end |
#target_resource_id ⇒ String
The ID of the target resource on which the Maintenance Run occurs.
86 87 88 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 86 def target_resource_id @target_resource_id end |
#target_resource_type ⇒ String
The type of the target resource on which the Maintenance Run occurs.
82 83 84 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 82 def target_resource_type @target_resource_type end |
#time_ended ⇒ DateTime
The date and time the Maintenance Run was completed.
78 79 80 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 78 def time_ended @time_ended end |
#time_scheduled ⇒ DateTime
[Required] The date and time the Maintenance Run is scheduled for.
70 71 72 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 70 def time_scheduled @time_scheduled end |
#time_started ⇒ DateTime
The date and time the Maintenance Run starts.
74 75 76 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 74 def time_started @time_started end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 97 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'description': :'description', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_scheduled': :'timeScheduled', 'time_started': :'timeStarted', 'time_ended': :'timeEnded', 'target_resource_type': :'targetResourceType', 'target_resource_id': :'targetResourceId', 'maintenance_type': :'maintenanceType', 'maintenance_subtype': :'maintenanceSubtype' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 118 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'display_name': :'String', 'description': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_scheduled': :'DateTime', 'time_started': :'DateTime', 'time_ended': :'DateTime', 'target_resource_type': :'String', 'target_resource_id': :'String', 'maintenance_type': :'String', 'maintenance_subtype': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 293 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && display_name == other.display_name && description == other.description && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && time_scheduled == other.time_scheduled && time_started == other.time_started && time_ended == other.time_ended && target_resource_type == other.target_resource_type && target_resource_id == other.target_resource_id && maintenance_type == other.maintenance_type && maintenance_subtype == other.maintenance_subtype end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 335 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
315 316 317 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 315 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
324 325 326 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 324 def hash [id, compartment_id, display_name, description, lifecycle_state, lifecycle_details, time_scheduled, time_started, time_ended, target_resource_type, target_resource_id, maintenance_type, maintenance_subtype].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
368 369 370 371 372 373 374 375 376 377 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 368 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
362 363 364 |
# File 'lib/oci/database/models/maintenance_run_summary.rb', line 362 def to_s to_hash.to_s end |