Class: LogEventsJson

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/dto/logEventsJson.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata, logEvents) ⇒ LogEventsJson

Returns a new instance of LogEventsJson.



8
9
10
11
12
13
# File 'lib/fluent/dto/logEventsJson.rb', line 8

def initialize(,logEvents)
  if != nil ||  != 'null'
    @metadata = 
  end
  @LogEvents = logEvents
end

Instance Attribute Details

#LogEventsObject

Returns the value of attribute LogEvents.



7
8
9
# File 'lib/fluent/dto/logEventsJson.rb', line 7

def LogEvents
  @LogEvents
end

#metadataObject

Returns the value of attribute metadata.



7
8
9
# File 'lib/fluent/dto/logEventsJson.rb', line 7

def 
  @metadata
end

Instance Method Details

#to_hashObject



15
16
17
18
19
20
21
22
# File 'lib/fluent/dto/logEventsJson.rb', line 15

def to_hash
  {
    metadata: @metadata,
    logEvents: @LogEvents.map do |le|
      le.to_hash
    end
  }.compact
end