Class: OCI::FleetSoftwareUpdate::Models::FsuCollectionTarget
- Inherits:
-
Object
- Object
- OCI::FleetSoftwareUpdate::Models::FsuCollectionTarget
- Defined in:
- lib/oci/fleet_software_update/models/fsu_collection_target.rb
Overview
Details of a target member of a Exadata Fleet Update Collection.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_IDLE = 'IDLE'.freeze, STATUS_EXECUTING_JOB = 'EXECUTING_JOB'.freeze, STATUS_JOB_FAILED = 'JOB_FAILED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#active_fsu_cycle_id ⇒ String
Active Exadata Fleet Update Cycle OCID.
-
#current_version ⇒ String
Current version of the target.
-
#executing_fsu_job_id ⇒ String
Exadata Fleet Update Job OCID executing an action in the target.
- #progress ⇒ OCI::FleetSoftwareUpdate::Models::TargetProgressSummary
-
#status ⇒ String
Status of the target in the Exadata Fleet Update Collection.
-
#target ⇒ OCI::FleetSoftwareUpdate::Models::TargetDetails
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 = {}) ⇒ FsuCollectionTarget
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 = {}) ⇒ FsuCollectionTarget
Initializes the object
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 87 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.target = attributes[:'target'] if attributes[:'target'] self.current_version = attributes[:'currentVersion'] if attributes[:'currentVersion'] raise 'You cannot provide both :currentVersion and :current_version' if attributes.key?(:'currentVersion') && attributes.key?(:'current_version') self.current_version = attributes[:'current_version'] if attributes[:'current_version'] self.status = attributes[:'status'] if attributes[:'status'] self.executing_fsu_job_id = attributes[:'executingFsuJobId'] if attributes[:'executingFsuJobId'] raise 'You cannot provide both :executingFsuJobId and :executing_fsu_job_id' if attributes.key?(:'executingFsuJobId') && attributes.key?(:'executing_fsu_job_id') self.executing_fsu_job_id = attributes[:'executing_fsu_job_id'] if attributes[:'executing_fsu_job_id'] self.active_fsu_cycle_id = attributes[:'activeFsuCycleId'] if attributes[:'activeFsuCycleId'] raise 'You cannot provide both :activeFsuCycleId and :active_fsu_cycle_id' if attributes.key?(:'activeFsuCycleId') && attributes.key?(:'active_fsu_cycle_id') self.active_fsu_cycle_id = attributes[:'active_fsu_cycle_id'] if attributes[:'active_fsu_cycle_id'] self.progress = attributes[:'progress'] if attributes[:'progress'] end |
Instance Attribute Details
#active_fsu_cycle_id ⇒ String
Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member.
42 43 44 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 42 def active_fsu_cycle_id @active_fsu_cycle_id end |
#current_version ⇒ String
Current version of the target.
27 28 29 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 27 def current_version @current_version end |
#executing_fsu_job_id ⇒ String
Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed.
37 38 39 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 37 def executing_fsu_job_id @executing_fsu_job_id end |
#progress ⇒ OCI::FleetSoftwareUpdate::Models::TargetProgressSummary
45 46 47 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 45 def progress @progress end |
#status ⇒ String
Status of the target in the Exadata Fleet Update Collection.
32 33 34 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 32 def status @status end |
#target ⇒ OCI::FleetSoftwareUpdate::Models::TargetDetails
This attribute is required.
22 23 24 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 22 def target @target end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'target': :'target', 'current_version': :'currentVersion', 'status': :'status', 'executing_fsu_job_id': :'executingFsuJobId', 'active_fsu_cycle_id': :'activeFsuCycleId', 'progress': :'progress' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 62 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'target': :'OCI::FleetSoftwareUpdate::Models::TargetDetails', 'current_version': :'String', 'status': :'String', 'executing_fsu_job_id': :'String', 'active_fsu_cycle_id': :'String', 'progress': :'OCI::FleetSoftwareUpdate::Models::TargetProgressSummary' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 138 def ==(other) return true if equal?(other) self.class == other.class && target == other.target && current_version == other.current_version && status == other.status && executing_fsu_job_id == other.executing_fsu_job_id && active_fsu_cycle_id == other.active_fsu_cycle_id && progress == other.progress end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 173 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
153 154 155 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 153 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
162 163 164 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 162 def hash [target, current_version, status, executing_fsu_job_id, active_fsu_cycle_id, progress].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 206 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
200 201 202 |
# File 'lib/oci/fleet_software_update/models/fsu_collection_target.rb', line 200 def to_s to_hash.to_s end |