// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.dataloss.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.dataloss.outputs.PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigContext;
import com.pulumi.gcp.dataloss.outputs.PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigCryptoKey;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig {
    /**
     * @return 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.
     * Structure is documented below.
     * 
     */
    private @Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigContext context;
    /**
     * @return Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and cryptoKey. If set, must also set context. Can only be applied to table items.
     * Structure is documented below.
     * 
     */
    private @Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigCryptoKey cryptoKey;
    /**
     * @return For example, -5 means shift date to at most 5 days back in the past.
     * 
     */
    private Integer lowerBoundDays;
    /**
     * @return 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.
     * 
     */
    private Integer upperBoundDays;

    private PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig() {}
    /**
     * @return 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.
     * Structure is documented below.
     * 
     */
    public Optional<PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigContext> context() {
        return Optional.ofNullable(this.context);
    }
    /**
     * @return Causes the shift to be computed based on this key and the context. This results in the same shift for the same context and cryptoKey. If set, must also set context. Can only be applied to table items.
     * Structure is documented below.
     * 
     */
    public Optional<PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigCryptoKey> cryptoKey() {
        return Optional.ofNullable(this.cryptoKey);
    }
    /**
     * @return For example, -5 means shift date to at most 5 days back in the past.
     * 
     */
    public Integer lowerBoundDays() {
        return this.lowerBoundDays;
    }
    /**
     * @return 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.
     * 
     */
    public Integer upperBoundDays() {
        return this.upperBoundDays;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigContext context;
        private @Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigCryptoKey cryptoKey;
        private Integer lowerBoundDays;
        private Integer upperBoundDays;
        public Builder() {}
        public Builder(PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.context = defaults.context;
    	      this.cryptoKey = defaults.cryptoKey;
    	      this.lowerBoundDays = defaults.lowerBoundDays;
    	      this.upperBoundDays = defaults.upperBoundDays;
        }

        @CustomType.Setter
        public Builder context(@Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigContext context) {
            this.context = context;
            return this;
        }
        @CustomType.Setter
        public Builder cryptoKey(@Nullable PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfigCryptoKey cryptoKey) {
            this.cryptoKey = cryptoKey;
            return this;
        }
        @CustomType.Setter
        public Builder lowerBoundDays(Integer lowerBoundDays) {
            this.lowerBoundDays = Objects.requireNonNull(lowerBoundDays);
            return this;
        }
        @CustomType.Setter
        public Builder upperBoundDays(Integer upperBoundDays) {
            this.upperBoundDays = Objects.requireNonNull(upperBoundDays);
            return this;
        }
        public PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig build() {
            final var o = new PreventionDeidentifyTemplateDeidentifyConfigRecordTransformationsFieldTransformationPrimitiveTransformationDateShiftConfig();
            o.context = context;
            o.cryptoKey = cryptoKey;
            o.lowerBoundDays = lowerBoundDays;
            o.upperBoundDays = upperBoundDays;
            return o;
        }
    }
}
