Class: Google::Apis::DlpV2::GooglePrivacyDlpV2DateTime

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dlp_v2/classes.rb,
generated/google/apis/dlp_v2/representations.rb,
generated/google/apis/dlp_v2/representations.rb

Overview

Message for a date time object. e.g. 2018-01-01, 5th August.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2DateTime

Returns a new instance of GooglePrivacyDlpV2DateTime.



1617
1618
1619
# File 'generated/google/apis/dlp_v2/classes.rb', line 1617

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dateGoogle::Apis::DlpV2::GoogleTypeDate

Represents a whole or partial calendar date, e.g. a birthday. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. This can represent:

  • A full date, with non-zero year, month and day values
  • A month and day value, with a zero year, e.g. an anniversary
  • A year on its own, with zero month and day values
  • A year and month value, with a zero day, e.g. a credit card expiration date Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property date


1598
1599
1600
# File 'generated/google/apis/dlp_v2/classes.rb', line 1598

def date
  @date
end

#day_of_weekString

Corresponds to the JSON property dayOfWeek

Returns:

  • (String)


1603
1604
1605
# File 'generated/google/apis/dlp_v2/classes.rb', line 1603

def day_of_week
  @day_of_week
end

#timeGoogle::Apis::DlpV2::GoogleTypeTimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property time



1610
1611
1612
# File 'generated/google/apis/dlp_v2/classes.rb', line 1610

def time
  @time
end

#time_zoneGoogle::Apis::DlpV2::GooglePrivacyDlpV2TimeZone

Corresponds to the JSON property timeZone



1615
1616
1617
# File 'generated/google/apis/dlp_v2/classes.rb', line 1615

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1622
1623
1624
1625
1626
1627
# File 'generated/google/apis/dlp_v2/classes.rb', line 1622

def update!(**args)
  @date = args[:date] if args.key?(:date)
  @day_of_week = args[:day_of_week] if args.key?(:day_of_week)
  @time = args[:time] if args.key?(:time)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
end