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

Optional. Custom output properties.

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

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

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

This builder for chaining.

clone()

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

getDefaultInstanceForType()

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

The bytes for description.

getDescriptorForType()

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

Optional. Custom output properties.

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

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)

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
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
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
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)

Optional. Custom output properties.

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

Parameter
NameDescription
valueCustomConfig.CustomOutputSpec
Returns
TypeDescription
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
NameDescription
builderForValueCustomConfig.CustomOutputSpec.Builder
Returns
TypeDescription
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
NameDescription
valueString

The description to set.

Returns
TypeDescription
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
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)

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
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Expr.Builder
Returns
TypeDescription
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
NameDescription
valueString

The recommendation to set.

Returns
TypeDescription
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
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)

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

The severity to set.

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