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



1119
1120
1121
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1119

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

Instance Attribute Details

#http_requestGoogle::Apis::ServicecontrolV1::HttpRequest

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



1049
1050
1051
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1049

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)


1055
1056
1057
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1055

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


1061
1062
1063
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1061

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)


1067
1068
1069
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1067

def name
  @name
end

#operationGoogle::Apis::ServicecontrolV1::LogEntryOperation

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



1073
1074
1075
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1073

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


1080
1081
1082
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1080

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)


1086
1087
1088
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1086

def severity
  @severity
end

#source_locationGoogle::Apis::ServicecontrolV1::LogEntrySourceLocation

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



1092
1093
1094
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1092

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


1098
1099
1100
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1098

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)


1103
1104
1105
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1103

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)


1109
1110
1111
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1109

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)


1117
1118
1119
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1117

def trace
  @trace
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
# File 'generated/google/apis/servicecontrol_v1/classes.rb', line 1124

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