Class RewriteObjectRequest.Builder (2.36.1)

public static final class RewriteObjectRequest.Builder extends GeneratedMessageV3.Builder<RewriteObjectRequest.Builder> implements RewriteObjectRequestOrBuilder

Request message for RewriteObject. If the source object is encrypted using a Customer-Supplied Encryption Key the key information must be provided in the copy_source_encryption_algorithm, copy_source_encryption_key_bytes, and copy_source_encryption_key_sha256_bytes fields. If the destination object should be encrypted the keying information should be provided in the encryption_algorithm, encryption_key_bytes, and encryption_key_sha256_bytes fields of the common_object_request_params.customer_encryption field.

Protobuf type google.storage.v2.RewriteObjectRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RewriteObjectRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

build()

public RewriteObjectRequest build()
Returns
TypeDescription
RewriteObjectRequest

buildPartial()

public RewriteObjectRequest buildPartial()
Returns
TypeDescription
RewriteObjectRequest

clear()

public RewriteObjectRequest.Builder clear()
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

clearCommonObjectRequestParams()

public RewriteObjectRequest.Builder clearCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Returns
TypeDescription
RewriteObjectRequest.Builder

clearCopySourceEncryptionAlgorithm()

public RewriteObjectRequest.Builder clearCopySourceEncryptionAlgorithm()

The algorithm used to encrypt the source object, if any. Used if the source object was encrypted with a Customer-Supplied Encryption Key.

string copy_source_encryption_algorithm = 16;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearCopySourceEncryptionKeyBytes()

public RewriteObjectRequest.Builder clearCopySourceEncryptionKeyBytes()

The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_bytes = 21;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearCopySourceEncryptionKeySha256Bytes()

public RewriteObjectRequest.Builder clearCopySourceEncryptionKeySha256Bytes()

The raw bytes (not base64-encoded) SHA256 hash of the encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_sha256_bytes = 22;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearDestination()

public RewriteObjectRequest.Builder clearDestination()

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Returns
TypeDescription
RewriteObjectRequest.Builder

clearDestinationBucket()

public RewriteObjectRequest.Builder clearDestinationBucket()

Required. Immutable. The name of the bucket containing the destination object.

string destination_bucket = 25 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearDestinationKmsKey()

public RewriteObjectRequest.Builder clearDestinationKmsKey()

The name of the Cloud KMS key that will be used to encrypt the destination object. The Cloud KMS key must be located in same location as the object. If the parameter is not specified, the request uses the destination bucket's default encryption key, if any, or else the Google-managed encryption key.

string destination_kms_key = 27 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearDestinationName()

public RewriteObjectRequest.Builder clearDestinationName()

Required. Immutable. The name of the destination object. See the Naming Guidelines. Example: test.txt The name field by itself does not uniquely identify a Cloud Storage object. A Cloud Storage object is uniquely identified by the tuple of (bucket, object, generation).

string destination_name = 24 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearDestinationPredefinedAcl()

public RewriteObjectRequest.Builder clearDestinationPredefinedAcl()

Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string destination_predefined_acl = 28;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public RewriteObjectRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

clearIfGenerationMatch()

public RewriteObjectRequest.Builder clearIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 7;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfGenerationNotMatch()

public RewriteObjectRequest.Builder clearIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 8;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationMatch()

public RewriteObjectRequest.Builder clearIfMetagenerationMatch()

Makes the operation conditional on whether the destination object's current metageneration matches the given value.

optional int64 if_metageneration_match = 9;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfMetagenerationNotMatch()

public RewriteObjectRequest.Builder clearIfMetagenerationNotMatch()

Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 10;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfSourceGenerationMatch()

public RewriteObjectRequest.Builder clearIfSourceGenerationMatch()

Makes the operation conditional on whether the source object's live generation matches the given value.

optional int64 if_source_generation_match = 11;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfSourceGenerationNotMatch()

public RewriteObjectRequest.Builder clearIfSourceGenerationNotMatch()

