Class: Google::Apis::PeopleV1::Name

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 name. If the name is a mononym, the family name is empty.

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

Returns a new instance of Name.


414
415
416
# File 'generated/google/apis/people_v1/classes.rb', line 414

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

Instance Attribute Details

#display_nameString

The display name formatted according to the locale specified by the viewer's account or the Accept-Language HTTP header. Corresponds to the JSON property displayName

Returns:

  • (String)

362
363
364
# File 'generated/google/apis/people_v1/classes.rb', line 362

def display_name
  @display_name
end

#family_nameString

The family name. Corresponds to the JSON property familyName

Returns:

  • (String)

367
368
369
# File 'generated/google/apis/people_v1/classes.rb', line 367

def family_name
  @family_name
end

#given_nameString

The given name. Corresponds to the JSON property givenName

Returns:

  • (String)

372
373
374
# File 'generated/google/apis/people_v1/classes.rb', line 372

def given_name
  @given_name
end

#honorific_prefixString

The honorific prefixes, such as Mrs. or Dr. Corresponds to the JSON property honorificPrefix

Returns:

  • (String)

382
383
384
# File 'generated/google/apis/people_v1/classes.rb', line 382

def honorific_prefix
  @honorific_prefix
end

#honorific_suffixString

The honorific suffixes, such as Jr. Corresponds to the JSON property honorificSuffix

Returns:

  • (String)

387
388
389
# File 'generated/google/apis/people_v1/classes.rb', line 387

def honorific_suffix
  @honorific_suffix
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata


356
357
358
# File 'generated/google/apis/people_v1/classes.rb', line 356

def 
  @metadata
end

#middle_nameString

The middle name(s). Corresponds to the JSON property middleName

Returns:

  • (String)

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

def middle_name
  @middle_name
end

#phonetic_family_nameString

The family name spelled as it sounds. Corresponds to the JSON property phoneticFamilyName

Returns:

  • (String)

392
393
394
# File 'generated/google/apis/people_v1/classes.rb', line 392

def phonetic_family_name
  @phonetic_family_name
end

#phonetic_given_nameString

The given name spelled as it sounds. Corresponds to the JSON property phoneticGivenName

Returns:

  • (String)

397
398
399
# File 'generated/google/apis/people_v1/classes.rb', line 397

def phonetic_given_name
  @phonetic_given_name
end

#phonetic_honorific_prefixString

The honorific prefixes spelled as they sound. Corresponds to the JSON property phoneticHonorificPrefix

Returns:

  • (String)

407
408
409
# File 'generated/google/apis/people_v1/classes.rb', line 407

def phonetic_honorific_prefix
  @phonetic_honorific_prefix
end

#phonetic_honorific_suffixString

The honorific suffixes spelled as they sound. Corresponds to the JSON property phoneticHonorificSuffix

Returns:

  • (String)

412
413
414
# File 'generated/google/apis/people_v1/classes.rb', line 412

def phonetic_honorific_suffix
  @phonetic_honorific_suffix
end

#phonetic_middle_nameString

The middle name(s) spelled as they sound. Corresponds to the JSON property phoneticMiddleName

Returns:

  • (String)

402
403
404
# File 'generated/google/apis/people_v1/classes.rb', line 402

def phonetic_middle_name
  @phonetic_middle_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


419
420
421
422
423
424
425
426
427
428
429
430
431
432
# File 'generated/google/apis/people_v1/classes.rb', line 419

def update!(**args)
  @metadata = args[:metadata] if args.key?(:metadata)
  @display_name = args[:display_name] if args.key?(:display_name)
  @family_name = args[:family_name] if args.key?(:family_name)
  @given_name = args[:given_name] if args.key?(:given_name)
  @middle_name = args[:middle_name] if args.key?(:middle_name)
  @honorific_prefix = args[:honorific_prefix] if args.key?(:honorific_prefix)
  @honorific_suffix = args[:honorific_suffix] if args.key?(:honorific_suffix)
  @phonetic_family_name = args[:phonetic_family_name] if args.key?(:phonetic_family_name)
  @phonetic_given_name = args[:phonetic_given_name] if args.key?(:phonetic_given_name)
  @phonetic_middle_name = args[:phonetic_middle_name] if args.key?(:phonetic_middle_name)
  @phonetic_honorific_prefix = args[:phonetic_honorific_prefix] if args.key?(:phonetic_honorific_prefix)
  @phonetic_honorific_suffix = args[:phonetic_honorific_suffix] if args.key?(:phonetic_honorific_suffix)
end