Class: Google::Apis::PeopleV1::Birthday

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

Overview

A person's birthday. At least one of the date and text fields are specified. The date and text fields typically represent the same date, but are not guaranteed to. Clients should always set the date field when mutating birthdays.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Birthday

Returns a new instance of Birthday.



377
378
379
# File 'lib/google/apis/people_v1/classes.rb', line 377

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

Instance Attribute Details

#dateGoogle::Apis::PeopleV1::Date

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



364
365
366
# File 'lib/google/apis/people_v1/classes.rb', line 364

def date
  @date
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



369
370
371
# File 'lib/google/apis/people_v1/classes.rb', line 369

def 
  @metadata
end

#textString

Prefer to use the date field if set. A free-form string representing the user's birthday. This value is not validated. Corresponds to the JSON property text

Returns:

  • (String)


375
376
377
# File 'lib/google/apis/people_v1/classes.rb', line 375

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



382
383
384
385
386
# File 'lib/google/apis/people_v1/classes.rb', line 382

def update!(**args)
  @date = args[:date] if args.key?(:date)
  @metadata = args[:metadata] if args.key?(:metadata)
  @text = args[:text] if args.key?(:text)
end