Makes the operation conditional on whether the source object's live generation does not match the given value.

optional int64 if_source_generation_not_match = 12;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfSourceMetagenerationMatch()

public RewriteObjectRequest.Builder clearIfSourceMetagenerationMatch()

Makes the operation conditional on whether the source object's current metageneration matches the given value.

optional int64 if_source_metageneration_match = 13;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearIfSourceMetagenerationNotMatch()

public RewriteObjectRequest.Builder clearIfSourceMetagenerationNotMatch()

Makes the operation conditional on whether the source object's current metageneration does not match the given value.

optional int64 if_source_metageneration_not_match = 14;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearMaxBytesRewrittenPerCall()

public RewriteObjectRequest.Builder clearMaxBytesRewrittenPerCall()

The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.

int64 max_bytes_rewritten_per_call = 15;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearObjectChecksums()

public RewriteObjectRequest.Builder clearObjectChecksums()

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Returns
TypeDescription
RewriteObjectRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RewriteObjectRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

clearRewriteToken()

public RewriteObjectRequest.Builder clearRewriteToken()

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

string rewrite_token = 5;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearSourceBucket()

public RewriteObjectRequest.Builder clearSourceBucket()

Required. Name of the bucket in which to find the source object.

string source_bucket = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearSourceGeneration()

public RewriteObjectRequest.Builder clearSourceGeneration()

If present, selects a specific revision of the source object (as opposed to the latest version, the default).

int64 source_generation = 4;

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clearSourceObject()

public RewriteObjectRequest.Builder clearSourceObject()

Required. Name of the source object.

string source_object = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

clone()

public RewriteObjectRequest.Builder clone()
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

getCommonObjectRequestParams()

public CommonObjectRequestParams getCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Returns
TypeDescription
CommonObjectRequestParams

The commonObjectRequestParams.

getCommonObjectRequestParamsBuilder()

public CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Returns
TypeDescription
CommonObjectRequestParams.Builder

getCommonObjectRequestParamsOrBuilder()

public CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Returns
TypeDescription
CommonObjectRequestParamsOrBuilder

getCopySourceEncryptionAlgorithm()

public String getCopySourceEncryptionAlgorithm()

The algorithm used to encrypt the source object, if any. Used if the source object was encrypted with a Customer-Supplied Encryption Key.

string copy_source_encryption_algorithm = 16;

Returns
TypeDescription
String

The copySourceEncryptionAlgorithm.

getCopySourceEncryptionAlgorithmBytes()

public ByteString getCopySourceEncryptionAlgorithmBytes()

The algorithm used to encrypt the source object, if any. Used if the source object was encrypted with a Customer-Supplied Encryption Key.

string copy_source_encryption_algorithm = 16;

Returns
TypeDescription
ByteString

The bytes for copySourceEncryptionAlgorithm.

getCopySourceEncryptionKeyBytes()

public ByteString getCopySourceEncryptionKeyBytes()

The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_bytes = 21;

Returns
TypeDescription
ByteString

The copySourceEncryptionKeyBytes.

getCopySourceEncryptionKeySha256Bytes()

public ByteString getCopySourceEncryptionKeySha256Bytes()

The raw bytes (not base64-encoded) SHA256 hash of the encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_sha256_bytes = 22;

Returns
TypeDescription
ByteString

The copySourceEncryptionKeySha256Bytes.

getDefaultInstanceForType()

public RewriteObjectRequest getDefaultInstanceForType()
Returns
TypeDescription
RewriteObjectRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDestination()

public Object getDestination()

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Returns
TypeDescription
Object

The destination.

getDestinationBucket()

public String getDestinationBucket()

Required. Immutable. The name of the bucket containing the destination object.

string destination_bucket = 25 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The destinationBucket.

getDestinationBucketBytes()

public ByteString getDestinationBucketBytes()

Required. Immutable. The name of the bucket containing the destination object.

string destination_bucket = 25 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for destinationBucket.

getDestinationBuilder()

