Class: Google::Apis::PeopleV1::Photo

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 photo. A picture shown next to the person's name to help others recognize the 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) ⇒ Photo

Returns a new instance of Photo.



1735
1736
1737
# File 'generated/google/apis/people_v1/classes.rb', line 1735

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

Instance Attribute Details

#defaultBoolean Also known as: default?

True if the photo is a default photo; false if the photo is a user-provided photo. Corresponds to the JSON property default

Returns:

  • (Boolean)


1718
1719
1720
# File 'generated/google/apis/people_v1/classes.rb', line 1718

def default
  @default
end

#metadataGoogle::Apis::PeopleV1::FieldMetadata

Metadata about a field. Corresponds to the JSON property metadata



1724
1725
1726
# File 'generated/google/apis/people_v1/classes.rb', line 1724

def 
  @metadata
end

#urlString

The URL of the photo. You can change the desired size by appending a query parameter sz=size`at the end of the url, wheresizeis the size in pixels. Example: https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/ 00gzXvDBYqw/s100/photo.jpg?sz=50 Corresponds to the JSON propertyurl`

Returns:

  • (String)


1733
1734
1735
# File 'generated/google/apis/people_v1/classes.rb', line 1733

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1740
1741
1742
1743
1744
# File 'generated/google/apis/people_v1/classes.rb', line 1740

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