Class: Google::Apis::AdminDirectoryV1::UserPhoto

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/admin_directory_v1/classes.rb,
lib/google/apis/admin_directory_v1/representations.rb,
lib/google/apis/admin_directory_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UserPhoto

Returns a new instance of UserPhoto.



4603
4604
4605
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4603

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

Instance Attribute Details

#etagString

ETag of the resource. Corresponds to the JSON property etag

Returns:

  • (String)


4556
4557
4558
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4556

def etag
  @etag
end

#heightFixnum

Height of the photo in pixels. Corresponds to the JSON property height

Returns:

  • (Fixnum)


4561
4562
4563
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4561

def height
  @height
end

#idString

The ID the API uses to uniquely identify the user. Corresponds to the JSON property id

Returns:

  • (String)


4566
4567
4568
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4566

def id
  @id
end

#kindString

The type of the API resource. For Photo resources, this is admin#directory# user#photo. Corresponds to the JSON property kind

Returns:

  • (String)


4572
4573
4574
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4572

def kind
  @kind
end

#mime_typeString

The MIME type of the photo. Allowed values are JPEG, PNG, GIF, BMP, TIFF, and web-safe base64 encoding. Corresponds to the JSON property mimeType

Returns:

  • (String)


4578
4579
4580
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4578

def mime_type
  @mime_type
end

#photo_dataString

The user photo's upload data in web-safe Base64 format in bytes. This means: * The slash (/) character is replaced with the underscore (_) character. * The plus sign (+) character is replaced with the hyphen (-) character. * The equals sign (=) character is replaced with the asterisk (*). * For padding, the period (.) character is used instead of the RFC-4648 baseURL definition which uses the equals sign (=) for padding. This is done to simplify URL-parsing. * Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels. Corresponds to the JSON property photoData NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


4591
4592
4593
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4591

def photo_data
  @photo_data
end

#primary_emailString

The user's primary email address. Corresponds to the JSON property primaryEmail

Returns:

  • (String)


4596
4597
4598
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4596

def primary_email
  @primary_email
end

#widthFixnum

Width of the photo in pixels. Corresponds to the JSON property width

Returns:

  • (Fixnum)


4601
4602
4603
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4601

def width
  @width
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
# File 'lib/google/apis/admin_directory_v1/classes.rb', line 4608

def update!(**args)
  @etag = args[:etag] if args.key?(:etag)
  @height = args[:height] if args.key?(:height)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @mime_type = args[:mime_type] if args.key?(:mime_type)
  @photo_data = args[:photo_data] if args.key?(:photo_data)
  @primary_email = args[:primary_email] if args.key?(:primary_email)
  @width = args[:width] if args.key?(:width)
end