public Object.Builder getDestinationBuilder()

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Returns
TypeDescription
Object.Builder

getDestinationKmsKey()

public String getDestinationKmsKey()

The name of the Cloud KMS key that will be used to encrypt the destination object. The Cloud KMS key must be located in same location as the object. If the parameter is not specified, the request uses the destination bucket's default encryption key, if any, or else the Google-managed encryption key.

string destination_kms_key = 27 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The destinationKmsKey.

getDestinationKmsKeyBytes()

public ByteString getDestinationKmsKeyBytes()

The name of the Cloud KMS key that will be used to encrypt the destination object. The Cloud KMS key must be located in same location as the object. If the parameter is not specified, the request uses the destination bucket's default encryption key, if any, or else the Google-managed encryption key.

string destination_kms_key = 27 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for destinationKmsKey.

getDestinationName()

public String getDestinationName()

Required. Immutable. The name of the destination object. See the Naming Guidelines. Example: test.txt The name field by itself does not uniquely identify a Cloud Storage object. A Cloud Storage object is uniquely identified by the tuple of (bucket, object, generation).

string destination_name = 24 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
String

The destinationName.

getDestinationNameBytes()

public ByteString getDestinationNameBytes()

Required. Immutable. The name of the destination object. See the Naming Guidelines. Example: test.txt The name field by itself does not uniquely identify a Cloud Storage object. A Cloud Storage object is uniquely identified by the tuple of (bucket, object, generation).

string destination_name = 24 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
TypeDescription
ByteString

The bytes for destinationName.

getDestinationOrBuilder()

public ObjectOrBuilder getDestinationOrBuilder()

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Returns
TypeDescription
ObjectOrBuilder

getDestinationPredefinedAcl()

public String getDestinationPredefinedAcl()

Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string destination_predefined_acl = 28;

Returns
TypeDescription
String

The destinationPredefinedAcl.

getDestinationPredefinedAclBytes()

public ByteString getDestinationPredefinedAclBytes()

Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string destination_predefined_acl = 28;

Returns
TypeDescription
ByteString

The bytes for destinationPredefinedAcl.

getIfGenerationMatch()

public long getIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 7;

Returns
TypeDescription
long

The ifGenerationMatch.

getIfGenerationNotMatch()

public long getIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 8;

Returns
TypeDescription
long

The ifGenerationNotMatch.

getIfMetagenerationMatch()

public long getIfMetagenerationMatch()

Makes the operation conditional on whether the destination object's current metageneration matches the given value.

optional int64 if_metageneration_match = 9;

Returns
TypeDescription
long

The ifMetagenerationMatch.

getIfMetagenerationNotMatch()

public long getIfMetagenerationNotMatch()

Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 10;

Returns
TypeDescription
long

The ifMetagenerationNotMatch.

getIfSourceGenerationMatch()

public long getIfSourceGenerationMatch()

Makes the operation conditional on whether the source object's live generation matches the given value.

optional int64 if_source_generation_match = 11;

Returns
TypeDescription
long

The ifSourceGenerationMatch.

getIfSourceGenerationNotMatch()

public long getIfSourceGenerationNotMatch()

Makes the operation conditional on whether the source object's live generation does not match the given value.

optional int64 if_source_generation_not_match = 12;

Returns
TypeDescription
long

The ifSourceGenerationNotMatch.

getIfSourceMetagenerationMatch()

public long getIfSourceMetagenerationMatch()

Makes the operation conditional on whether the source object's current metageneration matches the given value.

optional int64 if_source_metageneration_match = 13;

Returns
TypeDescription
long

The ifSourceMetagenerationMatch.

getIfSourceMetagenerationNotMatch()

public long getIfSourceMetagenerationNotMatch()

Makes the operation conditional on whether the source object's current metageneration does not match the given value.

optional int64 if_source_metageneration_not_match = 14;

Returns
TypeDescription
long

The ifSourceMetagenerationNotMatch.

getMaxBytesRewrittenPerCall()

public long getMaxBytesRewrittenPerCall()

The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.

