Data Loss Prevention V2 Client - Class DateTime (1.15.1)

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

Message for a date time object.

e.g. 2018-01-01, 5th August.

Generated from protobuf message google.privacy.dlp.v2.DateTime

Namespace

Google \ Cloud \ Dlp \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ date Google\Type\Date

One or more of the following must be set. Must be a valid date or time value.

↳ day_of_week int

Day of week

↳ time Google\Type\TimeOfDay

Time of day

↳ time_zone Google\Cloud\Dlp\V2\DateTime\TimeZone

Time zone

getDate

One or more of the following must be set.

Must be a valid date or time value.

Returns
Type Description
Google\Type\Date|null

hasDate

clearDate

setDate

One or more of the following must be set.

Must be a valid date or time value.

Parameter
Name Description
var Google\Type\Date
Returns
Type Description
$this

getDayOfWeek

Day of week

Returns
Type Description
int

setDayOfWeek

Day of week

Parameter
Name Description
var int
Returns
Type Description
$this

getTime

Time of day

Returns
Type Description
Google\Type\TimeOfDay|null

hasTime

clearTime

setTime

Time of day

Parameter
Name Description
var Google\Type\TimeOfDay
Returns
Type Description
$this

getTimeZone

Time zone

Returns
Type Description
Google\Cloud\Dlp\V2\DateTime\TimeZone|null

hasTimeZone

clearTimeZone

setTimeZone

Time zone

Parameter
Name Description
var Google\Cloud\Dlp\V2\DateTime\TimeZone
Returns
Type Description
$this