Class: ApiReference::IngestQueryParams

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/api_reference/models/ingest_query_params.rb

Overview

IngestQueryParams Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(debug: false, backfill_id: SKIP) ⇒ IngestQueryParams

Returns a new instance of IngestQueryParams.



45
46
47
48
# File 'lib/api_reference/models/ingest_query_params.rb', line 45

def initialize(debug: false, backfill_id: SKIP)
  @debug = debug unless debug == SKIP
  @backfill_id = backfill_id unless backfill_id == SKIP
end

Instance Attribute Details

#backfill_idString

If this ingestion request is part of a backfill, this parameter ties the ingested events to the backfill

Returns:

  • (String)


20
21
22
# File 'lib/api_reference/models/ingest_query_params.rb', line 20

def backfill_id
  @backfill_id
end

#debugTrueClass | FalseClass

Pending Deprecation: Flag to enable additional debug information in the endpoint response

Returns:

  • (TrueClass | FalseClass)


15
16
17
# File 'lib/api_reference/models/ingest_query_params.rb', line 15

def debug
  @debug
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/api_reference/models/ingest_query_params.rb', line 51

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  debug = hash['debug'] ||= false
  backfill_id = hash.key?('backfill_id') ? hash['backfill_id'] : SKIP

  # Create object from extracted values.
  IngestQueryParams.new(debug: debug,
                        backfill_id: backfill_id)
end

.namesObject

A mapping from model property names to API property names.



23
24
25
26
27
28
# File 'lib/api_reference/models/ingest_query_params.rb', line 23

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['debug'] = 'debug'
  @_hash['backfill_id'] = 'backfill_id'
  @_hash
end

.nullablesObject

An array for nullable fields



39
40
41
42
43
# File 'lib/api_reference/models/ingest_query_params.rb', line 39

def self.nullables
  %w[
    backfill_id
  ]
end

.optionalsObject

An array for optional fields



31
32
33
34
35
36
# File 'lib/api_reference/models/ingest_query_params.rb', line 31

def self.optionals
  %w[
    debug
    backfill_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



70
71
72
73
# File 'lib/api_reference/models/ingest_query_params.rb', line 70

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} debug: #{@debug.inspect}, backfill_id: #{@backfill_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



64
65
66
67
# File 'lib/api_reference/models/ingest_query_params.rb', line 64

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} debug: #{@debug}, backfill_id: #{@backfill_id}>"
end