Class CustomConfig.Builder (2.43.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CustomConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CustomConfig.Builder
Overrides

build()

public CustomConfig build()
Returns
TypeDescription
CustomConfig

buildPartial()

public CustomConfig buildPartial()
Returns
TypeDescription
CustomConfig

clear()

public CustomConfig.Builder clear()
Returns
TypeDescription
CustomConfig.Builder
Overrides

clearCustomOutput()

public CustomConfig.Builder clearCustomOutput()

Custom output properties.

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

Returns
TypeDescription
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
TypeDescription
CustomConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CustomConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CustomConfig.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CustomConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CustomConfig.Builder

This builder for chaining.

clone()

public CustomConfig.Builder clone()
Returns
TypeDescription
CustomConfig.Builder
Overrides

getCustomOutput()

public CustomConfig.CustomOutputSpec getCustomOutput()

Custom output properties.

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

Returns
TypeDescription
CustomConfig.CustomOutputSpec

The customOutput.

getCustomOutputBuilder()

public CustomConfig.CustomOutputSpec.Builder getCustomOutputBuilder()

Custom output properties.

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

Returns
TypeDescription
CustomConfig.CustomOutputSpec.Builder

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.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
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.

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
TypeDescription
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
TypeDescription
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
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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueCustomConfig.CustomOutputSpec
Returns
TypeDescription
CustomConfig.Builder

mergeFrom(CustomConfig other)

public CustomConfig.Builder mergeFrom(CustomConfig other)
Parameter
NameDescription
otherCustomConfig
Returns
TypeDescription
CustomConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CustomConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CustomConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
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
NameDescription
valueCustomConfig.ResourceSelector
Returns
TypeDescription
CustomConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CustomConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueCustomConfig.CustomOutputSpec
Returns
TypeDescription
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
NameDescription
builderForValueCustomConfig.CustomOutputSpec.Builder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
CustomConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CustomConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Expr.Builder
Returns
TypeDescription
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
NameDescription
valueString

The recommendation to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for recommendation to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueCustomConfig.ResourceSelector
Returns
TypeDescription
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
NameDescription
builderForValueCustomConfig.ResourceSelector.Builder
Returns
TypeDescription
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
NameDescription
valueCustomConfig.Severity

The severity to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
CustomConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final CustomConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CustomConfig.Builder
Overrides