Class CustomConfig.Builder (2.54.0)

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

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomConfig.Builder
Overrides

build()

public CustomConfig build()
Returns
Type Description
CustomConfig

buildPartial()

public CustomConfig buildPartial()
Returns
Type Description
CustomConfig

clear()

public CustomConfig.Builder clear()
Returns
Type Description
CustomConfig.Builder
Overrides

clearCustomOutput()

public CustomConfig.Builder clearCustomOutput()

Custom output properties.

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

Returns
Type Description
CustomConfig.Builder

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
Type Description
CustomConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CustomConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CustomConfig.Builder
Overrides

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;

Returns
Type Description
CustomConfig.Builder

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
Type Description
CustomConfig.Builder

This builder for chaining.

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;

Returns
Type Description
CustomConfig.Builder

clearSeverity()

public CustomConfig.Builder clearSeverity()

The severity to assign to findings generated by the module.

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

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

clone()

public CustomConfig.Builder clone()
Returns
Type Description
CustomConfig.Builder
Overrides

getCustomOutput()

public CustomConfig.CustomOutputSpec getCustomOutput()

Custom output properties.

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

Returns
Type Description
CustomConfig.CustomOutputSpec

The customOutput.

getCustomOutputBuilder()

public CustomConfig.CustomOutputSpec.Builder getCustomOutputBuilder()

Custom output properties.

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

Returns
Type Description
CustomConfig.CustomOutputSpec.Builder

getCustomOutputOrBuilder()

public CustomConfig.CustomOutputSpecOrBuilder getCustomOutputOrBuilder()

Custom output properties.

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

Returns
Type Description
CustomConfig.CustomOutputSpecOrBuilder

getDefaultInstanceForType()

public CustomConfig getDefaultInstanceForType()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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
Type Description
com.google.type.Expr

The predicate.

getPredicateBuilder()

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

Returns
Type Description
com.google.type.Expr.Builder

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
Type Description
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
Type Description
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
Type Description
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
Type Description
CustomConfig.ResourceSelector

The resourceSelector.

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;

Returns
Type Description
CustomConfig.ResourceSelector.Builder

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
Type Description
CustomConfig.ResourceSelectorOrBuilder

getSeverity()

public CustomConfig.Severity getSeverity()

The severity to assign to findings generated by the module.

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

Returns
Type Description
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
Type Description
int

The enum numeric value on the wire for severity.

hasCustomOutput()

public boolean hasCustomOutput()

Custom output properties.

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

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the resourceSelector field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCustomOutput(CustomConfig.CustomOutputSpec value)

public CustomConfig.Builder mergeCustomOutput(CustomConfig.CustomOutputSpec value)

Custom output properties.

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

Parameter
Name Description
value CustomConfig.CustomOutputSpec
Returns
Type Description
CustomConfig.Builder

mergeFrom(CustomConfig other)

public CustomConfig.Builder mergeFrom(CustomConfig other)
Parameter
Name Description
other CustomConfig
Returns
Type Description
CustomConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CustomConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CustomConfig.Builder
Overrides

mergePredicate(Expr value)

public CustomConfig.Builder mergePredicate(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;

Parameter
Name Description
value com.google.type.Expr
Returns
Type Description
CustomConfig.Builder

mergeResourceSelector(CustomConfig.ResourceSelector value)

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;

Parameter
Name Description
value CustomConfig.ResourceSelector
Returns
Type Description
CustomConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomConfig.Builder
Overrides

setCustomOutput(CustomConfig.CustomOutputSpec value)

public CustomConfig.Builder setCustomOutput(CustomConfig.CustomOutputSpec value)

Custom output properties.

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

Parameter
Name Description
value CustomConfig.CustomOutputSpec
Returns
Type Description
CustomConfig.Builder

setCustomOutput(CustomConfig.CustomOutputSpec.Builder builderForValue)

public CustomConfig.Builder setCustomOutput(CustomConfig.CustomOutputSpec.Builder builderForValue)

Custom output properties.

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

Parameter
Name Description
builderForValue CustomConfig.CustomOutputSpec.Builder
Returns
Type Description
CustomConfig.Builder

setDescription(String value)

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;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public CustomConfig.Builder setDescriptionBytes(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;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CustomConfig.Builder
Overrides

setPredicate(Expr value)

public CustomConfig.Builder setPredicate(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;

Parameter
Name Description
value com.google.type.Expr
Returns
Type Description
CustomConfig.Builder

setPredicate(Expr.Builder builderForValue)

public CustomConfig.Builder setPredicate(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;

Parameter
Name Description
builderForValue com.google.type.Expr.Builder
Returns
Type Description
CustomConfig.Builder

setRecommendation(String value)

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;

Parameter
Name Description
value String

The recommendation to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setRecommendationBytes(ByteString value)

public CustomConfig.Builder setRecommendationBytes(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;

Parameter
Name Description
value ByteString

The bytes for recommendation to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CustomConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CustomConfig.Builder
Overrides

setResourceSelector(CustomConfig.ResourceSelector value)

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;

Parameter
Name Description
value CustomConfig.ResourceSelector
Returns
Type Description
CustomConfig.Builder

setResourceSelector(CustomConfig.ResourceSelector.Builder builderForValue)

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;

Parameter
Name Description
builderForValue CustomConfig.ResourceSelector.Builder
Returns
Type Description
CustomConfig.Builder

setSeverity(CustomConfig.Severity value)

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;

Parameter
Name Description
value CustomConfig.Severity

The severity to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setSeverityValue(int value)

public CustomConfig.Builder setSeverityValue(int value)

The severity to assign to findings generated by the module.

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

Parameter
Name Description
value int

The enum numeric value on the wire for severity to set.

Returns
Type Description
CustomConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CustomConfig.Builder
Overrides