Class: OCI::FleetSoftwareUpdate::Models::FsuActionProgressDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/fleet_software_update/models/fsu_action_progress_details.rb

Overview

Progress of the Action in execution. If the Exadata Fleet Update Action has not started yet, this will be omitted.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ FsuActionProgressDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :in_progress_targets (Integer)

    The value to assign to the #in_progress_targets property

  • :completed_targets (Integer)

    The value to assign to the #completed_targets property

  • :failed_targets (Integer)

    The value to assign to the #failed_targets property

  • :waiting_targets (Integer)

    The value to assign to the #waiting_targets property

  • :total_targets (Integer)

    The value to assign to the #total_targets property



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
103
104
105
106
107
108
109
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 74

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.in_progress_targets = attributes[:'inProgressTargets'] if attributes[:'inProgressTargets']

  raise 'You cannot provide both :inProgressTargets and :in_progress_targets' if attributes.key?(:'inProgressTargets') && attributes.key?(:'in_progress_targets')

  self.in_progress_targets = attributes[:'in_progress_targets'] if attributes[:'in_progress_targets']

  self.completed_targets = attributes[:'completedTargets'] if attributes[:'completedTargets']

  raise 'You cannot provide both :completedTargets and :completed_targets' if attributes.key?(:'completedTargets') && attributes.key?(:'completed_targets')

  self.completed_targets = attributes[:'completed_targets'] if attributes[:'completed_targets']

  self.failed_targets = attributes[:'failedTargets'] if attributes[:'failedTargets']

  raise 'You cannot provide both :failedTargets and :failed_targets' if attributes.key?(:'failedTargets') && attributes.key?(:'failed_targets')

  self.failed_targets = attributes[:'failed_targets'] if attributes[:'failed_targets']

  self.waiting_targets = attributes[:'waitingTargets'] if attributes[:'waitingTargets']

  raise 'You cannot provide both :waitingTargets and :waiting_targets' if attributes.key?(:'waitingTargets') && attributes.key?(:'waiting_targets')

  self.waiting_targets = attributes[:'waiting_targets'] if attributes[:'waiting_targets']

  self.total_targets = attributes[:'totalTargets'] if attributes[:'totalTargets']

  raise 'You cannot provide both :totalTargets and :total_targets' if attributes.key?(:'totalTargets') && attributes.key?(:'total_targets')

  self.total_targets = attributes[:'total_targets'] if attributes[:'total_targets']
end

Instance Attribute Details

#completed_targetsInteger

Number of targets with completed jobs.

Returns:

  • (Integer)


20
21
22
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 20

def completed_targets
  @completed_targets
end

#failed_targetsInteger

Number of targets with failed jobs.

Returns:

  • (Integer)


25
26
27
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 25

def failed_targets
  @failed_targets
end

#in_progress_targetsInteger

Number of targets with jobs in progress.

Returns:

  • (Integer)


15
16
17
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 15

def in_progress_targets
  @in_progress_targets
end

#total_targetsInteger

Total number of targets impacted by Exadata Fleet Update Action.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 35

def total_targets
  @total_targets
end

#waiting_targetsInteger

Number of targets with jobs waiting for batch to execute or for user to resume.

Returns:

  • (Integer)


30
31
32
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 30

def waiting_targets
  @waiting_targets
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 38

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'in_progress_targets': :'inProgressTargets',
    'completed_targets': :'completedTargets',
    'failed_targets': :'failedTargets',
    'waiting_targets': :'waitingTargets',
    'total_targets': :'totalTargets'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 51

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'in_progress_targets': :'Integer',
    'completed_targets': :'Integer',
    'failed_targets': :'Integer',
    'waiting_targets': :'Integer',
    'total_targets': :'Integer'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



118
119
120
121
122
123
124
125
126
127
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 118

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    in_progress_targets == other.in_progress_targets &&
    completed_targets == other.completed_targets &&
    failed_targets == other.failed_targets &&
    waiting_targets == other.waiting_targets &&
    total_targets == other.total_targets
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 152

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


132
133
134
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 132

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



141
142
143
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 141

def hash
  [in_progress_targets, completed_targets, failed_targets, waiting_targets, total_targets].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



185
186
187
188
189
190
191
192
193
194
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 185

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



179
180
181
# File 'lib/oci/fleet_software_update/models/fsu_action_progress_details.rb', line 179

def to_s
  to_hash.to_s
end