Class: OCI::LogAnalytics::Models::StorageWorkRequestSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/log_analytics/models/storage_work_request_summary.rb

Overview

This is the summary of a storage work request.

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ StorageWorkRequestSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :id (String)

    The value to assign to the #id property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :time_accepted (DateTime)

    The value to assign to the #time_accepted property

  • :time_finished (DateTime)

    The value to assign to the #time_finished property

  • :time_expires (DateTime)

    The value to assign to the #time_expires property

  • :percent_complete (Integer)

    The value to assign to the #percent_complete property

  • :status (String)

    The value to assign to the #status property

  • :time_data_started (DateTime)

    The value to assign to the #time_data_started property

  • :time_data_ended (DateTime)

    The value to assign to the #time_data_ended property

  • :purge_query_string (String)

    The value to assign to the #purge_query_string property

  • :data_type (String)

    The value to assign to the #data_type property

  • :status_details (String)

    The value to assign to the #status_details property

  • :operation_details (String)

    The value to assign to the #operation_details property

  • :policy_name (String)

    The value to assign to the #policy_name property

  • :policy_id (String)

    The value to assign to the #policy_id property

  • :storage_usage_in_bytes (Integer)

    The value to assign to the #storage_usage_in_bytes property

  • :compartment_id_in_subtree (BOOLEAN)

    The value to assign to the #compartment_id_in_subtree property

  • :operation_type (String)

    The value to assign to the #operation_type property



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
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 197

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  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_idString

[Required] Compartment Identifier [OCID] (docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).

Returns:

  • (String)


44
45
46
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 44

def compartment_id
  @compartment_id
end

#compartment_id_in_subtreeBOOLEAN

If true, purge child compartments data, only applicable to purge request

Returns:

  • (BOOLEAN)


111
112
113
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 111

def compartment_id_in_subtree
  @compartment_id_in_subtree
end

#data_typeString

[Required] Thie is the type of data to be purged

Returns:

  • (String)


87
88
89
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 87

def data_type
  @data_type
end

#idString

[Required] This is the OCID of the storage work Request.

Returns:

  • (String)


40
41
42
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 40

def id
  @id
end

#operation_detailsString

This provides more detailed info about the work request if applicable

Returns:

  • (String)


95
96
97
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 95

def operation_details
  @operation_details
end

#operation_typeString

[Required] This is the type of the work request.

Returns:

  • (String)


116
117
118
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 116

def operation_type
  @operation_type
end

#percent_completeInteger

Percentage progress completion of the work request.

Returns:

  • (Integer)


66
67
68
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 66

def percent_complete
  @percent_complete
end

#policy_idString

This is the purge policy ID if applicable

Returns:

  • (String)


103
104
105
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 103

def policy_id
  @policy_id
end

#policy_nameString

This is the policy name if applicable (e.g. purge policy)

Returns:

  • (String)


99
100
101
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 99

def policy_name
  @policy_name
end

#purge_query_stringString

This is the solr query used to filter data for purge, ‘*’ means all

Returns:

  • (String)


83
84
85
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 83

def purge_query_string
  @purge_query_string
end

#statusString

[Required] This is the work request status.

Returns:

  • (String)


71
72
73
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 71

def status
  @status
end

#status_detailsString

This provides more detailed status if applicable

Returns:

  • (String)


91
92
93
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 91

def status_details
  @status_details
end

#storage_usage_in_bytesInteger

This is the data usage in bytes if applicable

Returns:

  • (Integer)


107
108
109
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 107

def storage_usage_in_bytes
  @storage_usage_in_bytes
end

#time_acceptedDateTime

When the work request was accepted. Should match timeStarted in all cases.

Returns:

  • (DateTime)


53
54
55
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 53

def time_accepted
  @time_accepted
end

#time_data_endedDateTime

[Required] This is the end of the time interval

Returns:

  • (DateTime)


79
80
81
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 79

def time_data_ended
  @time_data_ended
end

#time_data_startedDateTime

This is the start of the time interval

Returns:

  • (DateTime)


75
76
77
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 75

def time_data_started
  @time_data_started
end

#time_expiresDateTime

When the work request will expire.

Returns:

  • (DateTime)


61
62
63
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 61

def time_expires
  @time_expires
end

#time_finishedDateTime

When the work request finished execution.

Returns:

  • (DateTime)


57
58
59
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 57

def time_finished
  @time_finished
end

#time_startedDateTime

When the work request started.

Returns:

  • (DateTime)


48
49
50
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 48

def time_started
  @time_started
end

Class Method Details

.attribute_mapObject

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_summary.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_typesObject

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_summary.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.

Parameters:

  • other (Object)

    the other object to be compared



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 353

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 401

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


381
382
383
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 381

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



390
391
392
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 390

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_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



434
435
436
437
438
439
440
441
442
443
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 434

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



428
429
430
# File 'lib/oci/log_analytics/models/storage_work_request_summary.rb', line 428

def to_s
  to_hash.to_s
end