Class CustomConfig (0.12.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.securityposture.v1.CustomConfig

Static Fields

CUSTOM_OUTPUT_FIELD_NUMBER

public static final int CUSTOM_OUTPUT_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

PREDICATE_FIELD_NUMBER

public static final int PREDICATE_FIELD_NUMBER
Field Value
Type Description
int

RECOMMENDATION_FIELD_NUMBER

public static final int RECOMMENDATION_FIELD_NUMBER
Field Value
Type Description
int

RESOURCE_SELECTOR_FIELD_NUMBER

public static final int RESOURCE_SELECTOR_FIELD_NUMBER
Field Value
Type Description
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CustomConfig getDefaultInstance()
Returns
Type Description
CustomConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CustomConfig.Builder newBuilder()
Returns
Type Description
CustomConfig.Builder

newBuilder(CustomConfig prototype)

public static CustomConfig.Builder newBuilder(CustomConfig prototype)
Parameter
Name Description
prototype CustomConfig
Returns
Type Description
CustomConfig.Builder

parseDelimitedFrom(InputStream input)

public static CustomConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CustomConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CustomConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CustomConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CustomConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CustomConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CustomConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CustomConfig> parser()
Returns
Type Description
Parser<CustomConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getCustomOutput()

public CustomConfig.CustomOutputSpec getCustomOutput()

Optional. Custom output properties.

.google.cloud.securityposture.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomConfig.CustomOutputSpec

The customOutput.

getCustomOutputOrBuilder()

public CustomConfig.CustomOutputSpecOrBuilder getCustomOutputOrBuilder()

Optional. Custom output properties.

.google.cloud.securityposture.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomConfig.CustomOutputSpecOrBuilder

getDefaultInstanceForType()

public CustomConfig getDefaultInstanceForType()
Returns
Type Description
CustomConfig

getDescription()

public String getDescription()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getParserForType()

public Parser<CustomConfig> getParserForType()
Returns
Type Description
Parser<CustomConfig>
Overrides

getPredicate()

public Expr getPredicate()

Required. 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 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.Expr

The predicate.

getPredicateOrBuilder()

public ExprOrBuilder getPredicateOrBuilder()

Required. 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 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
com.google.type.ExprOrBuilder

getRecommendation()

public String getRecommendation()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The recommendation.

getRecommendationBytes()

public ByteString getRecommendationBytes()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for recommendation.

getResourceSelector()

public CustomConfig.ResourceSelector getResourceSelector()

Required. The resource types that the custom module operates on. Each custom module can specify up to 5 resource types.

.google.cloud.securityposture.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomConfig.ResourceSelector

The resourceSelector.

getResourceSelectorOrBuilder()

public CustomConfig.ResourceSelectorOrBuilder getResourceSelectorOrBuilder()

Required. The resource types that the custom module operates on. Each custom module can specify up to 5 resource types.

.google.cloud.securityposture.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomConfig.ResourceSelectorOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSeverity()

public CustomConfig.Severity getSeverity()

Required. The severity to assign to findings generated by the module.

.google.cloud.securityposture.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomConfig.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

Required. The severity to assign to findings generated by the module.

.google.cloud.securityposture.v1.CustomConfig.Severity severity = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for severity.

hasCustomOutput()

public boolean hasCustomOutput()

Optional. Custom output properties.

.google.cloud.securityposture.v1.CustomConfig.CustomOutputSpec custom_output = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customOutput field is set.

hasPredicate()

public boolean hasPredicate()

Required. 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 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the predicate field is set.

hasResourceSelector()

public boolean hasResourceSelector()

Required. The resource types that the custom module operates on. Each custom module can specify up to 5 resource types.

.google.cloud.securityposture.v1.CustomConfig.ResourceSelector resource_selector = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the resourceSelector field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CustomConfig.Builder newBuilderForType()
Returns
Type Description
CustomConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CustomConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CustomConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public CustomConfig.Builder toBuilder()
Returns
Type Description
CustomConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException