Represents a StorageObject.
Package
@google-cloud/storage-controlConstructors
(constructor)(properties)
constructor(properties?: google.storage.v2.IStorageObject);Constructs a new StorageObject.
| Parameter | |
|---|---|
| Name | Description |
properties |
IStorageObject
Properties to set |
Properties
acl
public acl: google.storage.v2.IObjectAccessControl[];StorageObject acl.
bucket
public bucket: string;StorageObject bucket.
cacheControl
public cacheControl: string;StorageObject cacheControl.
checksums
public checksums?: (google.storage.v2.IObjectChecksums|null);StorageObject checksums.
componentCount
public componentCount: number;StorageObject componentCount.
contentDisposition
public contentDisposition: string;StorageObject contentDisposition.
contentEncoding
public contentEncoding: string;StorageObject contentEncoding.
contentLanguage
public contentLanguage: string;StorageObject contentLanguage.
contentType
public contentType: string;StorageObject contentType.
contexts
public contexts?: (google.storage.v2.IObjectContexts|null);StorageObject contexts.
createTime
public createTime?: (google.protobuf.ITimestamp|null);StorageObject createTime.
customerEncryption
public customerEncryption?: (google.storage.v2.ICustomerEncryption|null);StorageObject customerEncryption.
customTime
public customTime?: (google.protobuf.ITimestamp|null);StorageObject customTime.
deleteTime
public deleteTime?: (google.protobuf.ITimestamp|null);StorageObject deleteTime.
etag
public etag: string;StorageObject etag.
eventBasedHold
public eventBasedHold?: (boolean|null);StorageObject eventBasedHold.
finalizeTime
public finalizeTime?: (google.protobuf.ITimestamp|null);StorageObject finalizeTime.
generation
public generation: (number|Long|string);StorageObject generation.
hardDeleteTime
public hardDeleteTime?: (google.protobuf.ITimestamp|null);StorageObject hardDeleteTime.
kmsKey
public kmsKey: string;StorageObject kmsKey.
metadata
public metadata: { [k: string]: string };StorageObject metadata.
metageneration
public metageneration: (number|Long|string);StorageObject metageneration.
name
public name: string;StorageObject name.
owner
public owner?: (google.storage.v2.IOwner|null);StorageObject owner.
restoreToken
public restoreToken?: (string|null);StorageObject restoreToken.
retention
public retention?: (google.storage.v2.StorageObject.IRetention|null);StorageObject retention.
retentionExpireTime
public retentionExpireTime?: (google.protobuf.ITimestamp|null);StorageObject retentionExpireTime.
size
public size: (number|Long|string);StorageObject size.
softDeleteTime
public softDeleteTime?: (google.protobuf.ITimestamp|null);StorageObject softDeleteTime.
storageClass
public storageClass: string;StorageObject storageClass.
temporaryHold
public temporaryHold: boolean;StorageObject temporaryHold.
updateStorageClassTime
public updateStorageClassTime?: (google.protobuf.ITimestamp|null);StorageObject updateStorageClassTime.
updateTime
public updateTime?: (google.protobuf.ITimestamp|null);StorageObject updateTime.
Methods
create(properties)
public static create(properties?: google.storage.v2.IStorageObject): google.storage.v2.StorageObject;Creates a new StorageObject instance using the specified properties.
| Parameter | |
|---|---|
| Name | Description |
properties |
IStorageObject
Properties to set |
| Returns | |
|---|---|
| Type | Description |
StorageObject |
StorageObject instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.storage.v2.StorageObject;Decodes a StorageObject message from the specified reader or buffer.
| Parameters | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
| Returns | |
|---|---|
| Type | Description |
StorageObject |
StorageObject |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.storage.v2.StorageObject;Decodes a StorageObject message from the specified reader or buffer, length delimited.
| Parameter | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
| Returns | |
|---|---|
| Type | Description |
StorageObject |
StorageObject |
encode(message, writer)
public static encode(message: google.storage.v2.IStorageObject, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified StorageObject message. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IStorageObject
StorageObject message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.storage.v2.IStorageObject, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified StorageObject message, length delimited. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IStorageObject
StorageObject message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.storage.v2.StorageObject;Creates a StorageObject message from a plain object. Also converts values to their respective internal types.
| Parameter | |
|---|---|
| Name | Description |
object |
{ [k: string]: any }
Plain object |
| Returns | |
|---|---|
| Type | Description |
StorageObject |
StorageObject |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;Gets the default type url for StorageObject
| Parameter | |
|---|---|
| Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
| Returns | |
|---|---|
| Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };Converts this StorageObject to JSON.
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.storage.v2.StorageObject, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from a StorageObject message. Also converts values to other types if specified.
| Parameters | |
|---|---|
| Name | Description |
message |
StorageObject
StorageObject |
options |
$protobuf.IConversionOptions
Conversion options |
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies a StorageObject message.
| Parameter | |
|---|---|
| Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
| Returns | |
|---|---|
| Type | Description |
(string|null) |
|