Class: Google::Apis::PeopleV1::EmailAddress

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 email address.

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

Returns a new instance of EmailAddress



1025
1026
1027
# File 'generated/google/apis/people_v1/classes.rb', line 1025

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

Instance Attribute Details

#display_nameString

The display name of the email. Corresponds to the JSON property displayName

Returns:

  • (String)


998
999
1000
# File 'generated/google/apis/people_v1/classes.rb', line 998

def display_name
  @display_name
end

#formatted_typeString

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

Returns:

  • (String)


1023
1024
1025
# File 'generated/google/apis/people_v1/classes.rb', line 1023

def formatted_type
  @formatted_type
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



1012
1013
1014
# File 'generated/google/apis/people_v1/classes.rb', line 1012

def 
  @metadata
end

#typeString

The type of the email address. The type can be custom or predefined. Possible values include, but are not limited to, the following:

  • home
  • work
  • other Corresponds to the JSON property type

Returns:

  • (String)


1007
1008
1009
# File 'generated/google/apis/people_v1/classes.rb', line 1007

def type
  @type
end

#valueString

The email address. Corresponds to the JSON property value

Returns:

  • (String)


1017
1018
1019
# File 'generated/google/apis/people_v1/classes.rb', line 1017

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1030
1031
1032
1033
1034
1035
1036
# File 'generated/google/apis/people_v1/classes.rb', line 1030

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