Class CustomConfig (2.25.0)

public final class CustomConfig extends 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

Static Fields

CUSTOM_OUTPUT_FIELD_NUMBER

public static final int CUSTOM_OUTPUT_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

PREDICATE_FIELD_NUMBER

public static final int PREDICATE_FIELD_NUMBER
Field Value
TypeDescription
int

RECOMMENDATION_FIELD_NUMBER

public static final int RECOMMENDATION_FIELD_NUMBER
Field Value
TypeDescription
int

RESOURCE_SELECTOR_FIELD_NUMBER

public static final int RESOURCE_SELECTOR_FIELD_NUMBER
Field Value
TypeDescription
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static CustomConfig getDefaultInstance()
Returns
TypeDescription
CustomConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static CustomConfig.Builder newBuilder()
Returns
TypeDescription
CustomConfig.Builder

newBuilder(CustomConfig prototype)

public static CustomConfig.Builder newBuilder(CustomConfig prototype)
Parameter
NameDescription
prototypeCustomConfig
Returns
TypeDescription
CustomConfig.Builder

parseDelimitedFrom(InputStream input)

public static CustomConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static CustomConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CustomConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CustomConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static CustomConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static CustomConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<CustomConfig> parser()
Returns
TypeDescription
Parser<CustomConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCustomOutput()

public CustomConfig.CustomOutputSpec getCustomOutput()

Custom output properties.

.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;

Returns
TypeDescription
CustomConfig.CustomOutputSpec

The customOutput.

getCustomOutputOrBuilder()

public CustomConfig.CustomOutputSpecOrBuilder getCustomOutputOrBuilder()

Custom output properties.

.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;

Returns
TypeDescription
CustomConfig.CustomOutputSpecOrBuilder

getDefaultInstanceForType()

public CustomConfig getDefaultInstanceForType()
Returns
TypeDescription
CustomConfig

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;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for description.

getParserForType()

public Parser<CustomConfig> getParserForType()
Returns
TypeDescription
Parser<CustomConfig>
Overrides

getPredicate()

public 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;

Returns
TypeDescription
com.google.type.Expr

The predicate.

getPredicateOrBuilder()

public 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;

Returns
TypeDescription
com.google.type.ExprOrBuilder

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;

Returns
TypeDescription
String

The recommendation.

getRecommendationBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for recommendation.

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;

Returns
TypeDescription
CustomConfig.ResourceSelector

The resourceSelector.

getResourceSelectorOrBuilder()

public CustomConfig.ResourceSelectorOrBuilder getResourceSelectorOrBuilder()

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;

Returns
TypeDescription
CustomConfig.ResourceSelectorOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSeverity()

public CustomConfig.Severity getSeverity()

The severity to assign to findings generated by the module.

.google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;

Returns
TypeDescription
CustomConfig.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

The severity to assign to findings generated by the module.

.google.cloud.securitycenter.v1.CustomConfig.Severity severity = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for severity.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasCustomOutput()

public boolean hasCustomOutput()

Custom output properties.

.google.cloud.securitycenter.v1.CustomConfig.CustomOutputSpec custom_output = 2;

Returns
TypeDescription
boolean

Whether the customOutput field is set.

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;

Returns
TypeDescription
boolean

Whether the predicate 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;

Returns
TypeDescription
boolean

Whether the resourceSelector field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public CustomConfig.Builder newBuilderForType()
Returns
TypeDescription
CustomConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CustomConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CustomConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public CustomConfig.Builder toBuilder()
Returns
TypeDescription
CustomConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException