Class: OCI::LogAnalytics::Models::ScheduledTaskSummary
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::ScheduledTaskSummary
- Defined in:
- lib/oci/log_analytics/models/scheduled_task_summary.rb
Overview
Summary information about a scheduled task.
Constant Summary collapse
- TASK_TYPE_ENUM =
[ TASK_TYPE_SAVED_SEARCH = 'SAVED_SEARCH'.freeze, TASK_TYPE_ACCELERATION = 'ACCELERATION'.freeze, TASK_TYPE_PURGE = 'PURGE'.freeze, TASK_TYPE_ACCELERATION_MAINTENANCE = 'ACCELERATION_MAINTENANCE'.freeze, TASK_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- TASK_STATUS_ENUM =
[ TASK_STATUS_READY = 'READY'.freeze, TASK_STATUS_PAUSED = 'PAUSED'.freeze, TASK_STATUS_COMPLETED = 'COMPLETED'.freeze, TASK_STATUS_BLOCKED = 'BLOCKED'.freeze, TASK_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LAST_EXECUTION_STATUS_ENUM =
[ LAST_EXECUTION_STATUS_FAILED = 'FAILED'.freeze, LAST_EXECUTION_STATUS_SUCCEEDED = 'SUCCEEDED'.freeze, LAST_EXECUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] Compartment Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
[Required] A user-friendly name that is changeable and that does not have to be unique.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data plane resource.
-
#last_execution_status ⇒ String
The most recent task execution status.
-
#lifecycle_state ⇒ String
[Required] The current state of the scheduled task.
-
#task_status ⇒ String
Status of the scheduled task.
-
#task_type ⇒ String
[Required] Task type.
-
#time_created ⇒ DateTime
[Required] The date and time the schedule task was created, in the format defined by RFC3339.
-
#time_last_executed ⇒ DateTime
The date and time the scheduled task last executed, in the format defined by RFC3339.
-
#time_updated ⇒ DateTime
[Required] The date and time the scheduled task was last updated, in the format defined by RFC3339.
-
#work_request_id ⇒ String
most recent Work Request Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the asynchronous request.
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 = {}) ⇒ ScheduledTaskSummary
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 = {}) ⇒ ScheduledTaskSummary
Initializes the object
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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 157 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.task_type = attributes[:'taskType'] if attributes[:'taskType'] raise 'You cannot provide both :taskType and :task_type' if attributes.key?(:'taskType') && attributes.key?(:'task_type') self.task_type = attributes[:'task_type'] if attributes[:'task_type'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] 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.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.task_status = attributes[:'taskStatus'] if attributes[:'taskStatus'] raise 'You cannot provide both :taskStatus and :task_status' if attributes.key?(:'taskStatus') && attributes.key?(:'task_status') self.task_status = attributes[:'task_status'] if attributes[:'task_status'] self.work_request_id = attributes[:'workRequestId'] if attributes[:'workRequestId'] raise 'You cannot provide both :workRequestId and :work_request_id' if attributes.key?(:'workRequestId') && attributes.key?(:'work_request_id') self.work_request_id = attributes[:'work_request_id'] if attributes[:'work_request_id'] 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self.last_execution_status = attributes[:'lastExecutionStatus'] if attributes[:'lastExecutionStatus'] raise 'You cannot provide both :lastExecutionStatus and :last_execution_status' if attributes.key?(:'lastExecutionStatus') && attributes.key?(:'last_execution_status') self.last_execution_status = attributes[:'last_execution_status'] if attributes[:'last_execution_status'] self.time_last_executed = attributes[:'timeLastExecuted'] if attributes[:'timeLastExecuted'] raise 'You cannot provide both :timeLastExecuted and :time_last_executed' if attributes.key?(:'timeLastExecuted') && attributes.key?(:'time_last_executed') self.time_last_executed = attributes[:'time_last_executed'] if attributes[:'time_last_executed'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] Compartment Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
44 45 46 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 44 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: ‘{"bar-key": "value"}`
86 87 88 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 86 def end |
#display_name ⇒ String
[Required] A user-friendly name that is changeable and that does not have to be unique. Format: a leading alphanumeric, followed by zero or more alphanumerics, underscores, spaces, backslashes, or hyphens in any order). No trailing spaces allowed.
74 75 76 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 74 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: ‘"value"`
80 81 82 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 80 def end |
#id ⇒ String
[Required] The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the data plane resource.
36 37 38 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 36 def id @id end |
#last_execution_status ⇒ String
The most recent task execution status.
90 91 92 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 90 def last_execution_status @last_execution_status end |
#lifecycle_state ⇒ String
[Required] The current state of the scheduled task.
58 59 60 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 58 def lifecycle_state @lifecycle_state end |
#task_status ⇒ String
Status of the scheduled task.
62 63 64 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 62 def task_status @task_status end |
#task_type ⇒ String
[Required] Task type.
40 41 42 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 40 def task_type @task_type end |
#time_created ⇒ DateTime
[Required] The date and time the schedule task was created, in the format defined by RFC3339.
49 50 51 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 49 def time_created @time_created end |
#time_last_executed ⇒ DateTime
The date and time the scheduled task last executed, in the format defined by RFC3339.
94 95 96 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 94 def time_last_executed @time_last_executed end |
#time_updated ⇒ DateTime
[Required] The date and time the scheduled task was last updated, in the format defined by RFC3339.
54 55 56 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 54 def time_updated @time_updated end |
#work_request_id ⇒ String
most recent Work Request Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) for the asynchronous request.
66 67 68 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 66 def work_request_id @work_request_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 97 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'task_type': :'taskType', 'compartment_id': :'compartmentId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'task_status': :'taskStatus', 'work_request_id': :'workRequestId', 'display_name': :'displayName', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'last_execution_status': :'lastExecutionStatus', 'time_last_executed': :'timeLastExecuted' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 118 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'task_type': :'String', 'compartment_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'task_status': :'String', 'work_request_id': :'String', 'display_name': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'last_execution_status': :'String', 'time_last_executed': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 284 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && task_type == other.task_type && compartment_id == other.compartment_id && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && task_status == other.task_status && work_request_id == other.work_request_id && display_name == other.display_name && == other. && == other. && last_execution_status == other.last_execution_status && time_last_executed == other.time_last_executed end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 326 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
306 307 308 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 306 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
315 316 317 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 315 def hash [id, task_type, compartment_id, time_created, time_updated, lifecycle_state, task_status, work_request_id, display_name, , , last_execution_status, time_last_executed].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
359 360 361 362 363 364 365 366 367 368 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 359 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
353 354 355 |
# File 'lib/oci/log_analytics/models/scheduled_task_summary.rb', line 353 def to_s to_hash.to_s end |