Class DateShiftConfig.Builder (3.47.0)

public static final class DateShiftConfig.Builder extends GeneratedMessageV3.Builder<DateShiftConfig.Builder> implements DateShiftConfigOrBuilder

Shifts dates by random number of days, with option to be consistent for the same context. See https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting to learn more.

Protobuf type google.privacy.dlp.v2.DateShiftConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DateShiftConfig build()
Returns
Type Description
DateShiftConfig

buildPartial()

public DateShiftConfig buildPartial()
Returns
Type Description
DateShiftConfig

clear()

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

clearContext()

public DateShiftConfig.Builder clearContext()

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Returns
Type Description
DateShiftConfig.Builder

clearCryptoKey()

public DateShiftConfig.Builder clearCryptoKey()

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Returns
Type Description
DateShiftConfig.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLowerBoundDays()

public DateShiftConfig.Builder clearLowerBoundDays()

Required. For example, -5 means shift date to at most 5 days back in the past.

int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DateShiftConfig.Builder

This builder for chaining.

clearMethod()

public DateShiftConfig.Builder clearMethod()
Returns
Type Description
DateShiftConfig.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUpperBoundDays()

public DateShiftConfig.Builder clearUpperBoundDays()

Required. Range of shift in days. Actual shift will be selected at random within this range (inclusive ends). Negative means shift to earlier in time. Must not be more than 365250 days (1000 years) each direction.

For example, 3 means shift date to at most 3 days into the future.

int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DateShiftConfig.Builder

This builder for chaining.

clone()

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

getContext()

public FieldId getContext()

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Returns
Type Description
FieldId

The context.

getContextBuilder()

public FieldId.Builder getContextBuilder()

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Returns
Type Description
FieldId.Builder

getContextOrBuilder()

public FieldIdOrBuilder getContextOrBuilder()

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Returns
Type Description
FieldIdOrBuilder

getCryptoKey()

public CryptoKey getCryptoKey()

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Returns
Type Description
CryptoKey

The cryptoKey.

getCryptoKeyBuilder()

public CryptoKey.Builder getCryptoKeyBuilder()

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Returns
Type Description
CryptoKey.Builder

getCryptoKeyOrBuilder()

public CryptoKeyOrBuilder getCryptoKeyOrBuilder()

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Returns
Type Description
CryptoKeyOrBuilder

getDefaultInstanceForType()

public DateShiftConfig getDefaultInstanceForType()
Returns
Type Description
DateShiftConfig

getDescriptorForType()

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

getLowerBoundDays()

public int getLowerBoundDays()

Required. For example, -5 means shift date to at most 5 days back in the past.

int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The lowerBoundDays.

getMethodCase()

public DateShiftConfig.MethodCase getMethodCase()
Returns
Type Description
DateShiftConfig.MethodCase

getUpperBoundDays()

public int getUpperBoundDays()

Required. Range of shift in days. Actual shift will be selected at random within this range (inclusive ends). Negative means shift to earlier in time. Must not be more than 365250 days (1000 years) each direction.

For example, 3 means shift date to at most 3 days into the future.

int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The upperBoundDays.

hasContext()

public boolean hasContext()

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Returns
Type Description
boolean

Whether the context field is set.

hasCryptoKey()

public boolean hasCryptoKey()

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Returns
Type Description
boolean

Whether the cryptoKey field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContext(FieldId value)

public DateShiftConfig.Builder mergeContext(FieldId value)

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Parameter
Name Description
value FieldId
Returns
Type Description
DateShiftConfig.Builder

mergeCryptoKey(CryptoKey value)

public DateShiftConfig.Builder mergeCryptoKey(CryptoKey value)

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Parameter
Name Description
value CryptoKey
Returns
Type Description
DateShiftConfig.Builder

mergeFrom(DateShiftConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setContext(FieldId value)

public DateShiftConfig.Builder setContext(FieldId value)

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Parameter
Name Description
value FieldId
Returns
Type Description
DateShiftConfig.Builder

setContext(FieldId.Builder builderForValue)

public DateShiftConfig.Builder setContext(FieldId.Builder builderForValue)

Points to the field that contains the context, for example, an entity id. If set, must also set cryptoKey. If set, shift will be consistent for the given context.

.google.privacy.dlp.v2.FieldId context = 3;

Parameter
Name Description
builderForValue FieldId.Builder
Returns
Type Description
DateShiftConfig.Builder

setCryptoKey(CryptoKey value)

public DateShiftConfig.Builder setCryptoKey(CryptoKey value)

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Parameter
Name Description
value CryptoKey
Returns
Type Description
DateShiftConfig.Builder

setCryptoKey(CryptoKey.Builder builderForValue)

public DateShiftConfig.Builder setCryptoKey(CryptoKey.Builder builderForValue)

Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and crypto_key. If set, must also set context. Can only be applied to table items.

.google.privacy.dlp.v2.CryptoKey crypto_key = 4;

Parameter
Name Description
builderForValue CryptoKey.Builder
Returns
Type Description
DateShiftConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setLowerBoundDays(int value)

public DateShiftConfig.Builder setLowerBoundDays(int value)

Required. For example, -5 means shift date to at most 5 days back in the past.

int32 lower_bound_days = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The lowerBoundDays to set.

Returns
Type Description
DateShiftConfig.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpperBoundDays(int value)

public DateShiftConfig.Builder setUpperBoundDays(int value)

Required. Range of shift in days. Actual shift will be selected at random within this range (inclusive ends). Negative means shift to earlier in time. Must not be more than 365250 days (1000 years) each direction.

For example, 3 means shift date to at most 3 days into the future.

int32 upper_bound_days = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The upperBoundDays to set.

Returns
Type Description
DateShiftConfig.Builder

This builder for chaining.