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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dlp_v2/classes.rb,
lib/google/apis/dlp_v2/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ GooglePrivacyDlpV2DateTime

Returns a new instance of GooglePrivacyDlpV2DateTime.



2978
2979
2980
# File 'lib/google/apis/dlp_v2/classes.rb', line 2978

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

Instance Attribute Details

#dateGoogle::Apis::DlpV2::GoogleTypeDate

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property date



2959
2960
2961
# File 'lib/google/apis/dlp_v2/classes.rb', line 2959

def date
  @date
end

#day_of_weekString

Day of week Corresponds to the JSON property dayOfWeek

Returns:

  • (String)


2964
2965
2966
# File 'lib/google/apis/dlp_v2/classes.rb', line 2964

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



2971
2972
2973
# File 'lib/google/apis/dlp_v2/classes.rb', line 2971

def time
  @time
end

#time_zoneGoogle::Apis::DlpV2::GooglePrivacyDlpV2TimeZone

Time zone of the date time object. Corresponds to the JSON property timeZone



2976
2977
2978
# File 'lib/google/apis/dlp_v2/classes.rb', line 2976

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2983
2984
2985
2986
2987
2988
# File 'lib/google/apis/dlp_v2/classes.rb', line 2983

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