Class: OCI::Database::Models::ExecutionActionMember

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/execution_action_member.rb

Overview

The action member details.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ExecutionActionMember

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :member_order (Integer)

    The value to assign to the #member_order property

  • :member_id (String)

    The value to assign to the #member_id property

  • :status (String)

    The value to assign to the #status property

  • :estimated_time_in_mins (Integer)

    The value to assign to the #estimated_time_in_mins property

  • :total_time_taken_in_mins (Integer)

    The value to assign to the #total_time_taken_in_mins property



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/database/models/execution_action_member.rb', line 78

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

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

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

  self.member_id = attributes[:'memberId'] if attributes[:'memberId']

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

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

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

  self.estimated_time_in_mins = attributes[:'estimatedTimeInMins'] if attributes[:'estimatedTimeInMins']

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

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

  self.total_time_taken_in_mins = attributes[:'totalTimeTakenInMins'] if attributes[:'totalTimeTakenInMins']

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

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

Instance Attribute Details

#estimated_time_in_minsInteger

The estimated time of the execution action member in minutes.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/database/models/execution_action_member.rb', line 35

def estimated_time_in_mins
  @estimated_time_in_mins
end

#member_idString

[Required] The OCID of the parent resource the execution action belongs to.

Returns:

  • (String)


18
19
20
# File 'lib/oci/database/models/execution_action_member.rb', line 18

def member_id
  @member_id
end

#member_orderInteger

[Required] The priority order of the execution action member.

Returns:

  • (Integer)


14
15
16
# File 'lib/oci/database/models/execution_action_member.rb', line 14

def member_order
  @member_order
end

#statusString

The current status of the execution action member. Valid states are SCHEDULED, IN_PROGRESS, FAILED, CANCELED, DURATION_EXCEEDED, RESCHEDULED and COMPLETED. enum: - SCHEDULED - IN_PROGRESS - FAILED - CANCELED - DURATION_EXCEEDED - RESCHEDULED - SUCCEEDED

Returns:

  • (String)


31
32
33
# File 'lib/oci/database/models/execution_action_member.rb', line 31

def status
  @status
end

#total_time_taken_in_minsInteger

The total time taken by corresponding resource activity in minutes.

Returns:

  • (Integer)


39
40
41
# File 'lib/oci/database/models/execution_action_member.rb', line 39

def total_time_taken_in_mins
  @total_time_taken_in_mins
end

Class Method Details

.attribute_mapObject

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



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/oci/database/models/execution_action_member.rb', line 42

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'member_order': :'memberOrder',
    'member_id': :'memberId',
    'status': :'status',
    'estimated_time_in_mins': :'estimatedTimeInMins',
    'total_time_taken_in_mins': :'totalTimeTakenInMins'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



55
56
57
58
59
60
61
62
63
64
65
# File 'lib/oci/database/models/execution_action_member.rb', line 55

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'member_order': :'Integer',
    'member_id': :'String',
    'status': :'String',
    'estimated_time_in_mins': :'Integer',
    'total_time_taken_in_mins': :'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/database/models/execution_action_member.rb', line 118

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

  self.class == other.class &&
    member_order == other.member_order &&
    member_id == other.member_id &&
    status == other.status &&
    estimated_time_in_mins == other.estimated_time_in_mins &&
    total_time_taken_in_mins == other.total_time_taken_in_mins
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/database/models/execution_action_member.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/database/models/execution_action_member.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/database/models/execution_action_member.rb', line 141

def hash
  [member_order, member_id, status, estimated_time_in_mins, total_time_taken_in_mins].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/database/models/execution_action_member.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/database/models/execution_action_member.rb', line 179

def to_s
  to_hash.to_s
end