class OCI::Database::Models::MaintenanceRunSummary
Details of a maintenance run.
Constants
- LIFECYCLE_STATE_ENUM
- MAINTENANCE_SUBTYPE_ENUM
- MAINTENANCE_TYPE_ENUM
- PATCHING_MODE_ENUM
- TARGET_RESOURCE_TYPE_ENUM
Attributes
[Required] The OCID of the compartment. @return [String]
Description of the maintenance run. @return [String]
[Required] The user-friendly name for the maintenance run. @return [String]
[Required] The OCID of the maintenance run. @return [String]
Additional information about the current lifecycle state. @return [String]
[Required] The current state of the maintenance run. For Autonomous Database
on shared Exadata infrastructure, valid states are IN_PROGRESS, SUCCEEDED and FAILED.
@return [String]
Maintenance sub-type. @return [String]
Maintenance type. @return [String]
Contain the patch failure count. @return [Integer]
The unique identifier of the patch. The identifier string includes the patch type, the Oracle Database
version, and the patch creation date (using the format YYMMDD). For example, the identifier `ru_patch_19.9.0.0_201030` is used for an RU patch for Oracle Database
19.9.0.0 that was released October 30, 2020. @return [String]
Cloud Exadata infrastructure node patching method, either "ROLLING" or "NONROLLING". Default value is ROLLING.
IMPORTANT: Non-rolling infrastructure patching involves system down time. See [Oracle-Managed Infrastructure Maintenance Updates](docs.cloud.oracle.com/iaas/Content/Database/Concepts/examaintenance.htm#Oracle) for more information.
@return [String]
The [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the maintenance run for the Autonomous Data Guard association's peer container database. @return [String]
The ID of the target resource on which the maintenance run occurs. @return [String]
The type of the target resource on which the maintenance run occurs. @return [String]
The date and time the maintenance run was completed. @return [DateTime]
[Required] The date and time the maintenance run is scheduled to occur. @return [DateTime]
The date and time the maintenance run starts. @return [DateTime]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/database/models/maintenance_run_summary.rb, line 130 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', 'patch_id': :'patchId', 'maintenance_subtype': :'maintenanceSubtype', 'peer_maintenance_run_id': :'peerMaintenanceRunId', 'patching_mode': :'patchingMode', 'patch_failure_count': :'patchFailureCount' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [String] :id The value to assign to the {#id} property @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property @option attributes [String] :display_name The value to assign to the {#display_name} property @option attributes [String] :description The value to assign to the {#description} property @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property @option attributes [String] :lifecycle_details The value to assign to the {#lifecycle_details} property @option attributes [DateTime] :time_scheduled The value to assign to the {#time_scheduled} property @option attributes [DateTime] :time_started The value to assign to the {#time_started} property @option attributes [DateTime] :time_ended The value to assign to the {#time_ended} property @option attributes [String] :target_resource_type The value to assign to the {#target_resource_type} property @option attributes [String] :target_resource_id The value to assign to the {#target_resource_id} property @option attributes [String] :maintenance_type The value to assign to the {#maintenance_type} property @option attributes [String] :patch_id The value to assign to the {#patch_id} property @option attributes [String] :maintenance_subtype The value to assign to the {#maintenance_subtype} property @option attributes [String] :peer_maintenance_run_id The value to assign to the {#peer_maintenance_run_id} property @option attributes [String] :patching_mode The value to assign to the {#patching_mode} property @option attributes [Integer] :patch_failure_count The value to assign to the {#patch_failure_count} property
# File lib/oci/database/models/maintenance_run_summary.rb, line 202 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.patch_id = attributes[:'patchId'] if attributes[:'patchId'] raise 'You cannot provide both :patchId and :patch_id' if attributes.key?(:'patchId') && attributes.key?(:'patch_id') self.patch_id = attributes[:'patch_id'] if attributes[:'patch_id'] 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'] self.peer_maintenance_run_id = attributes[:'peerMaintenanceRunId'] if attributes[:'peerMaintenanceRunId'] raise 'You cannot provide both :peerMaintenanceRunId and :peer_maintenance_run_id' if attributes.key?(:'peerMaintenanceRunId') && attributes.key?(:'peer_maintenance_run_id') self.peer_maintenance_run_id = attributes[:'peer_maintenance_run_id'] if attributes[:'peer_maintenance_run_id'] self.patching_mode = attributes[:'patchingMode'] if attributes[:'patchingMode'] raise 'You cannot provide both :patchingMode and :patching_mode' if attributes.key?(:'patchingMode') && attributes.key?(:'patching_mode') self.patching_mode = attributes[:'patching_mode'] if attributes[:'patching_mode'] self.patch_failure_count = attributes[:'patchFailureCount'] if attributes[:'patchFailureCount'] raise 'You cannot provide both :patchFailureCount and :patch_failure_count' if attributes.key?(:'patchFailureCount') && attributes.key?(:'patch_failure_count') self.patch_failure_count = attributes[:'patch_failure_count'] if attributes[:'patch_failure_count'] end
Attribute type mapping.
# File lib/oci/database/models/maintenance_run_summary.rb, line 155 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', 'patch_id': :'String', 'maintenance_subtype': :'String', 'peer_maintenance_run_id': :'String', 'patching_mode': :'String', 'patch_failure_count': :'Integer' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/database/models/maintenance_run_summary.rb, line 375 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 && patch_id == other.patch_id && maintenance_subtype == other.maintenance_subtype && peer_maintenance_run_id == other.peer_maintenance_run_id && patching_mode == other.patching_mode && patch_failure_count == other.patch_failure_count end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/database/models/maintenance_run_summary.rb, line 421 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
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/database/models/maintenance_run_summary.rb, line 401 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/database/models/maintenance_run_summary.rb, line 410 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, patch_id, maintenance_subtype, peer_maintenance_run_id, patching_mode, patch_failure_count].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] lifecycle_state
Object
to be assigned
# File lib/oci/database/models/maintenance_run_summary.rb, line 307 def lifecycle_state=(lifecycle_state) # rubocop:disable Style/ConditionalAssignment if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state) OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE else @lifecycle_state = lifecycle_state end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] maintenance_subtype
Object
to be assigned
# File lib/oci/database/models/maintenance_run_summary.rb, line 346 def maintenance_subtype=(maintenance_subtype) # rubocop:disable Style/ConditionalAssignment if maintenance_subtype && !MAINTENANCE_SUBTYPE_ENUM.include?(maintenance_subtype) OCI.logger.debug("Unknown value for 'maintenance_subtype' [" + maintenance_subtype + "]. Mapping to 'MAINTENANCE_SUBTYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger @maintenance_subtype = MAINTENANCE_SUBTYPE_UNKNOWN_ENUM_VALUE else @maintenance_subtype = maintenance_subtype end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] maintenance_type
Object
to be assigned
# File lib/oci/database/models/maintenance_run_summary.rb, line 333 def maintenance_type=(maintenance_type) # rubocop:disable Style/ConditionalAssignment if maintenance_type && !MAINTENANCE_TYPE_ENUM.include?(maintenance_type) OCI.logger.debug("Unknown value for 'maintenance_type' [" + maintenance_type + "]. Mapping to 'MAINTENANCE_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger @maintenance_type = MAINTENANCE_TYPE_UNKNOWN_ENUM_VALUE else @maintenance_type = maintenance_type end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] patching_mode
Object
to be assigned
# File lib/oci/database/models/maintenance_run_summary.rb, line 359 def patching_mode=(patching_mode) # rubocop:disable Style/ConditionalAssignment if patching_mode && !PATCHING_MODE_ENUM.include?(patching_mode) OCI.logger.debug("Unknown value for 'patching_mode' [" + patching_mode + "]. Mapping to 'PATCHING_MODE_UNKNOWN_ENUM_VALUE'") if OCI.logger @patching_mode = PATCHING_MODE_UNKNOWN_ENUM_VALUE else @patching_mode = patching_mode end # rubocop:enable Style/ConditionalAssignment end
Custom attribute writer method checking allowed values (enum). @param [Object] target_resource_type
Object
to be assigned
# File lib/oci/database/models/maintenance_run_summary.rb, line 320 def target_resource_type=(target_resource_type) # rubocop:disable Style/ConditionalAssignment if target_resource_type && !TARGET_RESOURCE_TYPE_ENUM.include?(target_resource_type) OCI.logger.debug("Unknown value for 'target_resource_type' [" + target_resource_type + "]. Mapping to 'TARGET_RESOURCE_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger @target_resource_type = TARGET_RESOURCE_TYPE_UNKNOWN_ENUM_VALUE else @target_resource_type = target_resource_type end # rubocop:enable Style/ConditionalAssignment end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/database/models/maintenance_run_summary.rb, line 454 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/database/models/maintenance_run_summary.rb, line 448 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/database/models/maintenance_run_summary.rb, line 471 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end