Class: Google::Apis::ServicecontrolV2::V2LogEntry

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

Overview

An individual log entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ V2LogEntry

Returns a new instance of V2LogEntry.



1459
1460
1461
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1459

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

Instance Attribute Details

#http_requestGoogle::Apis::ServicecontrolV2::V2HttpRequest

A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message. Corresponds to the JSON property httpRequest



1385
1386
1387
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1385

def http_request
  @http_request
end

#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)


1391
1392
1393
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1391

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>)


1397
1398
1399
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1397

def labels
  @labels
end

#monitored_resource_labelsHash<String,String>

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

Returns:

  • (Hash<String,String>)


1403
1404
1405
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1403

def monitored_resource_labels
  @monitored_resource_labels
end

#nameString

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

Returns:

  • (String)


1409
1410
1411
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1409

def name
  @name
end

#operationGoogle::Apis::ServicecontrolV2::V2LogEntryOperation

Additional information about a potentially long-running operation with which a log entry is associated. Corresponds to the JSON property operation



1415
1416
1417
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1415

def operation
  @operation
end

#proto_payloadHash<String,Object>

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. Corresponds to the JSON property protoPayload

Returns:

  • (Hash<String,Object>)


1421
1422
1423
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1421

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)


1426
1427
1428
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1426

def severity
  @severity
end

#source_locationGoogle::Apis::ServicecontrolV2::V2LogEntrySourceLocation

Additional information about the source code location that produced the log entry. Corresponds to the JSON property sourceLocation



1432
1433
1434
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1432

def source_location
  @source_location
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>)


1438
1439
1440
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1438

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)


1443
1444
1445
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1443

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)


1449
1450
1451
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1449

def timestamp
  @timestamp
end

#traceString

Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/ 06796866738c859f2f19b7cfb3214824 Corresponds to the JSON property trace

Returns:

  • (String)


1457
1458
1459
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1457

def trace
  @trace
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
# File 'lib/google/apis/servicecontrol_v2/classes.rb', line 1464

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