Data Loss Prevention V2 Client - Class ImageRedactionConfig (2.0.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
Name Description
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
Type Description
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
Name Description
var Google\Cloud\Dlp\V2\InfoType
Returns
Type Description
$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
Type Description
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
Name Description
var bool
Returns
Type Description
$this

getRedactionColor

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

Returns
Type Description
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
Name Description
var Google\Cloud\Dlp\V2\Color
Returns
Type Description
$this

getTarget

Returns
Type Description
string