Class DateShiftConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DateShiftConfig.Builder>
com.google.privacy.dlp.v2.DateShiftConfig.Builder
All Implemented Interfaces:
DateShiftConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DateShiftConfig

public static final class DateShiftConfig.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<DateShiftConfig.Builder>
    • clear

      public DateShiftConfig.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<DateShiftConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<DateShiftConfig.Builder>
    • getDefaultInstanceForType

      public DateShiftConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public DateShiftConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public DateShiftConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public DateShiftConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DateShiftConfig.Builder>
    • mergeFrom

      public DateShiftConfig.Builder mergeFrom(DateShiftConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<DateShiftConfig.Builder>
    • mergeFrom

      public DateShiftConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DateShiftConfig.Builder>
      Throws:
      IOException
    • getMethodCase

      public DateShiftConfig.MethodCase getMethodCase()
      Specified by:
      getMethodCase in interface DateShiftConfigOrBuilder
    • clearMethod

      public DateShiftConfig.Builder clearMethod()
    • 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];
      Specified by:
      getUpperBoundDays in interface DateShiftConfigOrBuilder
      Returns:
      The upperBoundDays.
    • setUpperBoundDays

      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];
      Parameters:
      value - The upperBoundDays to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • 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];
      Specified by:
      getLowerBoundDays in interface DateShiftConfigOrBuilder
      Returns:
      The lowerBoundDays.
    • setLowerBoundDays

      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];
      Parameters:
      value - The lowerBoundDays to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • 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;
      Specified by:
      hasContext in interface DateShiftConfigOrBuilder
      Returns:
      Whether the context field is set.
    • 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;
      Specified by:
      getContext in interface DateShiftConfigOrBuilder
      Returns:
      The context.
    • setContext

      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;
    • setContext

      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;
    • mergeContext

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getContextOrBuilder in interface DateShiftConfigOrBuilder
    • 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;
      Specified by:
      hasCryptoKey in interface DateShiftConfigOrBuilder
      Returns:
      Whether the cryptoKey field is set.
    • 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;
      Specified by:
      getCryptoKey in interface DateShiftConfigOrBuilder
      Returns:
      The cryptoKey.
    • setCryptoKey

      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;
    • setCryptoKey

      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;
    • mergeCryptoKey

      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;
    • 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;
    • 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;
    • 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;
      Specified by:
      getCryptoKeyOrBuilder in interface DateShiftConfigOrBuilder