Class LoggingConfig.LogGenerationRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LoggingConfig.LogGenerationRule.Builder>
com.google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.Builder
All Implemented Interfaces:
LoggingConfig.LogGenerationRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LoggingConfig.LogGenerationRule

public static final class LoggingConfig.LogGenerationRule.Builder extends com.google.protobuf.GeneratedMessage.Builder<LoggingConfig.LogGenerationRule.Builder> implements LoggingConfig.LogGenerationRuleOrBuilder
 The logging configurations for services supporting log generation.
 
Protobuf type google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule
  • 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<LoggingConfig.LogGenerationRule.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<LoggingConfig.LogGenerationRule.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<LoggingConfig.LogGenerationRule.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public LoggingConfig.LogGenerationRule.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<LoggingConfig.LogGenerationRule.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<LoggingConfig.LogGenerationRule.Builder>
    • mergeFrom

      public LoggingConfig.LogGenerationRule.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<LoggingConfig.LogGenerationRule.Builder>
      Throws:
      IOException
    • getLoggingLevelValue

      public int getLoggingLevelValue()
       The logging level.
      
       By default it is set to `LOG_WARNINGS_AND_ABOVE`.
       
      .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1;
      Specified by:
      getLoggingLevelValue in interface LoggingConfig.LogGenerationRuleOrBuilder
      Returns:
      The enum numeric value on the wire for loggingLevel.
    • setLoggingLevelValue

      public LoggingConfig.LogGenerationRule.Builder setLoggingLevelValue(int value)
       The logging level.
      
       By default it is set to `LOG_WARNINGS_AND_ABOVE`.
       
      .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1;
      Parameters:
      value - The enum numeric value on the wire for loggingLevel to set.
      Returns:
      This builder for chaining.
    • getLoggingLevel

      public LoggingConfig.LoggingLevel getLoggingLevel()
       The logging level.
      
       By default it is set to `LOG_WARNINGS_AND_ABOVE`.
       
      .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1;
      Specified by:
      getLoggingLevel in interface LoggingConfig.LogGenerationRuleOrBuilder
      Returns:
      The loggingLevel.
    • setLoggingLevel

       The logging level.
      
       By default it is set to `LOG_WARNINGS_AND_ABOVE`.
       
      .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1;
      Parameters:
      value - The loggingLevel to set.
      Returns:
      This builder for chaining.
    • clearLoggingLevel

      public LoggingConfig.LogGenerationRule.Builder clearLoggingLevel()
       The logging level.
      
       By default it is set to `LOG_WARNINGS_AND_ABOVE`.
       
      .google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel logging_level = 1;
      Returns:
      This builder for chaining.
    • hasInfoLogSampleRate

      public boolean hasInfoLogSampleRate()
       The log sample rate for INFO level log entries. You can use this to
       reduce the number of entries generated for INFO level logs.
      
       DO NOT set this field if the
       [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
       is not
       [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
       Otherwise, an INVALID_ARGUMENT error is returned.
      
       Sample rate for INFO logs defaults to 1 when unset (generate and send all
       INFO logs to Cloud Logging). Its value must be greater than 0 and less
       than or equal to 1.
       
      optional float info_log_sample_rate = 2;
      Specified by:
      hasInfoLogSampleRate in interface LoggingConfig.LogGenerationRuleOrBuilder
      Returns:
      Whether the infoLogSampleRate field is set.
    • getInfoLogSampleRate

      public float getInfoLogSampleRate()
       The log sample rate for INFO level log entries. You can use this to
       reduce the number of entries generated for INFO level logs.
      
       DO NOT set this field if the
       [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
       is not
       [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
       Otherwise, an INVALID_ARGUMENT error is returned.
      
       Sample rate for INFO logs defaults to 1 when unset (generate and send all
       INFO logs to Cloud Logging). Its value must be greater than 0 and less
       than or equal to 1.
       
      optional float info_log_sample_rate = 2;
      Specified by:
      getInfoLogSampleRate in interface LoggingConfig.LogGenerationRuleOrBuilder
      Returns:
      The infoLogSampleRate.
    • setInfoLogSampleRate

      public LoggingConfig.LogGenerationRule.Builder setInfoLogSampleRate(float value)
       The log sample rate for INFO level log entries. You can use this to
       reduce the number of entries generated for INFO level logs.
      
       DO NOT set this field if the
       [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
       is not
       [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
       Otherwise, an INVALID_ARGUMENT error is returned.
      
       Sample rate for INFO logs defaults to 1 when unset (generate and send all
       INFO logs to Cloud Logging). Its value must be greater than 0 and less
       than or equal to 1.
       
      optional float info_log_sample_rate = 2;
      Parameters:
      value - The infoLogSampleRate to set.
      Returns:
      This builder for chaining.
    • clearInfoLogSampleRate

      public LoggingConfig.LogGenerationRule.Builder clearInfoLogSampleRate()
       The log sample rate for INFO level log entries. You can use this to
       reduce the number of entries generated for INFO level logs.
      
       DO NOT set this field if the
       [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level]
       is not
       [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL].
       Otherwise, an INVALID_ARGUMENT error is returned.
      
       Sample rate for INFO logs defaults to 1 when unset (generate and send all
       INFO logs to Cloud Logging). Its value must be greater than 0 and less
       than or equal to 1.
       
      optional float info_log_sample_rate = 2;
      Returns:
      This builder for chaining.