Class LogExclusion.Builder

  • All Implemented Interfaces:
    LogExclusionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    LogExclusion

    public static final class LogExclusion.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
    implements LogExclusionOrBuilder
     Specifies a set of log entries that are filtered out by a sink. If
     your Google Cloud resource receives a large volume of log entries, you can
     use exclusions to reduce your chargeable logs. Note that exclusions on
     organization-level and folder-level sinks don't apply to child resources.
     Note also that you cannot modify the _Required sink or exclude logs from it.
     
    Protobuf type google.logging.v2.LogExclusion
    • Method Detail

      • getDescriptor

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

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

        public LogExclusion.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.GeneratedMessageV3.Builder<LogExclusion.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.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • getDefaultInstanceForType

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

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

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

        public LogExclusion.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • setField

        public LogExclusion.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • clearField

        public LogExclusion.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • clearOneof

        public LogExclusion.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • setRepeatedField

        public LogExclusion.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • addRepeatedField

        public LogExclusion.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • mergeFrom

        public LogExclusion.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<LogExclusion.Builder>
      • isInitialized

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

        public LogExclusion.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<LogExclusion.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Required. A client-assigned identifier, such as
         `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
         can include only letters, digits, underscores, hyphens, and periods. First
         character has to be alphanumeric.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface LogExclusionOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. A client-assigned identifier, such as
         `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
         can include only letters, digits, underscores, hyphens, and periods. First
         character has to be alphanumeric.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface LogExclusionOrBuilder
        Returns:
        The bytes for name.
      • setName

        public LogExclusion.Builder setName​(String value)
         Required. A client-assigned identifier, such as
         `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
         can include only letters, digits, underscores, hyphens, and periods. First
         character has to be alphanumeric.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public LogExclusion.Builder clearName()
         Required. A client-assigned identifier, such as
         `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
         can include only letters, digits, underscores, hyphens, and periods. First
         character has to be alphanumeric.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setNameBytes

        public LogExclusion.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. A client-assigned identifier, such as
         `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and
         can include only letters, digits, underscores, hyphens, and periods. First
         character has to be alphanumeric.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         Optional. A description of this exclusion.
         
        string description = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescription in interface LogExclusionOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Optional. A description of this exclusion.
         
        string description = 2 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDescriptionBytes in interface LogExclusionOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public LogExclusion.Builder setDescription​(String value)
         Optional. A description of this exclusion.
         
        string description = 2 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public LogExclusion.Builder clearDescription()
         Optional. A description of this exclusion.
         
        string description = 2 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public LogExclusion.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Optional. A description of this exclusion.
         
        string description = 2 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getFilter

        public String getFilter()
         Required. An [advanced logs
         filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
         matches the log entries to be excluded. By using the [sample
         function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
         you can exclude less than 100% of the matching log entries.
        
         For example, the following query matches 99% of low-severity log entries
         from Google Cloud Storage buckets:
        
           `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
         
        string filter = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFilter in interface LogExclusionOrBuilder
        Returns:
        The filter.
      • getFilterBytes

        public com.google.protobuf.ByteString getFilterBytes()
         Required. An [advanced logs
         filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
         matches the log entries to be excluded. By using the [sample
         function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
         you can exclude less than 100% of the matching log entries.
        
         For example, the following query matches 99% of low-severity log entries
         from Google Cloud Storage buckets:
        
           `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
         
        string filter = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getFilterBytes in interface LogExclusionOrBuilder
        Returns:
        The bytes for filter.
      • setFilter

        public LogExclusion.Builder setFilter​(String value)
         Required. An [advanced logs
         filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
         matches the log entries to be excluded. By using the [sample
         function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
         you can exclude less than 100% of the matching log entries.
        
         For example, the following query matches 99% of low-severity log entries
         from Google Cloud Storage buckets:
        
           `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
         
        string filter = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The filter to set.
        Returns:
        This builder for chaining.
      • clearFilter

        public LogExclusion.Builder clearFilter()
         Required. An [advanced logs
         filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
         matches the log entries to be excluded. By using the [sample
         function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
         you can exclude less than 100% of the matching log entries.
        
         For example, the following query matches 99% of low-severity log entries
         from Google Cloud Storage buckets:
        
           `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
         
        string filter = 3 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setFilterBytes

        public LogExclusion.Builder setFilterBytes​(com.google.protobuf.ByteString value)
         Required. An [advanced logs
         filter](https://cloud.google.com/logging/docs/view/advanced-queries) that
         matches the log entries to be excluded. By using the [sample
         function](https://cloud.google.com/logging/docs/view/advanced-queries#sample),
         you can exclude less than 100% of the matching log entries.
        
         For example, the following query matches 99% of low-severity log entries
         from Google Cloud Storage buckets:
        
           `resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)`
         
        string filter = 3 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for filter to set.
        Returns:
        This builder for chaining.
      • getDisabled

        public boolean getDisabled()
         Optional. If set to True, then this exclusion is disabled and it does not
         exclude any log entries. You can [update an
         exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
         value of this field.
         
        bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDisabled in interface LogExclusionOrBuilder
        Returns:
        The disabled.
      • setDisabled

        public LogExclusion.Builder setDisabled​(boolean value)
         Optional. If set to True, then this exclusion is disabled and it does not
         exclude any log entries. You can [update an
         exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
         value of this field.
         
        bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The disabled to set.
        Returns:
        This builder for chaining.
      • clearDisabled

        public LogExclusion.Builder clearDisabled()
         Optional. If set to True, then this exclusion is disabled and it does not
         exclude any log entries. You can [update an
         exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the
         value of this field.
         
        bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface LogExclusionOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface LogExclusionOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public LogExclusion.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public LogExclusion.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public LogExclusion.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public LogExclusion.Builder clearCreateTime()
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The creation timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface LogExclusionOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface LogExclusionOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface LogExclusionOrBuilder
        Returns:
        The updateTime.
      • setUpdateTime

        public LogExclusion.Builder setUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setUpdateTime

        public LogExclusion.Builder setUpdateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeUpdateTime

        public LogExclusion.Builder mergeUpdateTime​(com.google.protobuf.Timestamp value)
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearUpdateTime

        public LogExclusion.Builder clearUpdateTime()
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The last update timestamp of the exclusion.
        
         This field may not be present for older exclusions.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface LogExclusionOrBuilder
      • setUnknownFields

        public final LogExclusion.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>
      • mergeUnknownFields

        public final LogExclusion.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogExclusion.Builder>