Class RedactImageRequest.ImageRedactionConfig.Builder (3.4.0)

public static final class RedactImageRequest.ImageRedactionConfig.Builder extends GeneratedMessageV3.Builder<RedactImageRequest.ImageRedactionConfig.Builder> implements RedactImageRequest.ImageRedactionConfigOrBuilder

Configuration for determining how redaction of images should occur.

Protobuf type google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RedactImageRequest.ImageRedactionConfig build()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig

buildPartial()

public RedactImageRequest.ImageRedactionConfig buildPartial()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig

clear()

public RedactImageRequest.ImageRedactionConfig.Builder clear()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearInfoType()

public RedactImageRequest.ImageRedactionConfig.Builder clearInfoType()

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RedactImageRequest.ImageRedactionConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

clearRedactAllText()

public RedactImageRequest.ImageRedactionConfig.Builder clearRedactAllText()

If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.

bool redact_all_text = 2;

Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

This builder for chaining.

clearRedactionColor()

public RedactImageRequest.ImageRedactionConfig.Builder clearRedactionColor()

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

clearTarget()

public RedactImageRequest.ImageRedactionConfig.Builder clearTarget()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

clone()

public RedactImageRequest.ImageRedactionConfig.Builder clone()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

getDefaultInstanceForType()

public RedactImageRequest.ImageRedactionConfig getDefaultInstanceForType()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getInfoType()

public InfoType getInfoType()

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Returns
TypeDescription
InfoType

The infoType.

getInfoTypeBuilder()

public InfoType.Builder getInfoTypeBuilder()

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Returns
TypeDescription
InfoType.Builder

getInfoTypeOrBuilder()

public InfoTypeOrBuilder getInfoTypeOrBuilder()

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Returns
TypeDescription
InfoTypeOrBuilder

getRedactAllText()

public boolean getRedactAllText()

If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.

bool redact_all_text = 2;

Returns
TypeDescription
boolean

The redactAllText.

getRedactionColor()

public Color getRedactionColor()

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Returns
TypeDescription
Color

The redactionColor.

getRedactionColorBuilder()

public Color.Builder getRedactionColorBuilder()

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Returns
TypeDescription
Color.Builder

getRedactionColorOrBuilder()

public ColorOrBuilder getRedactionColorOrBuilder()

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Returns
TypeDescription
ColorOrBuilder

getTargetCase()

public RedactImageRequest.ImageRedactionConfig.TargetCase getTargetCase()
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.TargetCase

hasInfoType()

public boolean hasInfoType()

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Returns
TypeDescription
boolean

Whether the infoType field is set.

hasRedactAllText()

public boolean hasRedactAllText()

If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.

bool redact_all_text = 2;

Returns
TypeDescription
boolean

Whether the redactAllText field is set.

hasRedactionColor()

public boolean hasRedactionColor()

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Returns
TypeDescription
boolean

Whether the redactionColor field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(RedactImageRequest.ImageRedactionConfig other)

public RedactImageRequest.ImageRedactionConfig.Builder mergeFrom(RedactImageRequest.ImageRedactionConfig other)
Parameter
NameDescription
otherRedactImageRequest.ImageRedactionConfig
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public RedactImageRequest.ImageRedactionConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

mergeInfoType(InfoType value)

public RedactImageRequest.ImageRedactionConfig.Builder mergeInfoType(InfoType value)

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Parameter
NameDescription
valueInfoType
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

mergeRedactionColor(Color value)

public RedactImageRequest.ImageRedactionConfig.Builder mergeRedactionColor(Color value)

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Parameter
NameDescription
valueColor
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RedactImageRequest.ImageRedactionConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public RedactImageRequest.ImageRedactionConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

setInfoType(InfoType value)

public RedactImageRequest.ImageRedactionConfig.Builder setInfoType(InfoType value)

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Parameter
NameDescription
valueInfoType
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

setInfoType(InfoType.Builder builderForValue)

public RedactImageRequest.ImageRedactionConfig.Builder setInfoType(InfoType.Builder builderForValue)

Only one per info_type should be provided per request. If not specified, and redact_all_text is false, the DLP API will redact all text that it matches against all info_types that are found, but not specified in another ImageRedactionConfig.

.google.privacy.dlp.v2.InfoType info_type = 1;

Parameter
NameDescription
builderForValueInfoType.Builder
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

setRedactAllText(boolean value)

public RedactImageRequest.ImageRedactionConfig.Builder setRedactAllText(boolean value)

If true, all text found in the image, regardless whether it matches an info_type, is redacted. Only one should be provided.

bool redact_all_text = 2;

Parameter
NameDescription
valueboolean

The redactAllText to set.

Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

This builder for chaining.

setRedactionColor(Color value)

public RedactImageRequest.ImageRedactionConfig.Builder setRedactionColor(Color value)

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Parameter
NameDescription
valueColor
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

setRedactionColor(Color.Builder builderForValue)

public RedactImageRequest.ImageRedactionConfig.Builder setRedactionColor(Color.Builder builderForValue)

The color to use when redacting content from an image. If not specified, the default is black.

.google.privacy.dlp.v2.Color redaction_color = 3;

Parameter
NameDescription
builderForValueColor.Builder
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder

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

public RedactImageRequest.ImageRedactionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RedactImageRequest.ImageRedactionConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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