Data Loss Prevention V2 Client - Class DateTime (1.12.0)

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
NameDescription
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
TypeDescription
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
NameDescription
var Google\Type\Date
Returns
TypeDescription
$this

getDayOfWeek

Day of week

Returns
TypeDescription
int

setDayOfWeek

Day of week

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTime

Time of day

Returns
TypeDescription
Google\Type\TimeOfDay|null

hasTime

clearTime

setTime

Time of day

Parameter
NameDescription
var Google\Type\TimeOfDay
Returns
TypeDescription
$this

getTimeZone

Time zone

Returns
TypeDescription
Google\Cloud\Dlp\V2\DateTime\TimeZone|null

hasTimeZone

clearTimeZone

setTimeZone

Time zone

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