Class RewriteObject.Builder (0.2.0)

public static final class RewriteObject.Builder extends GeneratedMessageV3.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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RewriteObject.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RewriteObject.Builder
Overrides

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

clearField(Descriptors.FieldDescriptor field)

public RewriteObject.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
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.

clearOneof(Descriptors.OneofDescriptor oneof)

public RewriteObject.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RewriteObject.Builder
Overrides

clone()

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

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 GeneratedMessageV3.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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RewriteObject.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RewriteObject.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public RewriteObject.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
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.

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

public RewriteObject.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RewriteObject.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RewriteObject.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RewriteObject.Builder
Overrides