int64 max_bytes_rewritten_per_call = 15;

Returns
TypeDescription
long

The maxBytesRewrittenPerCall.

getObjectChecksums()

public ObjectChecksums getObjectChecksums()

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Returns
TypeDescription
ObjectChecksums

The objectChecksums.

getObjectChecksumsBuilder()

public ObjectChecksums.Builder getObjectChecksumsBuilder()

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Returns
TypeDescription
ObjectChecksums.Builder

getObjectChecksumsOrBuilder()

public ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder()

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Returns
TypeDescription
ObjectChecksumsOrBuilder

getRewriteToken()

public String getRewriteToken()

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

string rewrite_token = 5;

Returns
TypeDescription
String

The rewriteToken.

getRewriteTokenBytes()

public ByteString getRewriteTokenBytes()

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

string rewrite_token = 5;

Returns
TypeDescription
ByteString

The bytes for rewriteToken.

getSourceBucket()

public String getSourceBucket()

Required. Name of the bucket in which to find the source object.

string source_bucket = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The sourceBucket.

getSourceBucketBytes()

public ByteString getSourceBucketBytes()

Required. Name of the bucket in which to find the source object.

string source_bucket = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for sourceBucket.

getSourceGeneration()

public long getSourceGeneration()

If present, selects a specific revision of the source object (as opposed to the latest version, the default).

int64 source_generation = 4;

Returns
TypeDescription
long

The sourceGeneration.

getSourceObject()

public String getSourceObject()

Required. Name of the source object.

string source_object = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The sourceObject.

getSourceObjectBytes()

public ByteString getSourceObjectBytes()

Required. Name of the source object.

string source_object = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for sourceObject.

hasCommonObjectRequestParams()

public boolean hasCommonObjectRequestParams()

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Returns
TypeDescription
boolean

Whether the commonObjectRequestParams field is set.

hasDestination()

public boolean hasDestination()

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Returns
TypeDescription
boolean

Whether the destination field is set.

hasIfGenerationMatch()

public boolean hasIfGenerationMatch()

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 7;

Returns
TypeDescription
boolean

Whether the ifGenerationMatch field is set.

hasIfGenerationNotMatch()

public boolean hasIfGenerationNotMatch()

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 8;

Returns
TypeDescription
boolean

Whether the ifGenerationNotMatch field is set.

hasIfMetagenerationMatch()

public boolean hasIfMetagenerationMatch()

Makes the operation conditional on whether the destination object's current metageneration matches the given value.

optional int64 if_metageneration_match = 9;

Returns
TypeDescription
boolean

Whether the ifMetagenerationMatch field is set.

hasIfMetagenerationNotMatch()

public boolean hasIfMetagenerationNotMatch()

Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 10;

Returns
TypeDescription
boolean

Whether the ifMetagenerationNotMatch field is set.

hasIfSourceGenerationMatch()

public boolean hasIfSourceGenerationMatch()

Makes the operation conditional on whether the source object's live generation matches the given value.

optional int64 if_source_generation_match = 11;

Returns
TypeDescription
boolean

Whether the ifSourceGenerationMatch field is set.

hasIfSourceGenerationNotMatch()

public boolean hasIfSourceGenerationNotMatch()

Makes the operation conditional on whether the source object's live generation does not match the given value.

optional int64 if_source_generation_not_match = 12;

Returns
TypeDescription
boolean

Whether the ifSourceGenerationNotMatch field is set.

hasIfSourceMetagenerationMatch()

public boolean hasIfSourceMetagenerationMatch()

Makes the operation conditional on whether the source object's current metageneration matches the given value.

optional int64 if_source_metageneration_match = 13;

Returns
TypeDescription
boolean

Whether the ifSourceMetagenerationMatch field is set.

hasIfSourceMetagenerationNotMatch()

public boolean hasIfSourceMetagenerationNotMatch()

Makes the operation conditional on whether the source object's current metageneration does not match the given value.

optional int64 if_source_metageneration_not_match = 14;

