Class: OCI::LogAnalytics::Models::UploadFileSummary

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

Overview

Details of Upload File.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  STATUS_SUCCESSFUL = 'SUCCESSFUL'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UploadFileSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :reference (String)

    The value to assign to the #reference property

  • :name (String)

    The value to assign to the #name property

  • :status (String)

    The value to assign to the #status property

  • :total_chunks (Float)

    The value to assign to the #total_chunks property

  • :chunks_consumed (Float)

    The value to assign to the #chunks_consumed property

  • :chunks_success (Float)

    The value to assign to the #chunks_success property

  • :chunks_fail (Float)

    The value to assign to the #chunks_fail property

  • :time_started (DateTime)

    The value to assign to the #time_started property

  • :source_name (String)

    The value to assign to the #source_name property

  • :entity_type (String)

    The value to assign to the #entity_type property

  • :entity_name (String)

    The value to assign to the #entity_name property

  • :log_namespace (String)

    The value to assign to the #log_namespace property

  • :log_group_id (String)

    The value to assign to the #log_group_id property

  • :log_group_name (String)

    The value to assign to the #log_group_name property

  • :failure_details (String)

    The value to assign to the #failure_details property



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

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.reference = attributes[:'reference'] if attributes[:'reference']

  self.name = attributes[:'name'] if attributes[:'name']

  self.status = attributes[:'status'] if attributes[:'status']

  self.total_chunks = attributes[:'totalChunks'] if attributes[:'totalChunks']

  raise 'You cannot provide both :totalChunks and :total_chunks' if attributes.key?(:'totalChunks') && attributes.key?(:'total_chunks')

  self.total_chunks = attributes[:'total_chunks'] if attributes[:'total_chunks']

  self.chunks_consumed = attributes[:'chunksConsumed'] if attributes[:'chunksConsumed']

  raise 'You cannot provide both :chunksConsumed and :chunks_consumed' if attributes.key?(:'chunksConsumed') && attributes.key?(:'chunks_consumed')

  self.chunks_consumed = attributes[:'chunks_consumed'] if attributes[:'chunks_consumed']

  self.chunks_success = attributes[:'chunksSuccess'] if attributes[:'chunksSuccess']

  raise 'You cannot provide both :chunksSuccess and :chunks_success' if attributes.key?(:'chunksSuccess') && attributes.key?(:'chunks_success')

  self.chunks_success = attributes[:'chunks_success'] if attributes[:'chunks_success']

  self.chunks_fail = attributes[:'chunksFail'] if attributes[:'chunksFail']

  raise 'You cannot provide both :chunksFail and :chunks_fail' if attributes.key?(:'chunksFail') && attributes.key?(:'chunks_fail')

  self.chunks_fail = attributes[:'chunks_fail'] if attributes[:'chunks_fail']

  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.source_name = attributes[:'sourceName'] if attributes[:'sourceName']

  raise 'You cannot provide both :sourceName and :source_name' if attributes.key?(:'sourceName') && attributes.key?(:'source_name')

  self.source_name = attributes[:'source_name'] if attributes[:'source_name']

  self.entity_type = attributes[:'entityType'] if attributes[:'entityType']

  raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type')

  self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type']

  self.entity_name = attributes[:'entityName'] if attributes[:'entityName']

  raise 'You cannot provide both :entityName and :entity_name' if attributes.key?(:'entityName') && attributes.key?(:'entity_name')

  self.entity_name = attributes[:'entity_name'] if attributes[:'entity_name']

  self.log_namespace = attributes[:'logNamespace'] if attributes[:'logNamespace']

  raise 'You cannot provide both :logNamespace and :log_namespace' if attributes.key?(:'logNamespace') && attributes.key?(:'log_namespace')

  self.log_namespace = attributes[:'log_namespace'] if attributes[:'log_namespace']

  self.log_group_id = attributes[:'logGroupId'] if attributes[:'logGroupId']

  raise 'You cannot provide both :logGroupId and :log_group_id' if attributes.key?(:'logGroupId') && attributes.key?(:'log_group_id')

  self.log_group_id = attributes[:'log_group_id'] if attributes[:'log_group_id']

  self.log_group_name = attributes[:'logGroupName'] if attributes[:'logGroupName']

  raise 'You cannot provide both :logGroupName and :log_group_name' if attributes.key?(:'logGroupName') && attributes.key?(:'log_group_name')

  self.log_group_name = attributes[:'log_group_name'] if attributes[:'log_group_name']

  self.failure_details = attributes[:'failureDetails'] if attributes[:'failureDetails']

  raise 'You cannot provide both :failureDetails and :failure_details' if attributes.key?(:'failureDetails') && attributes.key?(:'failure_details')

  self.failure_details = attributes[:'failure_details'] if attributes[:'failure_details']
