Class SdpRedactResult.Builder (0.36.0)

public static final class SdpRedactResult.Builder extends GeneratedMessage.Builder<SdpRedactResult.Builder> implements SdpRedactResultOrBuilder

Sensitive Data Protection Redaction Result.

Protobuf type google.cloud.modelarmor.v1.SdpRedactResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllFindings(Iterable<? extends SdpFinding> values)

public SdpRedactResult.Builder addAllFindings(Iterable<? extends SdpFinding> values)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.modelarmor.v1.SdpFinding>
Returns
Type Description
SdpRedactResult.Builder

addAllMessageItems(Iterable<? extends MessageItem> values)

public SdpRedactResult.Builder addAllMessageItems(Iterable<? extends MessageItem> values)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.modelarmor.v1.MessageItem>
Returns
Type Description
SdpRedactResult.Builder

addFindings(SdpFinding value)

public SdpRedactResult.Builder addFindings(SdpFinding value)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value SdpFinding
Returns
Type Description
SdpRedactResult.Builder

addFindings(SdpFinding.Builder builderForValue)

public SdpRedactResult.Builder addFindings(SdpFinding.Builder builderForValue)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue SdpFinding.Builder
Returns
Type Description
SdpRedactResult.Builder

addFindings(int index, SdpFinding value)

public SdpRedactResult.Builder addFindings(int index, SdpFinding value)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value SdpFinding
Returns
Type Description
SdpRedactResult.Builder

addFindings(int index, SdpFinding.Builder builderForValue)

public SdpRedactResult.Builder addFindings(int index, SdpFinding.Builder builderForValue)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue SdpFinding.Builder
Returns
Type Description
SdpRedactResult.Builder

addFindingsBuilder()

public SdpFinding.Builder addFindingsBuilder()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpFinding.Builder

addFindingsBuilder(int index)

public SdpFinding.Builder addFindingsBuilder(int index)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpFinding.Builder

addMessageItems(MessageItem value)

public SdpRedactResult.Builder addMessageItems(MessageItem value)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value MessageItem
Returns
Type Description
SdpRedactResult.Builder

addMessageItems(MessageItem.Builder builderForValue)

public SdpRedactResult.Builder addMessageItems(MessageItem.Builder builderForValue)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue MessageItem.Builder
Returns
Type Description
SdpRedactResult.Builder

addMessageItems(int index, MessageItem value)

public SdpRedactResult.Builder addMessageItems(int index, MessageItem value)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value MessageItem
Returns
Type Description
SdpRedactResult.Builder

addMessageItems(int index, MessageItem.Builder builderForValue)

public SdpRedactResult.Builder addMessageItems(int index, MessageItem.Builder builderForValue)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue MessageItem.Builder
Returns
Type Description
SdpRedactResult.Builder

addMessageItemsBuilder()

public MessageItem.Builder addMessageItemsBuilder()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
MessageItem.Builder

addMessageItemsBuilder(int index)

public MessageItem.Builder addMessageItemsBuilder(int index)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MessageItem.Builder

build()

public SdpRedactResult build()
Returns
Type Description
SdpRedactResult

buildPartial()

public SdpRedactResult buildPartial()
Returns
Type Description
SdpRedactResult

clear()

public SdpRedactResult.Builder clear()
Returns
Type Description
SdpRedactResult.Builder
Overrides

clearExecutionState()

public SdpRedactResult.Builder clearExecutionState()

Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not.

.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

clearExtractedImageText()

public SdpRedactResult.Builder clearExtractedImageText()

The extracted text from the image.

string extracted_image_text = 6;

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

clearFindings()

public SdpRedactResult.Builder clearFindings()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpRedactResult.Builder

clearMatchState()

public SdpRedactResult.Builder clearMatchState()

Output only. Match state for Sensitive Data Protection Redaction. Value is MATCH_FOUND if content is redacted.

.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

clearMessageItems()

public SdpRedactResult.Builder clearMessageItems()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpRedactResult.Builder

clearRedactedImage()

public SdpRedactResult.Builder clearRedactedImage()

Output only. The redacted image. The type will be the same as the original image.

bytes redacted_image = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

getDefaultInstanceForType()

public SdpRedactResult getDefaultInstanceForType()
Returns
Type Description
SdpRedactResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExecutionState()

public FilterExecutionState getExecutionState()

Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not.

.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FilterExecutionState

The executionState.

getExecutionStateValue()

public int getExecutionStateValue()

Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not.

.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for executionState.

getExtractedImageText()

public String getExtractedImageText()

The extracted text from the image.

string extracted_image_text = 6;

Returns
Type Description
String

The extractedImageText.

getExtractedImageTextBytes()

public ByteString getExtractedImageTextBytes()

The extracted text from the image.

string extracted_image_text = 6;

Returns
Type Description
ByteString

The bytes for extractedImageText.

getFindings(int index)

public SdpFinding getFindings(int index)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpFinding

getFindingsBuilder(int index)

public SdpFinding.Builder getFindingsBuilder(int index)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpFinding.Builder

getFindingsBuilderList()

public List<SdpFinding.Builder> getFindingsBuilderList()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getFindingsCount()

public int getFindingsCount()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getFindingsList()

public List<SdpFinding> getFindingsList()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<SdpFinding>

getFindingsOrBuilder(int index)

public SdpFindingOrBuilder getFindingsOrBuilder(int index)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpFindingOrBuilder

getFindingsOrBuilderList()

public List<? extends SdpFindingOrBuilder> getFindingsOrBuilderList()

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.modelarmor.v1.SdpFindingOrBuilder>

getMatchState()

public FilterMatchState getMatchState()

Output only. Match state for Sensitive Data Protection Redaction. Value is MATCH_FOUND if content is redacted.

.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FilterMatchState

The matchState.

getMatchStateValue()

public int getMatchStateValue()

Output only. Match state for Sensitive Data Protection Redaction. Value is MATCH_FOUND if content is redacted.

.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for matchState.

getMessageItems(int index)

public MessageItem getMessageItems(int index)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MessageItem

getMessageItemsBuilder(int index)

public MessageItem.Builder getMessageItemsBuilder(int index)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MessageItem.Builder

getMessageItemsBuilderList()

public List<MessageItem.Builder> getMessageItemsBuilderList()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getMessageItemsCount()

public int getMessageItemsCount()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getMessageItemsList()

public List<MessageItem> getMessageItemsList()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<MessageItem>

getMessageItemsOrBuilder(int index)

public MessageItemOrBuilder getMessageItemsOrBuilder(int index)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
MessageItemOrBuilder

getMessageItemsOrBuilderList()

public List<? extends MessageItemOrBuilder> getMessageItemsOrBuilderList()

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.modelarmor.v1.MessageItemOrBuilder>

getRedactedImage()

public ByteString getRedactedImage()

Output only. The redacted image. The type will be the same as the original image.

bytes redacted_image = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The redactedImage.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SdpRedactResult other)

public SdpRedactResult.Builder mergeFrom(SdpRedactResult other)
Parameter
Name Description
other SdpRedactResult
Returns
Type Description
SdpRedactResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SdpRedactResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SdpRedactResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SdpRedactResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SdpRedactResult.Builder
Overrides

removeFindings(int index)

public SdpRedactResult.Builder removeFindings(int index)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpRedactResult.Builder

removeMessageItems(int index)

public SdpRedactResult.Builder removeMessageItems(int index)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SdpRedactResult.Builder

setExecutionState(FilterExecutionState value)

public SdpRedactResult.Builder setExecutionState(FilterExecutionState value)

Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not.

.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value FilterExecutionState

The executionState to set.

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setExecutionStateValue(int value)

public SdpRedactResult.Builder setExecutionStateValue(int value)

Output only. Reports whether Sensitive Data Protection redaction was successfully executed or not.

.google.cloud.modelarmor.v1.FilterExecutionState execution_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setExtractedImageText(String value)

public SdpRedactResult.Builder setExtractedImageText(String value)

The extracted text from the image.

string extracted_image_text = 6;

Parameter
Name Description
value String

The extractedImageText to set.

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setExtractedImageTextBytes(ByteString value)

public SdpRedactResult.Builder setExtractedImageTextBytes(ByteString value)

The extracted text from the image.

string extracted_image_text = 6;

Parameter
Name Description
value ByteString

The bytes for extractedImageText to set.

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setFindings(int index, SdpFinding value)

public SdpRedactResult.Builder setFindings(int index, SdpFinding value)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value SdpFinding
Returns
Type Description
SdpRedactResult.Builder

setFindings(int index, SdpFinding.Builder builderForValue)

public SdpRedactResult.Builder setFindings(int index, SdpFinding.Builder builderForValue)

Output only. The findings. This field is populated in the response only when include_findings in the SDP template is set to true.

repeated .google.cloud.modelarmor.v1.SdpFinding findings = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue SdpFinding.Builder
Returns
Type Description
SdpRedactResult.Builder

setMatchState(FilterMatchState value)

public SdpRedactResult.Builder setMatchState(FilterMatchState value)

Output only. Match state for Sensitive Data Protection Redaction. Value is MATCH_FOUND if content is redacted.

.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value FilterMatchState

The matchState to set.

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setMatchStateValue(int value)

public SdpRedactResult.Builder setMatchStateValue(int value)

Output only. Match state for Sensitive Data Protection Redaction. Value is MATCH_FOUND if content is redacted.

.google.cloud.modelarmor.v1.FilterMatchState match_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

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

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.

setMessageItems(int index, MessageItem value)

public SdpRedactResult.Builder setMessageItems(int index, MessageItem value)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value MessageItem
Returns
Type Description
SdpRedactResult.Builder

setMessageItems(int index, MessageItem.Builder builderForValue)

public SdpRedactResult.Builder setMessageItems(int index, MessageItem.Builder builderForValue)

Output only. Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

repeated .google.cloud.modelarmor.v1.MessageItem message_items = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue MessageItem.Builder
Returns
Type Description
SdpRedactResult.Builder

setRedactedImage(ByteString value)

public SdpRedactResult.Builder setRedactedImage(ByteString value)

Output only. The redacted image. The type will be the same as the original image.

bytes redacted_image = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The redactedImage to set.

Returns
Type Description
SdpRedactResult.Builder

This builder for chaining.