Returns
TypeDescription
boolean

Whether the ifSourceMetagenerationNotMatch field is set.

hasObjectChecksums()

public boolean hasObjectChecksums()

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Returns
TypeDescription
boolean

Whether the objectChecksums field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCommonObjectRequestParams(CommonObjectRequestParams value)

public RewriteObjectRequest.Builder mergeCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Parameter
NameDescription
valueCommonObjectRequestParams
Returns
TypeDescription
RewriteObjectRequest.Builder

mergeDestination(Object value)

public RewriteObjectRequest.Builder mergeDestination(Object value)

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Parameter
NameDescription
valueObject
Returns
TypeDescription
RewriteObjectRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RewriteObjectRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RewriteObjectRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

mergeFrom(RewriteObjectRequest other)

public RewriteObjectRequest.Builder mergeFrom(RewriteObjectRequest other)
Parameter
NameDescription
otherRewriteObjectRequest
Returns
TypeDescription
RewriteObjectRequest.Builder

mergeObjectChecksums(ObjectChecksums value)

public RewriteObjectRequest.Builder mergeObjectChecksums(ObjectChecksums value)

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Parameter
NameDescription
valueObjectChecksums
Returns
TypeDescription
RewriteObjectRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RewriteObjectRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

setCommonObjectRequestParams(CommonObjectRequestParams value)

public RewriteObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams value)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Parameter
NameDescription
valueCommonObjectRequestParams
Returns
TypeDescription
RewriteObjectRequest.Builder

setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

public RewriteObjectRequest.Builder setCommonObjectRequestParams(CommonObjectRequestParams.Builder builderForValue)

A set of parameters common to Storage API requests concerning an object.

.google.storage.v2.CommonObjectRequestParams common_object_request_params = 19;

Parameter
NameDescription
builderForValueCommonObjectRequestParams.Builder
Returns
TypeDescription
RewriteObjectRequest.Builder

setCopySourceEncryptionAlgorithm(String value)

public RewriteObjectRequest.Builder setCopySourceEncryptionAlgorithm(String value)

The algorithm used to encrypt the source object, if any. Used if the source object was encrypted with a Customer-Supplied Encryption Key.

string copy_source_encryption_algorithm = 16;

Parameter
NameDescription
valueString

The copySourceEncryptionAlgorithm to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setCopySourceEncryptionAlgorithmBytes(ByteString value)

public RewriteObjectRequest.Builder setCopySourceEncryptionAlgorithmBytes(ByteString value)

The algorithm used to encrypt the source object, if any. Used if the source object was encrypted with a Customer-Supplied Encryption Key.

string copy_source_encryption_algorithm = 16;

Parameter
NameDescription
valueByteString

The bytes for copySourceEncryptionAlgorithm to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setCopySourceEncryptionKeyBytes(ByteString value)

public RewriteObjectRequest.Builder setCopySourceEncryptionKeyBytes(ByteString value)

The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_bytes = 21;

Parameter
NameDescription
valueByteString

The copySourceEncryptionKeyBytes to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setCopySourceEncryptionKeySha256Bytes(ByteString value)

public RewriteObjectRequest.Builder setCopySourceEncryptionKeySha256Bytes(ByteString value)

The raw bytes (not base64-encoded) SHA256 hash of the encryption key used to encrypt the source object, if it was encrypted with a Customer-Supplied Encryption Key.

bytes copy_source_encryption_key_sha256_bytes = 22;

Parameter
NameDescription
valueByteString

The copySourceEncryptionKeySha256Bytes to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestination(Object value)

public RewriteObjectRequest.Builder setDestination(Object value)

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Parameter
NameDescription
valueObject
Returns
TypeDescription
RewriteObjectRequest.Builder

setDestination(Object.Builder builderForValue)

public RewriteObjectRequest.Builder setDestination(Object.Builder builderForValue)

Properties of the destination, post-rewrite object. The name, bucket and kms_key fields must not be populated (these values are specified in the destination_name, destination_bucket, and destination_kms_key fields). If destination is present it will be used to construct the destination object's metadata; otherwise the destination object's metadata will be copied from the source object.

