Class Bucket.Encryption.Builder (2.53.2)

public static final class Bucket.Encryption.Builder extends GeneratedMessageV3.Builder<Bucket.Encryption.Builder> implements Bucket.EncryptionOrBuilder

Encryption properties of a bucket.

Protobuf type google.storage.v2.Bucket.Encryption

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Bucket.Encryption build()
Returns
Type Description
Bucket.Encryption

buildPartial()

public Bucket.Encryption buildPartial()
Returns
Type Description
Bucket.Encryption

clear()

public Bucket.Encryption.Builder clear()
Returns
Type Description
Bucket.Encryption.Builder
Overrides

clearCustomerManagedEncryptionEnforcementConfig()

public Bucket.Encryption.Builder clearCustomerManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.Builder

clearCustomerSuppliedEncryptionEnforcementConfig()

public Bucket.Encryption.Builder clearCustomerSuppliedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.Builder

clearDefaultKmsKey()

public Bucket.Encryption.Builder clearDefaultKmsKey()

Optional. The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.

string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
Bucket.Encryption.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Bucket.Encryption.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Bucket.Encryption.Builder
Overrides

clearGoogleManagedEncryptionEnforcementConfig()

public Bucket.Encryption.Builder clearGoogleManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public Bucket.Encryption.Builder clone()
Returns
Type Description
Bucket.Encryption.Builder
Overrides

getCustomerManagedEncryptionEnforcementConfig()

public Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig getCustomerManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig

The customerManagedEncryptionEnforcementConfig.

getCustomerManagedEncryptionEnforcementConfigBuilder()

public Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.Builder getCustomerManagedEncryptionEnforcementConfigBuilder()

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.Builder

getCustomerManagedEncryptionEnforcementConfigOrBuilder()

public Bucket.Encryption.CustomerManagedEncryptionEnforcementConfigOrBuilder getCustomerManagedEncryptionEnforcementConfigOrBuilder()

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerManagedEncryptionEnforcementConfigOrBuilder

getCustomerSuppliedEncryptionEnforcementConfig()

public Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig getCustomerSuppliedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig

The customerSuppliedEncryptionEnforcementConfig.

getCustomerSuppliedEncryptionEnforcementConfigBuilder()

public Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.Builder getCustomerSuppliedEncryptionEnforcementConfigBuilder()

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.Builder

getCustomerSuppliedEncryptionEnforcementConfigOrBuilder()

public Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfigOrBuilder getCustomerSuppliedEncryptionEnforcementConfigOrBuilder()

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfigOrBuilder

getDefaultInstanceForType()

public Bucket.Encryption getDefaultInstanceForType()
Returns
Type Description
Bucket.Encryption

getDefaultKmsKey()

public String getDefaultKmsKey()

Optional. The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.

string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The defaultKmsKey.

getDefaultKmsKeyBytes()

public ByteString getDefaultKmsKeyBytes()

Optional. The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.

string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for defaultKmsKey.

getDescriptorForType()

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

getGoogleManagedEncryptionEnforcementConfig()

public Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig getGoogleManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig

The googleManagedEncryptionEnforcementConfig.

getGoogleManagedEncryptionEnforcementConfigBuilder()

public Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.Builder getGoogleManagedEncryptionEnforcementConfigBuilder()

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.Builder

getGoogleManagedEncryptionEnforcementConfigOrBuilder()

public Bucket.Encryption.GoogleManagedEncryptionEnforcementConfigOrBuilder getGoogleManagedEncryptionEnforcementConfigOrBuilder()

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Bucket.Encryption.GoogleManagedEncryptionEnforcementConfigOrBuilder

hasCustomerManagedEncryptionEnforcementConfig()

public boolean hasCustomerManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customerManagedEncryptionEnforcementConfig field is set.

hasCustomerSuppliedEncryptionEnforcementConfig()

public boolean hasCustomerSuppliedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customerSuppliedEncryptionEnforcementConfig field is set.

hasGoogleManagedEncryptionEnforcementConfig()

public boolean hasGoogleManagedEncryptionEnforcementConfig()

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the googleManagedEncryptionEnforcementConfig field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder mergeCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

mergeCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder mergeCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(Bucket.Encryption other)

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

mergeGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder mergeGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder setCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

setCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.Builder builderForValue)

public Bucket.Encryption.Builder setCustomerManagedEncryptionEnforcementConfig(Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.Builder builderForValue)

Optional. If omitted, then new objects with CMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig customer_managed_encryption_enforcement_config = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Bucket.Encryption.CustomerManagedEncryptionEnforcementConfig.Builder
Returns
Type Description
Bucket.Encryption.Builder

setCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder setCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

setCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.Builder builderForValue)

public Bucket.Encryption.Builder setCustomerSuppliedEncryptionEnforcementConfig(Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.Builder builderForValue)

Optional. If omitted, then new objects with CSEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig customer_supplied_encryption_enforcement_config = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Bucket.Encryption.CustomerSuppliedEncryptionEnforcementConfig.Builder
Returns
Type Description
Bucket.Encryption.Builder

setDefaultKmsKey(String value)

public Bucket.Encryption.Builder setDefaultKmsKey(String value)

Optional. The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.

string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The defaultKmsKey to set.

Returns
Type Description
Bucket.Encryption.Builder

This builder for chaining.

setDefaultKmsKeyBytes(ByteString value)

public Bucket.Encryption.Builder setDefaultKmsKeyBytes(ByteString value)

Optional. The name of the Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.

string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for defaultKmsKey to set.

Returns
Type Description
Bucket.Encryption.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Bucket.Encryption.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Bucket.Encryption.Builder
Overrides

setGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig value)

public Bucket.Encryption.Builder setGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig value)

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig
Returns
Type Description
Bucket.Encryption.Builder

setGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.Builder builderForValue)

public Bucket.Encryption.Builder setGoogleManagedEncryptionEnforcementConfig(Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.Builder builderForValue)

Optional. If omitted, then new objects with GMEK encryption-type is allowed. If set, then new objects created in this bucket must comply with enforcement config. Changing this has no effect on existing objects; it applies to new objects only.

optional .google.storage.v2.Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig google_managed_encryption_enforcement_config = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Bucket.Encryption.GoogleManagedEncryptionEnforcementConfig.Builder
Returns
Type Description
Bucket.Encryption.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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