Class: OCI::FleetAppsManagement::Models::ActionGroupDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/fleet_apps_management/models/action_group_details.rb

Overview

Action Group details. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class

Direct Known Subclasses

FleetBasedActionGroupDetails

Constant Summary collapse

KIND_ENUM =
[
  KIND_FLEET_USING_RUNBOOK = 'FLEET_USING_RUNBOOK'.freeze,
  KIND_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
STATUS_ENUM =
[
  STATUS_ACCEPTED = 'ACCEPTED'.freeze,
  STATUS_WAITING = 'WAITING'.freeze,
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  STATUS_CANCELED = 'CANCELED'.freeze,
  STATUS_SKIPPED = 'SKIPPED'.freeze,
  STATUS_IGNORED = 'IGNORED'.freeze,
  STATUS_NOT_APPLICABLE = 'NOT_APPLICABLE'.freeze,
  STATUS_ABORTED = 'ABORTED'.freeze,
  STATUS_TIMED_OUT = 'TIMED_OUT'.freeze,
  STATUS_PAUSED = 'PAUSED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ActionGroupDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :display_name (String)

    The value to assign to the #display_name property

  • :kind (String)

    The value to assign to the #kind property

  • :product (String)

    The value to assign to the #product property

  • :lifecycle_operation (String)

    The value to assign to the #lifecycle_operation property

  • :activity_id (String)

    The value to assign to the #activity_id property

  • :status (String)

    The value to assign to the #status property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_ended (DateTime)

    The value to assign to the #time_ended property



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 129

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

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

  self.lifecycle_operation = attributes[:'lifecycleOperation'] if attributes[:'lifecycleOperation']

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

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

  self.activity_id = attributes[:'activityId'] if attributes[:'activityId']

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

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

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

  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']
end

Instance Attribute Details

#activity_idString

Unique producer Id at Action Group Level

Returns:

  • (String)


54
55
56
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 54

def activity_id
  @activity_id
end

#display_nameString

Name of the ActionGroup.

Returns:

  • (String)


36
37
38
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 36

def display_name
  @display_name
end

#kindString

[Required] Action Group kind

Returns:

  • (String)


40
41
42
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 40

def kind
  @kind
end

#lifecycle_operationString

LifeCycle Operation.

Returns:

  • (String)


50
51
52
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 50

def lifecycle_operation
  @lifecycle_operation
end

#productString

Product associated. Only applicable if actionGroup type is PRODUCT.

Returns:

  • (String)


46
47
48
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 46

def product
  @product
end

#statusString

Status of the Job at Action Group Level.

Returns:

  • (String)


58
59
60
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 58

def status
  @status
end

#time_endedDateTime

The time the Scheduler Job ended. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


66
67
68
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 66

def time_ended
  @time_ended
end

#time_startedDateTime

The time the Scheduler Job started. An RFC3339 formatted datetime string.

Returns:

  • (DateTime)


62
63
64
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 62

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 69

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'kind': :'kind',
    'product': :'product',
    'lifecycle_operation': :'lifecycleOperation',
    'activity_id': :'activityId',
    'status': :'status',
    'time_started': :'timeStarted',
    'time_ended': :'timeEnded'
    # rubocop:enable Style/SymbolLiteral
  }
end

.get_subtype(object_hash) ⇒ Object

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.



105
106
107
108
109
110
111
112
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 105

def self.get_subtype(object_hash)
  type = object_hash[:'kind'] # rubocop:disable Style/SymbolLiteral

  return 'OCI::FleetAppsManagement::Models::FleetBasedActionGroupDetails' if type == 'FLEET_USING_RUNBOOK'

  # TODO: Log a warning when the subtype is not found.
  'OCI::FleetAppsManagement::Models::ActionGroupDetails'
end

.swagger_typesObject

Attribute type mapping.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 85

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'kind': :'String',
    'product': :'String',
    'lifecycle_operation': :'String',
    'activity_id': :'String',
    'status': :'String',
    'time_started': :'DateTime',
    'time_ended': :'DateTime'
    # 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



205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 205

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

  self.class == other.class &&
    display_name == other.display_name &&
    kind == other.kind &&
    product == other.product &&
    lifecycle_operation == other.lifecycle_operation &&
    activity_id == other.activity_id &&
    status == other.status &&
    time_started == other.time_started &&
    time_ended == other.time_ended
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



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 242

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


222
223
224
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 222

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



231
232
233
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 231

def hash
  [display_name, kind, product, lifecycle_operation, activity_id, status, time_started, time_ended].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



275
276
277
278
279
280
281
282
283
284
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 275

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



269
270
271
# File 'lib/oci/fleet_apps_management/models/action_group_details.rb', line 269

def to_s
  to_hash.to_s
end