Class CustomConfig

  • All Implemented Interfaces:
    CustomConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class CustomConfig
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Field Detail

      • CUSTOM_OUTPUT_FIELD_NUMBER

        public static final int CUSTOM_OUTPUT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RESOURCE_SELECTOR_FIELD_NUMBER

        public static final int RESOURCE_SELECTOR_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DESCRIPTION_FIELD_NUMBER

        public static final int DESCRIPTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RECOMMENDATION_FIELD_NUMBER

        public static final int RECOMMENDATION_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static CustomConfig parseFrom​(ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(ByteBuffer data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(com.google.protobuf.ByteString data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(com.google.protobuf.ByteString data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(byte[] data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(byte[] data,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static CustomConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected CustomConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static CustomConfig getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<CustomConfig> parser()
      • getParserForType

        public com.google.protobuf.Parser<CustomConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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