Class 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.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
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public DateShiftConfig.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • setField

        public DateShiftConfig.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • clearField

        public DateShiftConfig.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • clearOneof

        public DateShiftConfig.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • setRepeatedField

        public DateShiftConfig.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • addRepeatedField

        public DateShiftConfig.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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
      • setUnknownFields

        public final DateShiftConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>
      • mergeUnknownFields

        public final DateShiftConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DateShiftConfig.Builder>