Class protos.google.storagetransfer.v1.ReplicationSpec (3.5.0)

Represents a ReplicationSpec.

Package

@google-cloud/storage-transfer

Constructors

(constructor)(properties)

constructor(properties?: google.storagetransfer.v1.IReplicationSpec);

Constructs a new ReplicationSpec.

Parameter
Name Description
properties IReplicationSpec

Properties to set

Properties

dataSink

public dataSink?: "gcsDataSink";

ReplicationSpec dataSink.

dataSource

public dataSource?: "gcsDataSource";

ReplicationSpec dataSource.

gcsDataSink

public gcsDataSink?: (google.storagetransfer.v1.IGcsData|null);

ReplicationSpec gcsDataSink.

gcsDataSource

public gcsDataSource?: (google.storagetransfer.v1.IGcsData|null);

ReplicationSpec gcsDataSource.

objectConditions

public objectConditions?: (google.storagetransfer.v1.IObjectConditions|null);

ReplicationSpec objectConditions.

transferOptions

public transferOptions?: (google.storagetransfer.v1.ITransferOptions|null);

ReplicationSpec transferOptions.

Methods

create(properties)

public static create(properties?: google.storagetransfer.v1.IReplicationSpec): google.storagetransfer.v1.ReplicationSpec;

Creates a new ReplicationSpec instance using the specified properties.

Parameter
Name Description
properties IReplicationSpec

Properties to set

Returns
Type Description
ReplicationSpec

ReplicationSpec instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.storagetransfer.v1.ReplicationSpec;

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

ReplicationSpec

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.storagetransfer.v1.ReplicationSpec;

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

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
ReplicationSpec

ReplicationSpec

encode(message, writer)

public static encode(message: google.storagetransfer.v1.IReplicationSpec, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified ReplicationSpec message. Does not implicitly messages.

Parameters
Name Description
message IReplicationSpec

ReplicationSpec 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.storagetransfer.v1.IReplicationSpec, writer?: $protobuf.Writer): $protobuf.Writer;

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

Parameters
Name Description
message IReplicationSpec

ReplicationSpec 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.storagetransfer.v1.ReplicationSpec;

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

ReplicationSpec

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for ReplicationSpec

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

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

JSON object

toObject(message, options)

public static toObject(message: google.storagetransfer.v1.ReplicationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any };

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

Parameters
Name Description
message ReplicationSpec

ReplicationSpec

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 ReplicationSpec 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