Class BackendServiceLogConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder>
com.google.cloud.compute.v1.BackendServiceLogConfig.Builder
All Implemented Interfaces:
BackendServiceLogConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
BackendServiceLogConfig

public static final class BackendServiceLogConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder> implements BackendServiceLogConfigOrBuilder
 The available logging options for the load balancer traffic served by this
 backend service.
 
Protobuf type google.cloud.compute.v1.BackendServiceLogConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    addOptionalFieldsBytes(com.google.protobuf.ByteString value)
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
     
     
     
    Denotes whether to enable logging for the load balancer traffic served by this backend service.
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    This field can only be specified if logging is enabled for this backend service.
    This field can only be specified if logging is enabled for this backend service.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    Denotes whether to enable logging for the load balancer traffic served by this backend service.
    getOptionalFields(int index)
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    com.google.protobuf.ByteString
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    int
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    com.google.protobuf.ProtocolStringList
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    This field can only be specified if logging is enabled for this backend service.
    com.google.protobuf.ByteString
    This field can only be specified if logging is enabled for this backend service.
    float
    This field can only be specified if logging is enabled for this backend service.
    boolean
    Denotes whether to enable logging for the load balancer traffic served by this backend service.
    boolean
    This field can only be specified if logging is enabled for this backend service.
    boolean
    This field can only be specified if logging is enabled for this backend service.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setEnable(boolean value)
    Denotes whether to enable logging for the load balancer traffic served by this backend service.
    setOptionalFields(int index, String value)
    This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode" was set to CUSTOM.
    This field can only be specified if logging is enabled for this backend service.
    setOptionalModeBytes(com.google.protobuf.ByteString value)
    This field can only be specified if logging is enabled for this backend service.
    setSampleRate(float value)
    This field can only be specified if logging is enabled for this backend service.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder>
    • getDefaultInstanceForType

      public BackendServiceLogConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public BackendServiceLogConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BackendServiceLogConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public BackendServiceLogConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendServiceLogConfig.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<BackendServiceLogConfig.Builder>
    • mergeFrom

      public BackendServiceLogConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BackendServiceLogConfig.Builder>
      Throws:
      IOException
    • 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;
      Specified by:
      hasEnable in interface BackendServiceLogConfigOrBuilder
      Returns:
      Whether the enable field is set.
    • 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;
      Specified by:
      getEnable in interface BackendServiceLogConfigOrBuilder
      Returns:
      The enable.
    • setEnable

      public BackendServiceLogConfig.Builder setEnable(boolean value)
       Denotes whether to enable logging for the load balancer
       traffic served by this backend service. The default value is false.
       
      optional bool enable = 311764355;
      Parameters:
      value - The enable to set.
      Returns:
      This builder for chaining.
    • clearEnable

      public BackendServiceLogConfig.Builder clearEnable()
       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:
      This builder for chaining.
    • getOptionalFieldsList

      public com.google.protobuf.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;
      Specified by:
      getOptionalFieldsList in interface BackendServiceLogConfigOrBuilder
      Returns:
      A list containing the optionalFields.
    • 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;
      Specified by:
      getOptionalFieldsCount in interface BackendServiceLogConfigOrBuilder
      Returns:
      The count of optionalFields.
    • getOptionalFields

      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;
      Specified by:
      getOptionalFields in interface BackendServiceLogConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The optionalFields at the given index.
    • getOptionalFieldsBytes

      public com.google.protobuf.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;
      Specified by:
      getOptionalFieldsBytes in interface BackendServiceLogConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the optionalFields at the given index.
    • setOptionalFields

      public BackendServiceLogConfig.Builder setOptionalFields(int index, String value)
       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;
      Parameters:
      index - The index to set the value at.
      value - The optionalFields to set.
      Returns:
      This builder for chaining.
    • addOptionalFields

      public BackendServiceLogConfig.Builder addOptionalFields(String value)
       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;
      Parameters:
      value - The optionalFields to add.
      Returns:
      This builder for chaining.
    • addAllOptionalFields

      public BackendServiceLogConfig.Builder addAllOptionalFields(Iterable<String> values)
       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;
      Parameters:
      values - The optionalFields to add.
      Returns:
      This builder for chaining.
    • clearOptionalFields

      public BackendServiceLogConfig.Builder clearOptionalFields()
       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:
      This builder for chaining.
    • addOptionalFieldsBytes

      public BackendServiceLogConfig.Builder addOptionalFieldsBytes(com.google.protobuf.ByteString value)
       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;
      Parameters:
      value - The bytes of the optionalFields to add.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasOptionalMode in interface BackendServiceLogConfigOrBuilder
      Returns:
      Whether the optionalMode field is set.
    • 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;
      Specified by:
      getOptionalMode in interface BackendServiceLogConfigOrBuilder
      Returns:
      The optionalMode.
    • getOptionalModeBytes

      public com.google.protobuf.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;
      Specified by:
      getOptionalModeBytes in interface BackendServiceLogConfigOrBuilder
      Returns:
      The bytes for optionalMode.
    • setOptionalMode

      public BackendServiceLogConfig.Builder setOptionalMode(String value)
       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;
      Parameters:
      value - The optionalMode to set.
      Returns:
      This builder for chaining.
    • clearOptionalMode

      public BackendServiceLogConfig.Builder clearOptionalMode()
       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:
      This builder for chaining.
    • setOptionalModeBytes

      public BackendServiceLogConfig.Builder setOptionalModeBytes(com.google.protobuf.ByteString value)
       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;
      Parameters:
      value - The bytes for optionalMode to set.
      Returns:
      This builder for chaining.
    • 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;
      Specified by:
      hasSampleRate in interface BackendServiceLogConfigOrBuilder
      Returns:
      Whether the sampleRate field is set.
    • 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;
      Specified by:
      getSampleRate in interface BackendServiceLogConfigOrBuilder
      Returns:
      The sampleRate.
    • setSampleRate

      public BackendServiceLogConfig.Builder setSampleRate(float value)
       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;
      Parameters:
      value - The sampleRate to set.
      Returns:
      This builder for chaining.
    • clearSampleRate

      public BackendServiceLogConfig.Builder clearSampleRate()
       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:
      This builder for chaining.