Class DateShiftConfig.Builder (3.20.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/dlp/docs/concepts-date-shifting to learn more.

Protobuf type google.privacy.dlp.v2.DateShiftConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DateShiftConfig build()
Returns
TypeDescription
DateShiftConfig

buildPartial()

public DateShiftConfig buildPartial()
Returns
TypeDescription
DateShiftConfig

clear()

public DateShiftConfig.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
DateShiftConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public DateShiftConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
DateShiftConfig.Builder

This builder for chaining.

clearMethod()

public DateShiftConfig.Builder clearMethod()
Returns
TypeDescription
DateShiftConfig.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public DateShiftConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
DateShiftConfig.Builder

This builder for chaining.

clone()

public DateShiftConfig.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CryptoKeyOrBuilder

getDefaultInstanceForType()

public DateShiftConfig getDefaultInstanceForType()
Returns
TypeDescription
DateShiftConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
int

The lowerBoundDays.

getMethodCase()

public DateShiftConfig.MethodCase getMethodCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the cryptoKey field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueFieldId
Returns
TypeDescription
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
NameDescription
valueCryptoKey
Returns
TypeDescription
DateShiftConfig.Builder

mergeFrom(DateShiftConfig other)

public DateShiftConfig.Builder mergeFrom(DateShiftConfig other)
Parameter
NameDescription
otherDateShiftConfig
Returns
TypeDescription
DateShiftConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DateShiftConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueFieldId
Returns
TypeDescription
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
NameDescription
builderForValueFieldId.Builder
Returns
TypeDescription
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
NameDescription
valueCryptoKey
Returns
TypeDescription
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
NameDescription
builderForValueCryptoKey.Builder
Returns
TypeDescription
DateShiftConfig.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DateShiftConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The lowerBoundDays to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
DateShiftConfig.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DateShiftConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The upperBoundDays to set.

Returns
TypeDescription
DateShiftConfig.Builder

This builder for chaining.