Class: Google::Apis::PeopleV1::Relation

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 relation to another person.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Relation

Returns a new instance of Relation.



2363
2364
2365
# File 'lib/google/apis/people_v1/classes.rb', line 2363

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

Instance Attribute Details

#formatted_typeString

Output only. The type of the relation translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header. Corresponds to the JSON property formattedType

Returns:

  • (String)


2343
2344
2345
# File 'lib/google/apis/people_v1/classes.rb', line 2343

def formatted_type
  @formatted_type
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



2348
2349
2350
# File 'lib/google/apis/people_v1/classes.rb', line 2348

def 
  @metadata
end

#personString

The name of the other person this relation refers to. Corresponds to the JSON property person

Returns:

  • (String)


2353
2354
2355
# File 'lib/google/apis/people_v1/classes.rb', line 2353

def person
  @person
end

#typeString

The person's relation to the other person. The type can be custom or one of these predefined values: * spouse * child * mother * father * parent

  • brother * sister * friend * relative * domesticPartner * manager
  • assistant * referredBy * partner Corresponds to the JSON property type

Returns:

  • (String)


2361
2362
2363
# File 'lib/google/apis/people_v1/classes.rb', line 2361

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2368
2369
2370
2371
2372
2373
# File 'lib/google/apis/people_v1/classes.rb', line 2368

def update!(**args)
  @formatted_type = args[:formatted_type] if args.key?(:formatted_type)
  @metadata = args[:metadata] if args.key?(:metadata)
  @person = args[:person] if args.key?(:person)
  @type = args[:type] if args.key?(:type)
end