Class BackendServiceLogConfig (1.24.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
TypeDescription
int

OPTIONAL_FIELDS_FIELD_NUMBER

public static final int OPTIONAL_FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

OPTIONAL_MODE_FIELD_NUMBER

public static final int OPTIONAL_MODE_FIELD_NUMBER
Field Value
TypeDescription
int

SAMPLE_RATE_FIELD_NUMBER

public static final int SAMPLE_RATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static BackendServiceLogConfig getDefaultInstance()
Returns
TypeDescription
BackendServiceLogConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static BackendServiceLogConfig.Builder newBuilder()
Returns
TypeDescription
BackendServiceLogConfig.Builder

newBuilder(BackendServiceLogConfig prototype)

public static BackendServiceLogConfig.Builder newBuilder(BackendServiceLogConfig prototype)
Parameter
NameDescription
prototypeBackendServiceLogConfig
Returns
TypeDescription
BackendServiceLogConfig.Builder

parseDelimitedFrom(InputStream input)

public static BackendServiceLogConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static BackendServiceLogConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BackendServiceLogConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BackendServiceLogConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static BackendServiceLogConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static BackendServiceLogConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BackendServiceLogConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BackendServiceLogConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<BackendServiceLogConfig> parser()
Returns
TypeDescription
Parser<BackendServiceLogConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public BackendServiceLogConfig getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for optionalMode.

getParserForType()

public Parser<BackendServiceLogConfig> getParserForType()
Returns
TypeDescription
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
TypeDescription
float

The sampleRate.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the sampleRate field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public BackendServiceLogConfig.Builder newBuilderForType()
Returns
TypeDescription
BackendServiceLogConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BackendServiceLogConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
BackendServiceLogConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public BackendServiceLogConfig.Builder toBuilder()
Returns
TypeDescription
BackendServiceLogConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException