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

Optional. Custom output properties.

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

Returns
Type Description
CustomConfig.Builder

clearDescription()

public CustomConfig.Builder clearDescription()

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
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()

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

clearRecommendation()

public CustomConfig.Builder clearRecommendation()

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

This builder for chaining.

clearResourceSelector()

public CustomConfig.Builder clearResourceSelector()

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

clearSeverity()

public CustomConfig.Builder clearSeverity()

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

This builder for chaining.

clone()

public CustomConfig.Builder clone()
Returns
Type Description
CustomConfig.Builder
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.

getCustomOutputBuilder()

public CustomConfig.CustomOutputSpec.Builder getCustomOutputBuilder()

Optional. Custom output properties.

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

Returns
Type Description
CustomConfig.CustomOutputSpec.Builder

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.

getDescriptorForType()

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

getPredicateBuilder()

public Expr.Builder getPredicateBuilder()

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

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.

getResourceSelectorBuilder()

public CustomConfig.ResourceSelector.Builder getResourceSelectorBuilder()

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

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

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.

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)

Optional. Custom output properties.

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

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)

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

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

mergeResourceSelector(CustomConfig.ResourceSelector value)

public CustomConfig.Builder mergeResourceSelector(CustomConfig.ResourceSelector value)

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

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)

Optional. Custom output properties.

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

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

setCustomOutput(CustomConfig.CustomOutputSpec.Builder builderForValue)

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

Optional. Custom output properties.

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

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

setDescription(String value)

public CustomConfig.Builder setDescription(String value)

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

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)

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

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)

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

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

setPredicate(Expr.Builder builderForValue)

public CustomConfig.Builder setPredicate(Expr.Builder builderForValue)

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

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

setRecommendation(String value)

public CustomConfig.Builder setRecommendation(String value)

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

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)

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

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)

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

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

setResourceSelector(CustomConfig.ResourceSelector.Builder builderForValue)

public CustomConfig.Builder setResourceSelector(CustomConfig.ResourceSelector.Builder builderForValue)

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

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

setSeverity(CustomConfig.Severity value)

public CustomConfig.Builder setSeverity(CustomConfig.Severity value)

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

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

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)

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

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

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