目录

HistoryVersion

Class Info

public final class HistoryVersion extends GenericJson

Metadata class for historical file versions.

Public Constructor Summary

Constructor Name

HistoryVersion()

Constructs a HistoryVersion object.

Public Method Summary

Qualifier and Type

Method Name and Description

HistoryVersion

clone()

Clones a HistoryVersion object.

String

getId()

Obtains the ID of a historical file version.

HistoryVersion

setId(String id)

Sets the ID of a historical file version.

Boolean

getKeepPermanent()

Checks whether to permanently keep a historical version, even if it is not the latest version.

HistoryVersion

setKeepPermanent(Boolean keepPermanent)

Sets whether to permanently keep a historical version, even if it is not the latest version.

String

getCategory()

Obtains the resource type.

HistoryVersion

setCategory(String category)

Sets the resource type. The value is always drive#historyVersion.

User

getLastEditor()

Obtains the last user who modified a historical file version.

HistoryVersion

setLastEditor(User lastEditor)

Sets the last user who modified a historical file version.

String

getSha256()

Obtains the SHA-256 value of a historical file version.

HistoryVersion

setSha256(String sha256)

Sets the SHA-256 value of a historical file version.

String

getMimeType()

Obtains the MIME type of the file.

HistoryVersion

setMimeType(String mimeType)

Sets the MIME type of the file.

com.huawei.cloud.base.util.DateTime

getEditedTime()

Obtains the time when a historical version is modified.

HistoryVersion

setEditedTime(DateTime editedTime)

Sets the time when a historical version is modified.

String

getOriginalFilename()

Obtains the original file name of a historical version.

HistoryVersion

setOriginalFilename(String originalFilename)

Sets the original file name of a historical version.

Long

getSize()

Obtains the change in the file size of a historical version, in bytes.

HistoryVersion

setSize(Long size)

Sets the file size of a historical version, in bytes.

HistoryVersion

set(String fieldName, Object value)

Sets a custom attribute and its value.

Public Constructors

[h2]HistoryVersion

Constructor

HistoryVersion()

Constructs a HistoryVersion object.

Public Methods

[h2]clone

Method

public HistoryVersion clone()

Clones a HistoryVersion object.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getId

Method

public String getId()

Obtains the ID of a historical file version.

Returns

Type

Description

String

ID of a historical file version.

[h2]setId

Method

public HistoryVersion setId(String id)

Sets the ID of a historical file version.

Parameters

Name

Description

id

ID of a historical file version.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getKeepPermanent

Method

public Boolean getKeepPermanent()

Checks whether to permanently keep a historical version, even if it is not the latest version.

Returns

Type

Description

Boolean

Whether to permanently keep a historical version, even if it is not the latest version.

[h2]setKeepPermanent

Method

public HistoryVersion setKeepPermanent(Boolean keepPermanent)

Sets whether to permanently keep a historical version, even if it is not the latest version.

Parameters

Name

Description

keepPermanent

Whether to permanently keep a historical version, even if it is not the latest version.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getCategory

Method

public String getCategory()

Obtains the resource type.

Returns

Type

Description

String

Resource type. The value is always drive#historyVersion.

[h2]setCategory

Method

public HistoryVersion setCategory(String category)

Sets the resource type.

Parameters

Name

Description

category

Resource type. The value is always drive#historyVersion.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getLastEditor

Method

public User getLastEditor()

Obtains the last user who modified a historical file version.

Returns

Type

Description

User

Last user who modified a historical file version.

[h2]setLastEditor

Method

public HistoryVersion setLastEditor(User lastEditor)

Sets the last user who modified a historical file version.

Parameters

Name

Description

lastEditor

Last user who modified a historical file version.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getSha256

Method

public String getSha256()

Obtains the SHA-256 value of a historical file version.

Returns

Type

Description

String

SHA-256 value of a historical file version.

[h2]setSha256

Method

public HistoryVersion setSha256(String sha256)

Sets the SHA-256 value of a historical file version.

Parameters

Name

Description

sha256

SHA-256 value for verifying a historical file version. This parameter may not be set on the client. If it is set, the server will use the SHA-256 value for verifying the historical file version.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getMimeType

Method

public String getMimeType()

Obtains the MIME type of the file.

Returns

Type

Description

String

MIME type of the file.

[h2]setMimeType

Method

public HistoryVersion setMimeType(String mimeType)

Sets the MIME type of the file.

Parameters

Name

Description

mimeType

MIME type of the file.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getEditedTime

Method

public com.huawei.cloud.base.util.DateTime getEditedTime()

Obtains the time when a historical version is modified.

Returns

Type

Description

com.huawei.cloud.base.util.DateTime

Time when a historical version is modified.

[h2]setEditedTime

Method

public HistoryVersion setEditedTime(DateTime editedTime)

Sets the time when a historical version is modified.

Parameters

Name

Description

editedTime

Time when a historical version is modified.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getOriginalFilename

Method

public String getOriginalFilename()

Obtains the original file name of a historical version.

Returns

Type

Description

String

Original file name of a historical version.

[h2]setOriginalFilename

Method

public HistoryVersion setOriginalFilename(String originalFilename)

Sets the original file name of a historical version.

Parameters

Name

Description

originalFilename

Original file name of a historical version.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]getSize

Method

public Long getSize()

Obtains the change in the file size of a historical version, in bytes.

Returns

Type

Description

Long

File size of a historical version, in bytes.

[h2]setSize

Method

public HistoryVersion setSize(Long size)

Sets the file size of a historical version, in bytes.

Parameters

Name

Description

size

File size of a historical version, in bytes.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.

[h2]set

Method

public HistoryVersion set(String fieldName, Object value)

Sets a custom attribute and its value.

Parameters

Name

Description

fieldName

Attribute name.

value

Attribute value.

Returns

Type

Description

HistoryVersion

A HistoryVersion object.