Class: OCI::FleetAppsManagement::Models::JobActivity
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::JobActivity
- Defined in:
- lib/oci/fleet_apps_management/models/job_activity.rb
Overview
Activity details including status corresponding to an Action Group.
Constant Summary collapse
- 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
-
#description ⇒ String
A description of the Job Activity status.
-
#id ⇒ String
[Required] Unique activity id at the action group level.
-
#resource_level_executions ⇒ Array<OCI::FleetAppsManagement::Models::EntityExecutionDetails>
List of Resource executions associated with the Action Group.
-
#runbook_id ⇒ String
OCID of the runbook associated with the Action Group.
-
#runbook_name ⇒ String
Name of the runbook associated with the Action Group.
-
#runbook_version_name ⇒ String
Name of the RunbookVersion associated with the Action Group.
-
#status ⇒ String
[Required] Status of the Job at Action Group Level.
-
#time_ended ⇒ DateTime
The time the execution for the Action Group ended.
-
#time_started ⇒ DateTime
The time the execution for the Action Group started.
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 = {}) ⇒ JobActivity
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 = {}) ⇒ JobActivity
Initializes the object
117 118 119 120 121 122 123 124 125 126 127 128 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 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 117 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.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'] self.runbook_id = attributes[:'runbookId'] if attributes[:'runbookId'] raise 'You cannot provide both :runbookId and :runbook_id' if attributes.key?(:'runbookId') && attributes.key?(:'runbook_id') self.runbook_id = attributes[:'runbook_id'] if attributes[:'runbook_id'] self.runbook_version_name = attributes[:'runbookVersionName'] if attributes[:'runbookVersionName'] raise 'You cannot provide both :runbookVersionName and :runbook_version_name' if attributes.key?(:'runbookVersionName') && attributes.key?(:'runbook_version_name') self.runbook_version_name = attributes[:'runbook_version_name'] if attributes[:'runbook_version_name'] self.runbook_name = attributes[:'runbookName'] if attributes[:'runbookName'] raise 'You cannot provide both :runbookName and :runbook_name' if attributes.key?(:'runbookName') && attributes.key?(:'runbook_name') self.runbook_name = attributes[:'runbook_name'] if attributes[:'runbook_name'] self.description = attributes[:'description'] if attributes[:'description'] self.resource_level_executions = attributes[:'resourceLevelExecutions'] if attributes[:'resourceLevelExecutions'] raise 'You cannot provide both :resourceLevelExecutions and :resource_level_executions' if attributes.key?(:'resourceLevelExecutions') && attributes.key?(:'resource_level_executions') self.resource_level_executions = attributes[:'resource_level_executions'] if attributes[:'resource_level_executions'] end |
Instance Attribute Details
#description ⇒ String
A description of the Job Activity status. If there are any errors, this can also include a short error message.
62 63 64 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 62 def description @description end |
#id ⇒ String
[Required] Unique activity id at the action group level. In most cases, this would be a generated ActionGroupId.
32 33 34 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 32 def id @id end |
#resource_level_executions ⇒ Array<OCI::FleetAppsManagement::Models::EntityExecutionDetails>
List of Resource executions associated with the Action Group.
66 67 68 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 66 def resource_level_executions @resource_level_executions end |
#runbook_id ⇒ String
OCID of the runbook associated with the Action Group.
48 49 50 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 48 def runbook_id @runbook_id end |
#runbook_name ⇒ String
Name of the runbook associated with the Action Group.
56 57 58 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 56 def runbook_name @runbook_name end |
#runbook_version_name ⇒ String
Name of the RunbookVersion associated with the Action Group.
52 53 54 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 52 def runbook_version_name @runbook_version_name end |
#status ⇒ String
[Required] Status of the Job at Action Group Level.
36 37 38 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 36 def status @status end |
#time_ended ⇒ DateTime
The time the execution for the Action Group ended. An RFC3339 formatted datetime string
44 45 46 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 44 def time_ended @time_ended end |
#time_started ⇒ DateTime
The time the execution for the Action Group started. An RFC3339 formatted datetime string.
40 41 42 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 40 def time_started @time_started end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 69 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'status': :'status', 'time_started': :'timeStarted', 'time_ended': :'timeEnded', 'runbook_id': :'runbookId', 'runbook_version_name': :'runbookVersionName', 'runbook_name': :'runbookName', 'description': :'description', 'resource_level_executions': :'resourceLevelExecutions' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 86 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'status': :'String', 'time_started': :'DateTime', 'time_ended': :'DateTime', 'runbook_id': :'String', 'runbook_version_name': :'String', 'runbook_name': :'String', 'description': :'String', 'resource_level_executions': :'Array<OCI::FleetAppsManagement::Models::EntityExecutionDetails>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 186 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && status == other.status && time_started == other.time_started && time_ended == other.time_ended && runbook_id == other.runbook_id && runbook_version_name == other.runbook_version_name && runbook_name == other.runbook_name && description == other.description && resource_level_executions == other.resource_level_executions end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 224 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
204 205 206 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 204 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
213 214 215 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 213 def hash [id, status, time_started, time_ended, runbook_id, runbook_version_name, runbook_name, description, resource_level_executions].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
257 258 259 260 261 262 263 264 265 266 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 257 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
251 252 253 |
# File 'lib/oci/fleet_apps_management/models/job_activity.rb', line 251 def to_s to_hash.to_s end |