Class RewriteObject.Builder (0.23.0)

public static final class RewriteObject.Builder extends GeneratedMessage.Builder<RewriteObject.Builder> implements RewriteObjectOrBuilder

Describes options for object rewrite.

Protobuf type google.cloud.storagebatchoperations.v1.RewriteObject

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public RewriteObject build()
Returns
Type Description
RewriteObject

buildPartial()

public RewriteObject buildPartial()
Returns
Type Description
RewriteObject

clear()

public RewriteObject.Builder clear()
Returns
Type Description
RewriteObject.Builder
Overrides

clearKmsKey()

public RewriteObject.Builder clearKmsKey()

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
RewriteObject.Builder

This builder for chaining.

getDefaultInstanceForType()

public RewriteObject getDefaultInstanceForType()
Returns
Type Description
RewriteObject

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getKmsKey()

public String getKmsKey()

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The kmsKey.

getKmsKeyBytes()

public ByteString getKmsKeyBytes()

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for kmsKey.

hasKmsKey()

public boolean hasKmsKey()

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the kmsKey field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RewriteObject other)

public RewriteObject.Builder mergeFrom(RewriteObject other)
Parameter
Name Description
other RewriteObject
Returns
Type Description
RewriteObject.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RewriteObject.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RewriteObject.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RewriteObject.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RewriteObject.Builder
Overrides

setKmsKey(String value)

public RewriteObject.Builder setKmsKey(String value)

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The kmsKey to set.

Returns
Type Description
RewriteObject.Builder

This builder for chaining.

setKmsKeyBytes(ByteString value)

public RewriteObject.Builder setKmsKeyBytes(ByteString value)

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key for additional documentation. Format: projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key} For example: "projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key". The object will be rewritten and set with the specified KMS key.

optional string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for kmsKey to set.

Returns
Type Description
RewriteObject.Builder

This builder for chaining.