目录

About

Class Info

public final class About extends GenericJson

User information class, including the user name, storage quota, maximum size of a file that can be uploaded by the user, and whether the user needs to update the security policy.

Nested Class Summary

Type

Class Name and Description

static final class

About.StorageQuota

Declaration of the About.StorageQuota class, including the storage quota and usage. All fields are measured in bytes.

Public Constructor Summary

Constructor Name

About()

Constructs an About object.

Public Method Summary

Qualifier and Type

Method Name and Description

Boolean

isNeedUpdate()

Checks whether a user needs to update the security policy.

About

setNeedUpdate(boolean needUpdate)

Sets whether a user needs to update the security policy.

String

getUpdateUrl()

Obtains the URL of the web page for updating the security policy.

About

setUpdateUrl(String updateUrl)

Sets the URL of the web page for updating the security policy.

String

getCategory()

Obtains the resource type.

About

setCategory(String category)

Sets the resource type.

Long

getMaxFileUploadSize()

Obtains the maximum size of a file that can be uploaded, in bytes.

About

setMaxFileUploadSize(Long maxFileUploadSize)

Sets the maximum size of a file that can be uploaded, in bytes.

About.StorageQuota

getStorageQuota()

Obtains a user's storage quota and usage, in bytes.

About

setStorageQuota(StorageQuota storageQuota)

Sets a user's storage quota and usage, in bytes.

User

getUser()

Obtains information about the user who has signed in.

About

setUser(User user)

Sets information about the user who has signed in.

Long

getMaxThumbnailSize()

Obtains the maximum thumbnail size, in bytes.

About

setMaxThumbnailSize(Long maxThumbnailSize)

Sets the maximum thumbnail size, in bytes.

About

set(String fieldName, Object value)

Sets a custom attribute and its value.

About

clone()

Clones an About object.

Public Constructors

[h2]About

Constructor

About()

Constructs an About object.

Public Methods

[h2]isNeedUpdate

Method

public Boolean isNeedUpdate()

Checks whether a user needs to update the security policy.

Returns

Type

Description

Boolean

Whether a user needs to update the security policy. The needUpdate field is optional, and the Drive.About.Get API may not return this field.

[h2]setNeedUpdate

Method

public About setNeedUpdate(boolean needUpdate)

Sets whether a user needs to update the security policy.

Parameters

Name

Description

needUpdate

Indicates whether to update the security policy for the user.

true if the user needs to update the security policy; false otherwise.

Returns

Type

Description

About

An About object.

[h2]getUpdateUrl

Method

public String getUpdateUrl()

Obtains the URL of the web page for updating the security policy.

Returns

Type

Description

String

URL of the web page for updating the security policy.

[h2]setUpdateUrl

Method

public About setUpdateUrl(String updateUrl)

Sets the URL of the web page for updating the security policy.

Parameters

Name

Description

updateUrl

URL of the web page for updating the security policy.

When the value of needUpdate is true, a URL is returned to the app. In this case, the app needs to call a browser to open the user authorization page.

Returns

Type

Description

About

An About object.

[h2]getCategory

Method

public String getCategory()

Obtains the resource type.

Returns

Type

Description

String

Resource type.

[h2]setCategory

Method

public About setCategory(String category)

Sets the resource type.

Parameters

Name

Description

category

Resource type, for example, drive#about.

Returns

Type

Description

About

An About object.

[h2]getMaxFileUploadSize

Method

public Long getMaxFileUploadSize()

Obtains the maximum size of a file that can be uploaded, in bytes.

Returns

Type

Description

Long

Maximum size of a file that can be uploaded.

[h2]setMaxFileUploadSize

Method

public About setMaxFileUploadSize(Long maxFileUploadSize)

Sets the maximum size of a file that can be uploaded, in bytes.

Parameters

Name

Description

maxFileUploadSize

Maximum size of a file that can be uploaded.

Returns

Type

Description

About

An About object.

[h2]getStorageQuota

Method

public About.StorageQuota getStorageQuota()

Obtains a user's storage quota and usage, in bytes.

Returns

Type

Description

About.StorageQuota

An About.StorageQuota object.

[h2]setStorageQuota

Method

public About setStorageQuota(StorageQuota storageQuota)

Sets a user's storage quota and usage, in bytes.

Parameters

Name

Description

storageQuota

Storage quota and usage of a user.

Returns

Type

Description

About

An About object.

[h2]getUser

Method

public User getUser()

Obtains information about the user who has signed in.

Returns

Type

Description

User

A User object.

[h2]setUser

Method

public About setUser(User user)

Sets information about the user who has signed in.

Parameters

Name

Description

user

Information about the user who has signed in.

Returns

Type

Description

About

An About object.

[h2]getMaxThumbnailSize

Method

public Long getMaxThumbnailSize()

Obtains the maximum thumbnail size.

Returns

Type

Description

Long

Maximum thumbnail size, in bytes.

[h2]setMaxThumbnailSize

Method

public About setMaxThumbnailSize(Long maxThumbnailSize)

Sets the maximum thumbnail size.

Parameters

Name

Description

maxThumbnailSize

Maximum thumbnail size to be set, in bytes.

Returns

Type

Description

About

An About object.

[h2]set

Method

public About set(String fieldName,Object value)

Sets a custom attribute and its value.

Parameters

Name

Description

fieldName

Attribute name.

value

Attribute value.

Returns

Type

Description

About

An About object.

[h2]clone

Method

public About clone()

Clones an About object.

Returns

Type

Description

About

An About object.