Class: OCI::LogAnalytics::Models::StorageWorkRequest
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::StorageWorkRequest
- Defined in:
- lib/oci/log_analytics/models/storage_work_request.rb
Overview
This shows the storage work request details.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_ACCEPTED = 'ACCEPTED'.freeze, STATUS_CANCELED = 'CANCELED'.freeze, STATUS_FAILED = 'FAILED'.freeze, STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze, STATUS_SUCCEEDED = 'SUCCEEDED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DATA_TYPE_ENUM =
[ DATA_TYPE_LOG = 'LOG'.freeze, DATA_TYPE_LOOKUP = 'LOOKUP'.freeze, DATA_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- OPERATION_TYPE_ENUM =
[ OPERATION_TYPE_OFFBOARD_TENANCY = 'OFFBOARD_TENANCY'.freeze, OPERATION_TYPE_PURGE_STORAGE_DATA = 'PURGE_STORAGE_DATA'.freeze, OPERATION_TYPE_RECALL_ARCHIVED_STORAGE_DATA = 'RECALL_ARCHIVED_STORAGE_DATA'.freeze, OPERATION_TYPE_RELEASE_RECALLED_STORAGE_DATA = 'RELEASE_RECALLED_STORAGE_DATA'.freeze, OPERATION_TYPE_ARCHIVE_STORAGE_DATA = 'ARCHIVE_STORAGE_DATA'.freeze, OPERATION_TYPE_CLEANUP_ARCHIVAL_STORAGE_DATA = 'CLEANUP_ARCHIVAL_STORAGE_DATA'.freeze, OPERATION_TYPE_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).
-
#compartment_id_in_subtree ⇒ BOOLEAN
If true, purge child compartments data, only applicable to purge request.
-
#data_type ⇒ String
[Required] Thie is the type of data to be purged.
-
#id ⇒ String
[Required] This is the OCID of the storage work Request.
-
#operation_details ⇒ String
This provides more detailed info about the work request if applicable.
-
#operation_type ⇒ String
[Required] This is the type of the work request.
-
#percent_complete ⇒ Integer
Percentage progress completion of the work request.
-
#policy_id ⇒ String
This is the purge policy ID if applicable.
-
#policy_name ⇒ String
This is the policy name if applicable (e.g. purge policy).
-
#purge_query_string ⇒ String
This is the solr query used to filter data for purge, ‘*’ means all.
-
#status ⇒ String
[Required] This is the work request status.
-
#status_details ⇒ String
This provides more detailed status if applicable.
-
#storage_usage_in_bytes ⇒ Integer
This is the data usage in bytes if applicable.
-
#time_accepted ⇒ DateTime
When the work request was accepted.
-
#time_data_ended ⇒ DateTime
[Required] This is the end of the time interval.
-
#time_data_started ⇒ DateTime
This is the start of the time interval.
-
#time_expires ⇒ DateTime
When the work request will expire.
-
#time_finished ⇒ DateTime
When the work request finished execution.
-
#time_started ⇒ DateTime
When the work request 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 = {}) ⇒ StorageWorkRequest
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 = {}) ⇒ StorageWorkRequest
Initializes the object
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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 197 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.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_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_accepted = attributes[:'timeAccepted'] if attributes[:'timeAccepted'] raise 'You cannot provide both :timeAccepted and :time_accepted' if attributes.key?(:'timeAccepted') && attributes.key?(:'time_accepted') self.time_accepted = attributes[:'time_accepted'] if attributes[:'time_accepted'] self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished'] raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished') self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished'] self.time_expires = attributes[:'timeExpires'] if attributes[:'timeExpires'] raise 'You cannot provide both :timeExpires and :time_expires' if attributes.key?(:'timeExpires') && attributes.key?(:'time_expires') self.time_expires = attributes[:'time_expires'] if attributes[:'time_expires'] self.percent_complete = attributes[:'percentComplete'] if attributes[:'percentComplete'] raise 'You cannot provide both :percentComplete and :percent_complete' if attributes.key?(:'percentComplete') && attributes.key?(:'percent_complete') self.percent_complete = attributes[:'percent_complete'] if attributes[:'percent_complete'] self.status = attributes[:'status'] if attributes[:'status'] self.time_data_started = attributes[:'timeDataStarted'] if attributes[:'timeDataStarted'] raise 'You cannot provide both :timeDataStarted and :time_data_started' if attributes.key?(:'timeDataStarted') && attributes.key?(:'time_data_started') self.time_data_started = attributes[:'time_data_started'] if attributes[:'time_data_started'] self.time_data_ended = attributes[:'timeDataEnded'] if attributes[:'timeDataEnded'] raise 'You cannot provide both :timeDataEnded and :time_data_ended' if attributes.key?(:'timeDataEnded') && attributes.key?(:'time_data_ended') self.time_data_ended = attributes[:'time_data_ended'] if attributes[:'time_data_ended'] self.purge_query_string = attributes[:'purgeQueryString'] if attributes[:'purgeQueryString'] raise 'You cannot provide both :purgeQueryString and :purge_query_string' if attributes.key?(:'purgeQueryString') && attributes.key?(:'purge_query_string') self.purge_query_string = attributes[:'purge_query_string'] if attributes[:'purge_query_string'] self.data_type = attributes[:'dataType'] if attributes[:'dataType'] raise 'You cannot provide both :dataType and :data_type' if attributes.key?(:'dataType') && attributes.key?(:'data_type') self.data_type = attributes[:'data_type'] if attributes[:'data_type'] self.status_details = attributes[:'statusDetails'] if attributes[:'statusDetails'] raise 'You cannot provide both :statusDetails and :status_details' if attributes.key?(:'statusDetails') && attributes.key?(:'status_details') self.status_details = attributes[:'status_details'] if attributes[:'status_details'] self.operation_details = attributes[:'operationDetails'] if attributes[:'operationDetails'] raise 'You cannot provide both :operationDetails and :operation_details' if attributes.key?(:'operationDetails') && attributes.key?(:'operation_details') self.operation_details = attributes[:'operation_details'] if attributes[:'operation_details'] self.policy_name = attributes[:'policyName'] if attributes[:'policyName'] raise 'You cannot provide both :policyName and :policy_name' if attributes.key?(:'policyName') && attributes.key?(:'policy_name') self.policy_name = attributes[:'policy_name'] if attributes[:'policy_name'] self.policy_id = attributes[:'policyId'] if attributes[:'policyId'] raise 'You cannot provide both :policyId and :policy_id' if attributes.key?(:'policyId') && attributes.key?(:'policy_id') self.policy_id = attributes[:'policy_id'] if attributes[:'policy_id'] self.storage_usage_in_bytes = attributes[:'storageUsageInBytes'] if attributes[:'storageUsageInBytes'] raise 'You cannot provide both :storageUsageInBytes and :storage_usage_in_bytes' if attributes.key?(:'storageUsageInBytes') && attributes.key?(:'storage_usage_in_bytes') self.storage_usage_in_bytes = attributes[:'storage_usage_in_bytes'] if attributes[:'storage_usage_in_bytes'] self.compartment_id_in_subtree = attributes[:'compartmentIdInSubtree'] unless attributes[:'compartmentIdInSubtree'].nil? raise 'You cannot provide both :compartmentIdInSubtree and :compartment_id_in_subtree' if attributes.key?(:'compartmentIdInSubtree') && attributes.key?(:'compartment_id_in_subtree') self.compartment_id_in_subtree = attributes[:'compartment_id_in_subtree'] unless attributes[:'compartment_id_in_subtree'].nil? self.operation_type = attributes[:'operationType'] if attributes[:'operationType'] raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type') self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type'] 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/storage_work_request.rb', line 44 def compartment_id @compartment_id end |
#compartment_id_in_subtree ⇒ BOOLEAN
If true, purge child compartments data, only applicable to purge request
111 112 113 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 111 def compartment_id_in_subtree @compartment_id_in_subtree end |
#data_type ⇒ String
[Required] Thie is the type of data to be purged
87 88 89 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 87 def data_type @data_type end |
#id ⇒ String
[Required] This is the OCID of the storage work Request.
40 41 42 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 40 def id @id end |
#operation_details ⇒ String
This provides more detailed info about the work request if applicable
95 96 97 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 95 def operation_details @operation_details end |
#operation_type ⇒ String
[Required] This is the type of the work request.
116 117 118 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 116 def operation_type @operation_type end |
#percent_complete ⇒ Integer
Percentage progress completion of the work request.
66 67 68 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 66 def percent_complete @percent_complete end |
#policy_id ⇒ String
This is the purge policy ID if applicable
103 104 105 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 103 def policy_id @policy_id end |
#policy_name ⇒ String
This is the policy name if applicable (e.g. purge policy)
99 100 101 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 99 def policy_name @policy_name end |
#purge_query_string ⇒ String
This is the solr query used to filter data for purge, ‘*’ means all
83 84 85 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 83 def purge_query_string @purge_query_string end |
#status ⇒ String
[Required] This is the work request status.
71 72 73 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 71 def status @status end |
#status_details ⇒ String
This provides more detailed status if applicable
91 92 93 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 91 def status_details @status_details end |
#storage_usage_in_bytes ⇒ Integer
This is the data usage in bytes if applicable
107 108 109 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 107 def storage_usage_in_bytes @storage_usage_in_bytes end |
#time_accepted ⇒ DateTime
When the work request was accepted. Should match timeStarted in all cases.
53 54 55 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 53 def time_accepted @time_accepted end |
#time_data_ended ⇒ DateTime
[Required] This is the end of the time interval
79 80 81 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 79 def time_data_ended @time_data_ended end |
#time_data_started ⇒ DateTime
This is the start of the time interval
75 76 77 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 75 def time_data_started @time_data_started end |
#time_expires ⇒ DateTime
When the work request will expire.
61 62 63 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 61 def time_expires @time_expires end |
#time_finished ⇒ DateTime
When the work request finished execution.
57 58 59 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 57 def time_finished @time_finished end |
#time_started ⇒ DateTime
When the work request started.
48 49 50 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 48 def time_started @time_started end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 119 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'time_started': :'timeStarted', 'time_accepted': :'timeAccepted', 'time_finished': :'timeFinished', 'time_expires': :'timeExpires', 'percent_complete': :'percentComplete', 'status': :'status', 'time_data_started': :'timeDataStarted', 'time_data_ended': :'timeDataEnded', 'purge_query_string': :'purgeQueryString', 'data_type': :'dataType', 'status_details': :'statusDetails', 'operation_details': :'operationDetails', 'policy_name': :'policyName', 'policy_id': :'policyId', 'storage_usage_in_bytes': :'storageUsageInBytes', 'compartment_id_in_subtree': :'compartmentIdInSubtree', 'operation_type': :'operationType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/log_analytics/models/storage_work_request.rb', line 146 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'time_started': :'DateTime', 'time_accepted': :'DateTime', 'time_finished': :'DateTime', 'time_expires': :'DateTime', 'percent_complete': :'Integer', 'status': :'String', 'time_data_started': :'DateTime', 'time_data_ended': :'DateTime', 'purge_query_string': :'String', 'data_type': :'String', 'status_details': :'String', 'operation_details': :'String', 'policy_name': :'String', 'policy_id': :'String', 'storage_usage_in_bytes': :'Integer', 'compartment_id_in_subtree': :'BOOLEAN', 'operation_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 356 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && time_started == other.time_started && time_accepted == other.time_accepted && time_finished == other.time_finished && time_expires == other.time_expires && percent_complete == other.percent_complete && status == other.status && time_data_started == other.time_data_started && time_data_ended == other.time_data_ended && purge_query_string == other.purge_query_string && data_type == other.data_type && status_details == other.status_details && operation_details == other.operation_details && policy_name == other.policy_name && policy_id == other.policy_id && storage_usage_in_bytes == other.storage_usage_in_bytes && compartment_id_in_subtree == other.compartment_id_in_subtree && operation_type == other.operation_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 404 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
384 385 386 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 384 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
393 394 395 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 393 def hash [id, compartment_id, time_started, time_accepted, time_finished, time_expires, percent_complete, status, time_data_started, time_data_ended, purge_query_string, data_type, status_details, operation_details, policy_name, policy_id, storage_usage_in_bytes, compartment_id_in_subtree, operation_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
437 438 439 440 441 442 443 444 445 446 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 437 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
431 432 433 |
# File 'lib/oci/log_analytics/models/storage_work_request.rb', line 431 def to_s to_hash.to_s end |