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

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

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

Returns a new instance of Relation



1082
1083
1084
# File 'generated/google/apis/people_v1/classes.rb', line 1082

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

Instance Attribute Details

#formatted_typeString

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)


1075
1076
1077
# File 'generated/google/apis/people_v1/classes.rb', line 1075

def formatted_type
  @formatted_type
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



1069
1070
1071
# File 'generated/google/apis/people_v1/classes.rb', line 1069

def 
  @metadata
end

#personString

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

Returns:

  • (String)


1080
1081
1082
# File 'generated/google/apis/people_v1/classes.rb', line 1080

def person
  @person
end

#typeString

The person's relation to the other person. The type can be custom or predefined. Possible values include, but are not limited to, the following values:

  • spouse
  • child
  • mother
  • father
  • parent
  • brother
  • sister
  • friend
  • relative
  • domesticPartner
  • manager
  • assistant
  • referredBy
  • partner Corresponds to the JSON property type

Returns:

  • (String)


1064
1065
1066
# File 'generated/google/apis/people_v1/classes.rb', line 1064

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1087
1088
1089
1090
1091
1092
# File 'generated/google/apis/people_v1/classes.rb', line 1087

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