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

Optional. 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) = OPTIONAL];

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

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Returns
TypeDescription
CustomConfig.Builder

clearSeverity()

public CustomConfig.Builder clearSeverity()

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

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

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

Optional. 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) = OPTIONAL];

Returns
TypeDescription
com.google.type.Expr

The predicate.

getPredicateBuilder()

public Expr.Builder getPredicateBuilder()

Optional. 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) = OPTIONAL];

Returns
TypeDescription
com.google.type.Expr.Builder

getPredicateOrBuilder()

public ExprOrBuilder getPredicateOrBuilder()

Optional. 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) = OPTIONAL];

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

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Returns
TypeDescription
CustomConfig.ResourceSelector

The resourceSelector.

getResourceSelectorBuilder()

public CustomConfig.ResourceSelector.Builder getResourceSelectorBuilder()

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Returns
TypeDescription
CustomConfig.ResourceSelector.Builder

getResourceSelectorOrBuilder()

public CustomConfig.ResourceSelectorOrBuilder getResourceSelectorOrBuilder()

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Returns
TypeDescription
CustomConfig.ResourceSelectorOrBuilder

getSeverity()

public CustomConfig.Severity getSeverity()

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

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

Returns
TypeDescription
CustomConfig.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

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

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

Returns
TypeDescription
int

The enum numeric value on the wire for severity.

hasCustomOutput()

public boolean hasCustomOutput()

Optional. Custom output properties.

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

Returns
TypeDescription
boolean

Whether the customOutput field is set.

hasPredicate()

public boolean hasPredicate()

Optional. 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) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the predicate field is set.

hasResourceSelector()

public boolean hasResourceSelector()

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

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.securitycentermanagement.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)

Optional. 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) = OPTIONAL];

Parameter
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
CustomConfig.Builder

mergeResourceSelector(CustomConfig.ResourceSelector value)

public CustomConfig.Builder mergeResourceSelector(CustomConfig.ResourceSelector value)

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

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.securitycentermanagement.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.securitycentermanagement.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)

Optional. 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) = OPTIONAL];

Parameter
NameDescription
valuecom.google.type.Expr
Returns
TypeDescription
CustomConfig.Builder

setPredicate(Expr.Builder builderForValue)

public CustomConfig.Builder setPredicate(Expr.Builder builderForValue)

Optional. 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) = OPTIONAL];

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)

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Parameter
NameDescription
valueCustomConfig.ResourceSelector
Returns
TypeDescription
CustomConfig.Builder

setResourceSelector(CustomConfig.ResourceSelector.Builder builderForValue)

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

Optional. The CAI resource types that the custom module operates on (see go/gcp-cai-doc/supported-asset-types). Each custom module can specify up to 5 resource types.

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

Parameter
NameDescription
builderForValueCustomConfig.ResourceSelector.Builder
Returns
TypeDescription
CustomConfig.Builder

setSeverity(CustomConfig.Severity value)

public CustomConfig.Builder setSeverity(CustomConfig.Severity value)

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

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

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)

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

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

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