end

Instance Attribute Details

#chunks_consumedFloat

Number of chunks processed.

Returns:

  • (Float)


37
38
39
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 37

def chunks_consumed
  @chunks_consumed
end

#chunks_failFloat

Number of chunks failed processing.

Returns:

  • (Float)


45
46
47
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 45

def chunks_fail
  @chunks_fail
end

#chunks_successFloat

Number of chunks processed successfully.

Returns:

  • (Float)


41
42
43
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 41

def chunks_success
  @chunks_success
end

#entity_nameString

Name of the entity associated with the file.

Returns:

  • (String)


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

def entity_name
  @entity_name
end

#entity_typeString

Name of the entity type.

Returns:

  • (String)


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

def entity_type
  @entity_type
end

#failure_detailsString

The details about upload processing failure.

Returns:

  • (String)


77
78
79
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 77

def failure_details
  @failure_details
end

#log_group_idString

Log group OCID associated with the file.

Returns:

  • (String)


69
70
71
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 69

def log_group_id
  @log_group_id
end

#log_group_nameString

Name of the log group associated with the file.

Returns:

  • (String)


73
74
75
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 73

def log_group_name
  @log_group_name
end

#log_namespaceString

(Deprecated) Name of the log namespace associated with the file.

Returns:

  • (String)


65
66
67
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 65

def log_namespace
  @log_namespace
end

#nameString

[Required] Name of the file

Returns:

  • (String)


25
26
27
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 25

def name
  @name
end

#referenceString

[Required] Unique internal identifier to refer upload file.

Returns:

  • (String)


21
22
23
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 21

def reference
  @reference
end

#source_nameString

Name of the log source used for processing this file.

Returns:

  • (String)


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

def source_name
  @source_name
end

#statusString

Processing status of the file.

Returns:

  • (String)


29
30
31
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 29

def status
  @status
end

#time_startedDateTime

The time when this file processing started.

Returns:

  • (DateTime)


49
50
51
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 49

def time_started
  @time_started
end

#total_chunksFloat

Number of estimated chunks for this file. A chunk is a portion of the log file used for the processing.

Returns:

  • (Float)


33
34
35
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 33

def total_chunks
  @total_chunks
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 80

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'reference': :'reference',
    'name': :'name',
    'status': :'status',
    'total_chunks': :'totalChunks',
    'chunks_consumed': :'chunksConsumed',
    'chunks_success': :'chunksSuccess',
    'chunks_fail': :'chunksFail',
    'time_started': :'timeStarted',
    'source_name': :'sourceName',
    'entity_type': :'entityType',
    'entity_name': :'entityName',
    'log_namespace': :'logNamespace',
    'log_group_id': :'logGroupId',
    'log_group_name': :'logGroupName',
    'failure_details': :'failureDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 103

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'reference': :'String',
    'name': :'String',
    'status': :'String',
    'total_chunks': :'Float',
    'chunks_consumed': :'Float',
    'chunks_success': :'Float',
    'chunks_fail': :'Float',
    'time_started': :'DateTime',
    'source_name': :'String',
    'entity_type': :'String',
    'entity_name': :'String',
    'log_namespace': :'String',
    'log_group_id': :'String',
    'log_group_name': :'String',
    'failure_details': :'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



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 251

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    reference == other.reference &&
    name == other.name &&
    status == other.status &&
    total_chunks == other.total_chunks &&
    chunks_consumed == other.chunks_consumed &&
    chunks_success == other.chunks_success &&
    chunks_fail == other.chunks_fail &&
    time_started == other.time_started &&
    source_name == other.source_name &&
    entity_type == other.entity_type &&
    entity_name == other.entity_name &&
    log_namespace == other.log_namespace &&
    log_group_id == other.log_group_id &&
    log_group_name == other.log_group_name &&
    failure_details == other.failure_details
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



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 295

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


275
276
277
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 275

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



284
285
286
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 284

def hash
  [reference, name, status, total_chunks, chunks_consumed, chunks_success, chunks_fail, time_started, source_name, entity_type, entity_name, log_namespace, log_group_id, log_group_name, failure_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



328
329
330
331
332
333
334
335
336
337
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 328

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



322
323
324
# File 'lib/oci/log_analytics/models/upload_file_summary.rb', line 322

def to_s
  to_hash.to_s
end