Google Cloud Service Control V1 Client - Class LogEntry (1.1.1)

Reference documentation and code samples for the Google Cloud Service Control V1 Client class LogEntry.

An individual log entry.

Generated from protobuf message google.api.servicecontrol.v1.LogEntry

Namespace

Google \ Cloud \ ServiceControl \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

↳ timestamp Google\Protobuf\Timestamp

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

↳ severity int

The severity of the log entry. The default value is LogSeverity.DEFAULT.

↳ http_request Google\Cloud\ServiceControl\V1\HttpRequest

Optional. Information about the HTTP request associated with this log entry, if applicable.

↳ trace string

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

↳ insert_id string

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

↳ labels array|Google\Protobuf\Internal\MapField

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

↳ proto_payload Google\Protobuf\Any

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

↳ text_payload string

The log entry payload, represented as a Unicode string (UTF-8).

↳ struct_payload Google\Protobuf\Struct

The log entry payload, represented as a structure that is expressed as a JSON object.

↳ operation Google\Cloud\ServiceControl\V1\LogEntryOperation

Optional. Information about an operation associated with the log entry, if applicable.

↳ source_location Google\Cloud\ServiceControl\V1\LogEntrySourceLocation

Optional. Source code location information associated with the log entry, if any.

getName

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

Returns
TypeDescription
string

setName

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTimestamp

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasTimestamp

clearTimestamp

setTimestamp

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getSeverity

The severity of the log entry. The default value is LogSeverity.DEFAULT.

Returns
TypeDescription
int

setSeverity

The severity of the log entry. The default value is LogSeverity.DEFAULT.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getHttpRequest

Optional. Information about the HTTP request associated with this log entry, if applicable.

Returns
TypeDescription
Google\Cloud\ServiceControl\V1\HttpRequest|null

hasHttpRequest

clearHttpRequest

setHttpRequest

Optional. Information about the HTTP request associated with this log entry, if applicable.

Parameter
NameDescription
var Google\Cloud\ServiceControl\V1\HttpRequest
Returns
TypeDescription
$this

getTrace

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

Returns
TypeDescription
string

setTrace

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getInsertId

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

Returns
TypeDescription
string

setInsertId

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabels

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

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

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

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getProtoPayload

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

Returns
TypeDescription
Google\Protobuf\Any|null

hasProtoPayload

setProtoPayload

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

Parameter
NameDescription
var Google\Protobuf\Any
Returns
TypeDescription
$this

getTextPayload

The log entry payload, represented as a Unicode string (UTF-8).

Returns
TypeDescription
string

hasTextPayload

setTextPayload

The log entry payload, represented as a Unicode string (UTF-8).

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getStructPayload

The log entry payload, represented as a structure that is expressed as a JSON object.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasStructPayload

setStructPayload

The log entry payload, represented as a structure that is expressed as a JSON object.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this

getOperation

Optional. Information about an operation associated with the log entry, if applicable.

Returns
TypeDescription
Google\Cloud\ServiceControl\V1\LogEntryOperation|null

hasOperation

clearOperation

setOperation

Optional. Information about an operation associated with the log entry, if applicable.

Parameter
NameDescription
var Google\Cloud\ServiceControl\V1\LogEntryOperation
Returns
TypeDescription
$this

getSourceLocation

Optional. Source code location information associated with the log entry, if any.

Returns
TypeDescription
Google\Cloud\ServiceControl\V1\LogEntrySourceLocation|null

hasSourceLocation

clearSourceLocation

setSourceLocation

Optional. Source code location information associated with the log entry, if any.

Parameter
NameDescription
var Google\Cloud\ServiceControl\V1\LogEntrySourceLocation
Returns
TypeDescription
$this

getPayload

Returns
TypeDescription
string