Class BackendServiceLogConfig (1.52.0)

public final class BackendServiceLogConfig extends GeneratedMessageV3 implements BackendServiceLogConfigOrBuilder

The available logging options for the load balancer traffic served by this backend service.

Protobuf type google.cloud.compute.v1.BackendServiceLogConfig

Static Fields

ENABLE_FIELD_NUMBER

public static final int ENABLE_FIELD_NUMBER
Field Value
Type Description
int

OPTIONAL_FIELDS_FIELD_NUMBER

public static final int OPTIONAL_FIELDS_FIELD_NUMBER
Field Value
Type Description
int

OPTIONAL_MODE_FIELD_NUMBER

public static final int OPTIONAL_MODE_FIELD_NUMBER
Field Value
Type Description
int

SAMPLE_RATE_FIELD_NUMBER

public static final int SAMPLE_RATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static BackendServiceLogConfig getDefaultInstance()
Returns
Type Description
BackendServiceLogConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static BackendServiceLogConfig.Builder newBuilder()
Returns
Type Description
BackendServiceLogConfig.Builder

newBuilder(BackendServiceLogConfig prototype)

public static BackendServiceLogConfig.Builder newBuilder(BackendServiceLogConfig prototype)
Parameter
Name Description
prototype BackendServiceLogConfig
Returns
Type Description
BackendServiceLogConfig.Builder

parseDelimitedFrom(InputStream input)

public static BackendServiceLogConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static BackendServiceLogConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BackendServiceLogConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BackendServiceLogConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static BackendServiceLogConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static BackendServiceLogConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BackendServiceLogConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<BackendServiceLogConfig> parser()
Returns
Type Description
Parser<BackendServiceLogConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public BackendServiceLogConfig getDefaultInstanceForType()
Returns
Type Description
BackendServiceLogConfig

getEnable()

public boolean getEnable()

Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.

optional bool enable = 311764355;

Returns
Type Description
boolean

The enable.

getOptionalFields(int index)

public String getOptionalFields(int index)

This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace

repeated string optional_fields = 528589944;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The optionalFields at the given index.

getOptionalFieldsBytes(int index)

public ByteString getOptionalFieldsBytes(int index)

This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace

repeated string optional_fields = 528589944;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the optionalFields at the given index.

getOptionalFieldsCount()

public int getOptionalFieldsCount()

This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace

repeated string optional_fields = 528589944;

Returns
Type Description
int

The count of optionalFields.

getOptionalFieldsList()

public ProtocolStringList getOptionalFieldsList()

This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM. Contains a list of optional fields you want to include in the logs. For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace

repeated string optional_fields = 528589944;

Returns
Type Description
ProtocolStringList

A list containing the optionalFields.

getOptionalMode()

public String getOptionalMode()

This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the OptionalMode enum for the list of possible values.

optional string optional_mode = 128697122;

Returns
Type Description
String

The optionalMode.

getOptionalModeBytes()

public ByteString getOptionalModeBytes()

This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the OptionalMode enum for the list of possible values.

optional string optional_mode = 128697122;

Returns
Type Description
ByteString

The bytes for optionalMode.

getParserForType()

public Parser<BackendServiceLogConfig> getParserForType()
Returns
Type Description
Parser<BackendServiceLogConfig>
Overrides

getSampleRate()

public float getSampleRate()

This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.

optional float sample_rate = 153193045;

Returns
Type Description
float

The sampleRate.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasEnable()

public boolean hasEnable()

Denotes whether to enable logging for the load balancer traffic served by this backend service. The default value is false.

optional bool enable = 311764355;

Returns
Type Description
boolean

Whether the enable field is set.

hasOptionalMode()

public boolean hasOptionalMode()

This field can only be specified if logging is enabled for this backend service. Configures whether all, none or a subset of optional fields should be added to the reported logs. One of [INCLUDE_ALL_OPTIONAL, EXCLUDE_ALL_OPTIONAL, CUSTOM]. Default is EXCLUDE_ALL_OPTIONAL. Check the OptionalMode enum for the list of possible values.

optional string optional_mode = 128697122;

Returns
Type Description
boolean

Whether the optionalMode field is set.

hasSampleRate()

public boolean hasSampleRate()

This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.

optional float sample_rate = 153193045;

Returns
Type Description
boolean

Whether the sampleRate field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public BackendServiceLogConfig.Builder newBuilderForType()
Returns
Type Description
BackendServiceLogConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BackendServiceLogConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
BackendServiceLogConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public BackendServiceLogConfig.Builder toBuilder()
Returns
Type Description
BackendServiceLogConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException