Data Loss Prevention V2 Client - Class ImageRedactionConfig (1.9.0)

Reference documentation and code samples for the Data Loss Prevention V2 Client class ImageRedactionConfig.

Configuration for determining how redaction of images should occur.

Generated from protobuf message google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig

Namespace

Google \ Cloud \ Dlp \ V2 \ RedactImageRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ info_type Google\Cloud\Dlp\V2\InfoType

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.

↳ redact_all_text bool

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

↳ redaction_color Google\Cloud\Dlp\V2\Color

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

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.

Returns
TypeDescription
Google\Cloud\Dlp\V2\InfoType|null

hasInfoType

setInfoType

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.

Parameter
NameDescription
var Google\Cloud\Dlp\V2\InfoType
Returns
TypeDescription
$this

getRedactAllText

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

Returns
TypeDescription
bool

hasRedactAllText

setRedactAllText

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

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getRedactionColor

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

Returns
TypeDescription
Google\Cloud\Dlp\V2\Color|null

hasRedactionColor

clearRedactionColor

setRedactionColor

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

Parameter
NameDescription
var Google\Cloud\Dlp\V2\Color
Returns
TypeDescription
$this

getTarget

Returns
TypeDescription
string