Class CustomConfig.Builder

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

    public static final class CustomConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CustomConfig.Builder>
    implements CustomConfigOrBuilder
     Defines the properties in a custom module configuration for Security
     Health Analytics. Use the custom module configuration to create custom
     detectors that generate custom findings for resources that you specify.
     
    Protobuf type google.cloud.securitycenter.v1.CustomConfig
    • 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<CustomConfig.Builder>
      • clear

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

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

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

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

        public CustomConfig.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<CustomConfig.Builder>
      • setField

        public CustomConfig.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<CustomConfig.Builder>
      • clearField

        public CustomConfig.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<CustomConfig.Builder>
      • clearOneof

        public CustomConfig.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<CustomConfig.Builder>
      • setRepeatedField

        public CustomConfig.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<CustomConfig.Builder>
      • addRepeatedField

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

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

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

        public CustomConfig.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<CustomConfig.Builder>
        Throws:
        IOException
      • hasPredicate

        public boolean hasPredicate()
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
        Specified by:
        hasPredicate in interface CustomConfigOrBuilder
        Returns:
        Whether the predicate field is set.
      • getPredicate

        public com.google.type.Expr getPredicate()
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
        Specified by:
        getPredicate in interface CustomConfigOrBuilder
        Returns:
        The predicate.
      • setPredicate

        public CustomConfig.Builder setPredicate​(com.google.type.Expr value)
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
      • setPredicate

        public CustomConfig.Builder setPredicate​(com.google.type.Expr.Builder builderForValue)
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
      • mergePredicate

        public CustomConfig.Builder mergePredicate​(com.google.type.Expr value)
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
      • clearPredicate

        public CustomConfig.Builder clearPredicate()
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
      • getPredicateBuilder

        public com.google.type.Expr.Builder getPredicateBuilder()
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
      • getPredicateOrBuilder

        public com.google.type.ExprOrBuilder getPredicateOrBuilder()
         The CEL expression to evaluate to produce findings. When the expression
         evaluates to true against a resource, a finding is generated.
         
        .google.type.Expr predicate = 1;
        Specified by:
        getPredicateOrBuilder in interface CustomConfigOrBuilder
      • hasCustomOutput

        public boolean hasCustomOutput()
         Custom output properties.
         
        .google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;
        Specified by:
        hasCustomOutput in interface CustomConfigOrBuilder
        Returns:
        Whether the customOutput field is set.
      • clearCustomOutput

        public CustomConfig.Builder clearCustomOutput()
         Custom output properties.
         
        .google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;
      • getCustomOutputBuilder

        public CustomConfig.CustomOutputSpec.Builder getCustomOutputBuilder()
         Custom output properties.
         
        .google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;
      • hasResourceSelector

        public boolean hasResourceSelector()
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
        Specified by:
        hasResourceSelector in interface CustomConfigOrBuilder
        Returns:
        Whether the resourceSelector field is set.
      • getResourceSelector

        public CustomConfig.ResourceSelector getResourceSelector()
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
        Specified by:
        getResourceSelector in interface CustomConfigOrBuilder
        Returns:
        The resourceSelector.
      • setResourceSelector

        public CustomConfig.Builder setResourceSelector​(CustomConfig.ResourceSelector value)
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
      • setResourceSelector

        public CustomConfig.Builder setResourceSelector​(CustomConfig.ResourceSelector.Builder builderForValue)
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
      • mergeResourceSelector

        public CustomConfig.Builder mergeResourceSelector​(CustomConfig.ResourceSelector value)
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
      • clearResourceSelector

        public CustomConfig.Builder clearResourceSelector()
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
      • getResourceSelectorBuilder

        public CustomConfig.ResourceSelector.Builder getResourceSelectorBuilder()
         The resource types that the custom module operates on. Each custom module
         can specify up to 5 resource types.
         
        .google.cloud.securitycenter.v1.CustomConfig.ResourceSelector resource_selector = 3;
      • getSeverityValue

        public int getSeverityValue()
         The severity to assign to findings generated by the module.
         
        .google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;
        Specified by:
        getSeverityValue in interface CustomConfigOrBuilder
        Returns:
        The enum numeric value on the wire for severity.
      • setSeverityValue

        public CustomConfig.Builder setSeverityValue​(int value)
         The severity to assign to findings generated by the module.
         
        .google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;
        Parameters:
        value - The enum numeric value on the wire for severity to set.
        Returns:
        This builder for chaining.
      • getSeverity

        public CustomConfig.Severity getSeverity()
         The severity to assign to findings generated by the module.
         
        .google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;
        Specified by:
        getSeverity in interface CustomConfigOrBuilder
        Returns:
        The severity.
      • setSeverity

        public CustomConfig.Builder setSeverity​(CustomConfig.Severity value)
         The severity to assign to findings generated by the module.
         
        .google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;
        Parameters:
        value - The severity to set.
        Returns:
        This builder for chaining.
      • clearSeverity

        public CustomConfig.Builder clearSeverity()
         The severity to assign to findings generated by the module.
         
        .google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         Text that describes the vulnerability or misconfiguration that the custom
         module detects. This explanation is returned with each finding instance to
         help investigators understand the detected issue. The text must be enclosed
         in quotation marks.
         
        string description = 5;
        Specified by:
        getDescription in interface CustomConfigOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Text that describes the vulnerability or misconfiguration that the custom
         module detects. This explanation is returned with each finding instance to
         help investigators understand the detected issue. The text must be enclosed
         in quotation marks.
         
        string description = 5;
        Specified by:
        getDescriptionBytes in interface CustomConfigOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public CustomConfig.Builder setDescription​(String value)
         Text that describes the vulnerability or misconfiguration that the custom
         module detects. This explanation is returned with each finding instance to
         help investigators understand the detected issue. The text must be enclosed
         in quotation marks.
         
        string description = 5;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public CustomConfig.Builder clearDescription()
         Text that describes the vulnerability or misconfiguration that the custom
         module detects. This explanation is returned with each finding instance to
         help investigators understand the detected issue. The text must be enclosed
         in quotation marks.
         
        string description = 5;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public CustomConfig.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         Text that describes the vulnerability or misconfiguration that the custom
         module detects. This explanation is returned with each finding instance to
         help investigators understand the detected issue. The text must be enclosed
         in quotation marks.
         
        string description = 5;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getRecommendation

        public String getRecommendation()
         An explanation of the recommended steps that security teams can take to
         resolve the detected issue. This explanation is returned with each finding
         generated by this module in the `nextSteps` property of the finding JSON.
         
        string recommendation = 6;
        Specified by:
        getRecommendation in interface CustomConfigOrBuilder
        Returns:
        The recommendation.
      • getRecommendationBytes

        public com.google.protobuf.ByteString getRecommendationBytes()
         An explanation of the recommended steps that security teams can take to
         resolve the detected issue. This explanation is returned with each finding
         generated by this module in the `nextSteps` property of the finding JSON.
         
        string recommendation = 6;
        Specified by:
        getRecommendationBytes in interface CustomConfigOrBuilder
        Returns:
        The bytes for recommendation.
      • setRecommendation

        public CustomConfig.Builder setRecommendation​(String value)
         An explanation of the recommended steps that security teams can take to
         resolve the detected issue. This explanation is returned with each finding
         generated by this module in the `nextSteps` property of the finding JSON.
         
        string recommendation = 6;
        Parameters:
        value - The recommendation to set.
        Returns:
        This builder for chaining.
      • clearRecommendation

        public CustomConfig.Builder clearRecommendation()
         An explanation of the recommended steps that security teams can take to
         resolve the detected issue. This explanation is returned with each finding
         generated by this module in the `nextSteps` property of the finding JSON.
         
        string recommendation = 6;
        Returns:
        This builder for chaining.
      • setRecommendationBytes

        public CustomConfig.Builder setRecommendationBytes​(com.google.protobuf.ByteString value)
         An explanation of the recommended steps that security teams can take to
         resolve the detected issue. This explanation is returned with each finding
         generated by this module in the `nextSteps` property of the finding JSON.
         
        string recommendation = 6;
        Parameters:
        value - The bytes for recommendation to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final CustomConfig.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<CustomConfig.Builder>
      • mergeUnknownFields

        public final CustomConfig.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<CustomConfig.Builder>