Class: Google::Apis::ServicecontrolV1::LogEntry

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/servicecontrol_v1/classes.rb,
generated/google/apis/servicecontrol_v1/representations.rb,
generated/google/apis/servicecontrol_v1/representations.rb

Overview

An individual log entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LogEntry

Returns a new instance of LogEntry



1438
1439
1440
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1438

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#insert_idString

A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id. Corresponds to the JSON property insertId

Returns:

  • (String)


1406
1407
1408
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1406

def insert_id
  @insert_id
end

#labelsHash<String,String>

A set of user-defined (key, value) data that provides additional information about the log entry. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1394
1395
1396
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1394

def labels
  @labels
end

#nameString

Required. The log to which this log entry belongs. Examples: "syslog", "book_log". Corresponds to the JSON property name

Returns:

  • (String)


1412
1413
1414
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1412

def name
  @name
end

#proto_payloadHash<String,Object>

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. You can only pass protoPayload values that belong to a set of approved types. Corresponds to the JSON property protoPayload

Returns:

  • (Hash<String,Object>)


1430
1431
1432
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1430

def proto_payload
  @proto_payload
end

#severityString

The severity of the log entry. The default value is LogSeverity.DEFAULT. Corresponds to the JSON property severity

Returns:

  • (String)


1400
1401
1402
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1400

def severity
  @severity
end

#struct_payloadHash<String,Object>

The log entry payload, represented as a structure that is expressed as a JSON object. Corresponds to the JSON property structPayload

Returns:

  • (Hash<String,Object>)


1418
1419
1420
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1418

def struct_payload
  @struct_payload
end

#text_payloadString

The log entry payload, represented as a Unicode string (UTF-8). Corresponds to the JSON property textPayload

Returns:

  • (String)


1423
1424
1425
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1423

def text_payload
  @text_payload
end

#timestampString

The time the event described by the log entry occurred. If omitted, defaults to operation start time. Corresponds to the JSON property timestamp

Returns:

  • (String)


1436
1437
1438
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1436

def timestamp
  @timestamp
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1443

def update!(**args)
  @labels = args[:labels] if args.key?(:labels)
  @severity = args[:severity] if args.key?(:severity)
  @insert_id = args[:insert_id] if args.key?(:insert_id)
  @name = args[:name] if args.key?(:name)
  @struct_payload = args[:struct_payload] if args.key?(:struct_payload)
  @text_payload = args[:text_payload] if args.key?(:text_payload)
  @proto_payload = args[:proto_payload] if args.key?(:proto_payload)
  @timestamp = args[:timestamp] if args.key?(:timestamp)
end