.google.storage.v2.Object destination = 1;

Parameter
NameDescription
builderForValueObject.Builder
Returns
TypeDescription
RewriteObjectRequest.Builder

setDestinationBucket(String value)

public RewriteObjectRequest.Builder setDestinationBucket(String value)

Required. Immutable. The name of the bucket containing the destination object.

string destination_bucket = 25 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The destinationBucket to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationBucketBytes(ByteString value)

public RewriteObjectRequest.Builder setDestinationBucketBytes(ByteString value)

Required. Immutable. The name of the bucket containing the destination object.

string destination_bucket = 25 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for destinationBucket to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationKmsKey(String value)

public RewriteObjectRequest.Builder setDestinationKmsKey(String value)

The name of the Cloud KMS key that will be used to encrypt the destination object. The Cloud KMS key must be located in same location as the object. If the parameter is not specified, the request uses the destination bucket's default encryption key, if any, or else the Google-managed encryption key.

string destination_kms_key = 27 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The destinationKmsKey to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationKmsKeyBytes(ByteString value)

public RewriteObjectRequest.Builder setDestinationKmsKeyBytes(ByteString value)

The name of the Cloud KMS key that will be used to encrypt the destination object. The Cloud KMS key must be located in same location as the object. If the parameter is not specified, the request uses the destination bucket's default encryption key, if any, or else the Google-managed encryption key.

string destination_kms_key = 27 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for destinationKmsKey to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationName(String value)

public RewriteObjectRequest.Builder setDestinationName(String value)

Required. Immutable. The name of the destination object. See the Naming Guidelines. Example: test.txt The name field by itself does not uniquely identify a Cloud Storage object. A Cloud Storage object is uniquely identified by the tuple of (bucket, object, generation).

string destination_name = 24 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueString

The destinationName to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationNameBytes(ByteString value)

public RewriteObjectRequest.Builder setDestinationNameBytes(ByteString value)

Required. Immutable. The name of the destination object. See the Naming Guidelines. Example: test.txt The name field by itself does not uniquely identify a Cloud Storage object. A Cloud Storage object is uniquely identified by the tuple of (bucket, object, generation).

string destination_name = 24 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
NameDescription
valueByteString

The bytes for destinationName to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationPredefinedAcl(String value)

public RewriteObjectRequest.Builder setDestinationPredefinedAcl(String value)

Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string destination_predefined_acl = 28;

Parameter
NameDescription
valueString

The destinationPredefinedAcl to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setDestinationPredefinedAclBytes(ByteString value)

public RewriteObjectRequest.Builder setDestinationPredefinedAclBytes(ByteString value)

Apply a predefined set of access controls to the destination object. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string destination_predefined_acl = 28;

Parameter
NameDescription
valueByteString

The bytes for destinationPredefinedAcl to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public RewriteObjectRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

setIfGenerationMatch(long value)

public RewriteObjectRequest.Builder setIfGenerationMatch(long value)

Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

optional int64 if_generation_match = 7;

Parameter
NameDescription
valuelong

The ifGenerationMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfGenerationNotMatch(long value)

public RewriteObjectRequest.Builder setIfGenerationNotMatch(long value)

Makes the operation conditional on whether the object's live generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

optional int64 if_generation_not_match = 8;

Parameter
NameDescription
valuelong

The ifGenerationNotMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfMetagenerationMatch(long value)

public RewriteObjectRequest.Builder setIfMetagenerationMatch(long value)

Makes the operation conditional on whether the destination object's current metageneration matches the given value.

optional int64 if_metageneration_match = 9;

Parameter
NameDescription
valuelong

The ifMetagenerationMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfMetagenerationNotMatch(long value)

public RewriteObjectRequest.Builder setIfMetagenerationNotMatch(long value)

Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

optional int64 if_metageneration_not_match = 10;

Parameter
NameDescription
valuelong

The ifMetagenerationNotMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfSourceGenerationMatch(long value)

public RewriteObjectRequest.Builder setIfSourceGenerationMatch(long value)

Makes the operation conditional on whether the source object's live generation matches the given value.

optional int64 if_source_generation_match = 11;

Parameter
NameDescription
valuelong

The ifSourceGenerationMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfSourceGenerationNotMatch(long value)

public RewriteObjectRequest.Builder setIfSourceGenerationNotMatch(long value)

Makes the operation conditional on whether the source object's live generation does not match the given value.

optional int64 if_source_generation_not_match = 12;

Parameter
NameDescription
valuelong

The ifSourceGenerationNotMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfSourceMetagenerationMatch(long value)

public RewriteObjectRequest.Builder setIfSourceMetagenerationMatch(long value)

Makes the operation conditional on whether the source object's current metageneration matches the given value.

optional int64 if_source_metageneration_match = 13;

Parameter
NameDescription
valuelong

The ifSourceMetagenerationMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setIfSourceMetagenerationNotMatch(long value)

public RewriteObjectRequest.Builder setIfSourceMetagenerationNotMatch(long value)

Makes the operation conditional on whether the source object's current metageneration does not match the given value.

optional int64 if_source_metageneration_not_match = 14;

Parameter
NameDescription
valuelong

The ifSourceMetagenerationNotMatch to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setMaxBytesRewrittenPerCall(long value)

public RewriteObjectRequest.Builder setMaxBytesRewrittenPerCall(long value)

The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.

int64 max_bytes_rewritten_per_call = 15;

Parameter
NameDescription
valuelong

The maxBytesRewrittenPerCall to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setObjectChecksums(ObjectChecksums value)

public RewriteObjectRequest.Builder setObjectChecksums(ObjectChecksums value)

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Parameter
NameDescription
valueObjectChecksums
Returns
TypeDescription
RewriteObjectRequest.Builder

setObjectChecksums(ObjectChecksums.Builder builderForValue)

public RewriteObjectRequest.Builder setObjectChecksums(ObjectChecksums.Builder builderForValue)

The checksums of the complete object. This will be used to validate the destination object after rewriting.

.google.storage.v2.ObjectChecksums object_checksums = 29;

Parameter
NameDescription
builderForValueObjectChecksums.Builder
Returns
TypeDescription
RewriteObjectRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RewriteObjectRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides

setRewriteToken(String value)

public RewriteObjectRequest.Builder setRewriteToken(String value)

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

string rewrite_token = 5;

Parameter
NameDescription
valueString

The rewriteToken to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setRewriteTokenBytes(ByteString value)

public RewriteObjectRequest.Builder setRewriteTokenBytes(ByteString value)

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

string rewrite_token = 5;

Parameter
NameDescription
valueByteString

The bytes for rewriteToken to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setSourceBucket(String value)

public RewriteObjectRequest.Builder setSourceBucket(String value)

Required. Name of the bucket in which to find the source object.

string source_bucket = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The sourceBucket to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setSourceBucketBytes(ByteString value)

public RewriteObjectRequest.Builder setSourceBucketBytes(ByteString value)

Required. Name of the bucket in which to find the source object.

string source_bucket = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for sourceBucket to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setSourceGeneration(long value)

public RewriteObjectRequest.Builder setSourceGeneration(long value)

If present, selects a specific revision of the source object (as opposed to the latest version, the default).

int64 source_generation = 4;

Parameter
NameDescription
valuelong

The sourceGeneration to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setSourceObject(String value)

public RewriteObjectRequest.Builder setSourceObject(String value)

Required. Name of the source object.

string source_object = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The sourceObject to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setSourceObjectBytes(ByteString value)

public RewriteObjectRequest.Builder setSourceObjectBytes(ByteString value)

Required. Name of the source object.

string source_object = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for sourceObject to set.

Returns
TypeDescription
RewriteObjectRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final RewriteObjectRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RewriteObjectRequest.Builder
Overrides