Class: OCI::ComputeInstanceAgent::Models::InstanceAgentCommandExecutionSummary
- Inherits:
-
Object
- Object
- OCI::ComputeInstanceAgent::Models::InstanceAgentCommandExecutionSummary
- Defined in:
- lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb
Overview
Execution details for a command.
Constant Summary collapse
- DELIVERY_STATE_ENUM =
[ DELIVERY_STATE_VISIBLE = 'VISIBLE'.freeze, DELIVERY_STATE_PENDING = 'PENDING'.freeze, DELIVERY_STATE_ACKED = 'ACKED'.freeze, DELIVERY_STATE_ACKED_CANCELED = 'ACKED_CANCELED'.freeze, DELIVERY_STATE_EXPIRED = 'EXPIRED'.freeze, DELIVERY_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_TIMED_OUT = 'TIMED_OUT'.freeze, LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#content ⇒ OCI::ComputeInstanceAgent::Models::InstanceAgentCommandExecutionOutputContent
[Required] The execution output from a command.
-
#delivery_state ⇒ String
[Required] The command delivery state.
-
#display_name ⇒ String
A user-friendly name.
-
#instance_agent_command_id ⇒ String
[Required] The OCID of the command.
-
#instance_id ⇒ String
[Required] The OCID of the instance.
-
#lifecycle_state ⇒ String
[Required] The command execution lifecycle state.
-
#sequence_number ⇒ Integer
[Required] A large, non-consecutive number that Oracle Cloud Agent assigns to each created command.
-
#time_created ⇒ DateTime
[Required] The date and time the command was created, in the format defined by RFC3339.
-
#time_updated ⇒ DateTime
[Required] The date and time the command was last updated, in the format defined by RFC3339.
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 = {}) ⇒ InstanceAgentCommandExecutionSummary
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 = {}) ⇒ InstanceAgentCommandExecutionSummary
Initializes the object
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 133 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.instance_agent_command_id = attributes[:'instanceAgentCommandId'] if attributes[:'instanceAgentCommandId'] raise 'You cannot provide both :instanceAgentCommandId and :instance_agent_command_id' if attributes.key?(:'instanceAgentCommandId') && attributes.key?(:'instance_agent_command_id') self.instance_agent_command_id = attributes[:'instance_agent_command_id'] if attributes[:'instance_agent_command_id'] self.instance_id = attributes[:'instanceId'] if attributes[:'instanceId'] raise 'You cannot provide both :instanceId and :instance_id' if attributes.key?(:'instanceId') && attributes.key?(:'instance_id') self.instance_id = attributes[:'instance_id'] if attributes[:'instance_id'] self.delivery_state = attributes[:'deliveryState'] if attributes[:'deliveryState'] raise 'You cannot provide both :deliveryState and :delivery_state' if attributes.key?(:'deliveryState') && attributes.key?(:'delivery_state') self.delivery_state = attributes[:'delivery_state'] if attributes[:'delivery_state'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.sequence_number = attributes[:'sequenceNumber'] if attributes[:'sequenceNumber'] raise 'You cannot provide both :sequenceNumber and :sequence_number' if attributes.key?(:'sequenceNumber') && attributes.key?(:'sequence_number') self.sequence_number = attributes[:'sequence_number'] if attributes[:'sequence_number'] 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.content = attributes[:'content'] if attributes[:'content'] end |
Instance Attribute Details
#content ⇒ OCI::ComputeInstanceAgent::Models::InstanceAgentCommandExecutionOutputContent
[Required] The execution output from a command.
82 83 84 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 82 def content @content end |
#delivery_state ⇒ String
[Required] The command delivery state. * VISIBLE
- The command is visible to the instance. * PENDING
- The command is pending acknowledgment from the instance. * ACKED
- The command has been received and acknowledged by the instance. * ACKED_CANCELED
- The canceled command has been received and acknowledged by the instance. * EXPIRED
- The instance has not requested for commands and the command's delivery has expired.
47 48 49 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 47 def delivery_state @delivery_state end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique.
78 79 80 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 78 def display_name @display_name end |
#instance_agent_command_id ⇒ String
[Required] The OCID of the command.
33 34 35 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 33 def instance_agent_command_id @instance_agent_command_id end |
#instance_id ⇒ String
[Required] The OCID of the instance.
37 38 39 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 37 def instance_id @instance_id end |
#lifecycle_state ⇒ String
[Required] The command execution lifecycle state. * ACCEPTED
- The command has been accepted to run. * IN_PROGRESS
- The command is in progress. * SUCCEEDED
- The command was successfully executed. * FAILED
- The command failed to execute. * TIMED_OUT
- The command execution timed out. * CANCELED
- The command execution was canceled.
58 59 60 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 58 def lifecycle_state @lifecycle_state end |
#sequence_number ⇒ Integer
[Required] A large, non-consecutive number that Oracle Cloud Agent assigns to each created command.
74 75 76 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 74 def sequence_number @sequence_number end |
#time_created ⇒ DateTime
[Required] The date and time the command was created, in the format defined by RFC3339.
64 65 66 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 64 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The date and time the command was last updated, in the format defined by RFC3339.
70 71 72 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 70 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'instance_agent_command_id': :'instanceAgentCommandId', 'instance_id': :'instanceId', 'delivery_state': :'deliveryState', 'lifecycle_state': :'lifecycleState', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'sequence_number': :'sequenceNumber', 'display_name': :'displayName', 'content': :'content' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'instance_agent_command_id': :'String', 'instance_id': :'String', 'delivery_state': :'String', 'lifecycle_state': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'sequence_number': :'Integer', 'display_name': :'String', 'content': :'OCI::ComputeInstanceAgent::Models::InstanceAgentCommandExecutionOutputContent' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 223 def ==(other) return true if equal?(other) self.class == other.class && instance_agent_command_id == other.instance_agent_command_id && instance_id == other.instance_id && delivery_state == other.delivery_state && lifecycle_state == other.lifecycle_state && time_created == other.time_created && time_updated == other.time_updated && sequence_number == other.sequence_number && display_name == other.display_name && content == other.content end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 261 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
241 242 243 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 241 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
250 251 252 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 250 def hash [instance_agent_command_id, instance_id, delivery_state, lifecycle_state, time_created, time_updated, sequence_number, display_name, content].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 294 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
288 289 290 |
# File 'lib/oci/compute_instance_agent/models/instance_agent_command_execution_summary.rb', line 288 def to_s to_hash.to_s end |