Class: Google::Apis::PeopleV1::Gender

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

Overview

A person's gender.

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) ⇒ Gender

Returns a new instance of Gender.


548
549
550
# File 'generated/google/apis/people_v1/classes.rb', line 548

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

Instance Attribute Details

#formatted_valueString

The read-only value of the gender translated and formatted in the viewer's account locale or the Accept-Language HTTP header locale. Corresponds to the JSON property formattedValue

Returns:

  • (String)

546
547
548
# File 'generated/google/apis/people_v1/classes.rb', line 546

def formatted_value
  @formatted_value
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata


533
534
535
# File 'generated/google/apis/people_v1/classes.rb', line 533

def 
  @metadata
end

#valueString

The gender for the person. The gender can be custom or predefined. Possible values include, but are not limited to, the following: * male * female * other * unknown Corresponds to the JSON property value

Returns:

  • (String)

540
541
542
# File 'generated/google/apis/people_v1/classes.rb', line 540

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


553
554
555
556
557
# File 'generated/google/apis/people_v1/classes.rb', line 553

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