Class: Google::Apis::DriveV3::User

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

Overview

Information about a Drive user.

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

Returns a new instance of User.



1538
1539
1540
# File 'generated/google/apis/drive_v3/classes.rb', line 1538

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

Instance Attribute Details

#display_nameString

A plain text displayable name for this user. Corresponds to the JSON property displayName

Returns:

  • (String)


1509
1510
1511
# File 'generated/google/apis/drive_v3/classes.rb', line 1509

def display_name
  @display_name
end

#email_addressString

The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester. Corresponds to the JSON property emailAddress

Returns:

  • (String)


1515
1516
1517
# File 'generated/google/apis/drive_v3/classes.rb', line 1515

def email_address
  @email_address
end

#kindString

This is always drive#user. Corresponds to the JSON property kind

Returns:

  • (String)


1520
1521
1522
# File 'generated/google/apis/drive_v3/classes.rb', line 1520

def kind
  @kind
end

#meBoolean Also known as: me?

Whether this user is the requesting user. Corresponds to the JSON property me

Returns:

  • (Boolean)


1525
1526
1527
# File 'generated/google/apis/drive_v3/classes.rb', line 1525

def me
  @me
end

#permission_idString

The user's ID as visible in Permission resources. Corresponds to the JSON property permissionId

Returns:

  • (String)


1531
1532
1533
# File 'generated/google/apis/drive_v3/classes.rb', line 1531

def permission_id
  @permission_id
end

A link to the user's profile photo, if available. Corresponds to the JSON property photoLink

Returns:

  • (String)


1536
1537
1538
# File 'generated/google/apis/drive_v3/classes.rb', line 1536

def photo_link
  @photo_link
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1543
1544
1545
1546
1547
1548
1549
1550
# File 'generated/google/apis/drive_v3/classes.rb', line 1543

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @email_address = args[:email_address] if args.key?(:email_address)
  @kind = args[:kind] if args.key?(:kind)
  @me = args[:me] if args.key?(:me)
  @permission_id = args[:permission_id] if args.key?(:permission_id)
  @photo_link = args[:photo_link] if args.key?(:photo_link)
end