Class protos.google.storage.v2.RewriteObjectRequest (0.7.0)

Represents a RewriteObjectRequest.

Package

@google-cloud/storage-control

Constructors

(constructor)(properties)

constructor(properties?: google.storage.v2.IRewriteObjectRequest);

Constructs a new RewriteObjectRequest.

Parameter
Name Description
properties IRewriteObjectRequest

Properties to set

Properties

commonObjectRequestParams

public commonObjectRequestParams?: (google.storage.v2.ICommonObjectRequestParams|null);

RewriteObjectRequest commonObjectRequestParams.

copySourceEncryptionAlgorithm

public copySourceEncryptionAlgorithm: string;

RewriteObjectRequest copySourceEncryptionAlgorithm.

copySourceEncryptionKeyBytes

public copySourceEncryptionKeyBytes: (Uint8Array|Buffer|string);

RewriteObjectRequest copySourceEncryptionKeyBytes.

copySourceEncryptionKeySha256Bytes

public copySourceEncryptionKeySha256Bytes: (Uint8Array|Buffer|string);

RewriteObjectRequest copySourceEncryptionKeySha256Bytes.

destination

public destination?: (google.storage.v2.IStorageObject|null);

RewriteObjectRequest destination.

destinationBucket

public destinationBucket: string;

RewriteObjectRequest destinationBucket.

destinationKmsKey

public destinationKmsKey: string;

RewriteObjectRequest destinationKmsKey.

destinationName

public destinationName: string;

RewriteObjectRequest destinationName.

destinationPredefinedAcl

public destinationPredefinedAcl: string;

RewriteObjectRequest destinationPredefinedAcl.

ifGenerationMatch

public ifGenerationMatch?: (number|Long|string|null);

RewriteObjectRequest ifGenerationMatch.

ifGenerationNotMatch

public ifGenerationNotMatch?: (number|Long|string|null);

RewriteObjectRequest ifGenerationNotMatch.

ifMetagenerationMatch

public ifMetagenerationMatch?: (number|Long|string|null);

RewriteObjectRequest ifMetagenerationMatch.

ifMetagenerationNotMatch

public ifMetagenerationNotMatch?: (number|Long|string|null);

RewriteObjectRequest ifMetagenerationNotMatch.

ifSourceGenerationMatch

public ifSourceGenerationMatch?: (number|Long|string|null);

RewriteObjectRequest ifSourceGenerationMatch.

ifSourceGenerationNotMatch

public ifSourceGenerationNotMatch?: (number|Long|string|null);

RewriteObjectRequest ifSourceGenerationNotMatch.

ifSourceMetagenerationMatch

public ifSourceMetagenerationMatch?: (number|Long|string|null);

RewriteObjectRequest ifSourceMetagenerationMatch.

ifSourceMetagenerationNotMatch

public ifSourceMetagenerationNotMatch?: (number|Long|string|null);

RewriteObjectRequest ifSourceMetagenerationNotMatch.

maxBytesRewrittenPerCall

public maxBytesRewrittenPerCall: (number|Long|string);

RewriteObjectRequest maxBytesRewrittenPerCall.

objectChecksums

public objectChecksums?: (google.storage.v2.IObjectChecksums|null);

RewriteObjectRequest objectChecksums.

rewriteToken

public rewriteToken: string;

RewriteObjectRequest rewriteToken.

sourceBucket

public sourceBucket: string;

RewriteObjectRequest sourceBucket.

sourceGeneration

public sourceGeneration: (number|Long|string);

RewriteObjectRequest sourceGeneration.

sourceObject

public sourceObject: string;

RewriteObjectRequest sourceObject.

Methods

create(properties)

public static create(properties?: google.storage.v2.IRewriteObjectRequest): google.storage.v2.RewriteObjectRequest;

Creates a new RewriteObjectRequest instance using the specified properties.

Parameter
Name Description
properties IRewriteObjectRequest

Properties to set

Returns
Type Description
RewriteObjectRequest

RewriteObjectRequest instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.storage.v2.RewriteObjectRequest;

Decodes a RewriteObjectRequest 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
RewriteObjectRequest

RewriteObjectRequest

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.storage.v2.RewriteObjectRequest;

Decodes a RewriteObjectRequest message from the specified reader or buffer, length delimited.

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
RewriteObjectRequest

RewriteObjectRequest

encode(message, writer)

public static encode(message: google.storage.v2.IRewriteObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified RewriteObjectRequest message. Does not implicitly messages.

Parameters
Name Description
message IRewriteObjectRequest

RewriteObjectRequest 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.IRewriteObjectRequest, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified RewriteObjectRequest message, length delimited. Does not implicitly messages.

Parameters
Name Description
message IRewriteObjectRequest

RewriteObjectRequest 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.RewriteObjectRequest;

Creates a RewriteObjectRequest 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
RewriteObjectRequest

RewriteObjectRequest

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for RewriteObjectRequest

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 RewriteObjectRequest to JSON.

Returns
Type Description
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.storage.v2.RewriteObjectRequest, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from a RewriteObjectRequest message. Also converts values to other types if specified.

Parameters
Name Description
message RewriteObjectRequest

RewriteObjectRequest

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 RewriteObjectRequest message.

Parameter
Name Description
message { [k: string]: any }

Plain object to verify

Returns
Type Description
(string|null)

null if valid, otherwise the reason why it is not