// *** 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.alloydb.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.alloydb.outputs.ClusterContinuousBackupConfigEncryptionConfig;
import java.lang.Boolean;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ClusterContinuousBackupConfig {
    /**
     * @return Whether continuous backup recovery is enabled. If not set, defaults to true.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
     * Structure is documented below.
     * 
     */
    private @Nullable ClusterContinuousBackupConfigEncryptionConfig encryptionConfig;
    /**
     * @return The numbers of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window.
     * If not set, defaults to 14 days.
     * 
     */
    private @Nullable Integer recoveryWindowDays;

    private ClusterContinuousBackupConfig() {}
    /**
     * @return Whether continuous backup recovery is enabled. If not set, defaults to true.
     * 
     */
    public Optional<Boolean> enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key).
     * Structure is documented below.
     * 
     */
    public Optional<ClusterContinuousBackupConfigEncryptionConfig> encryptionConfig() {
        return Optional.ofNullable(this.encryptionConfig);
    }
    /**
     * @return The numbers of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window.
     * If not set, defaults to 14 days.
     * 
     */
    public Optional<Integer> recoveryWindowDays() {
        return Optional.ofNullable(this.recoveryWindowDays);
    }

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

    public static Builder builder(ClusterContinuousBackupConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean enabled;
        private @Nullable ClusterContinuousBackupConfigEncryptionConfig encryptionConfig;
        private @Nullable Integer recoveryWindowDays;
        public Builder() {}
        public Builder(ClusterContinuousBackupConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.enabled = defaults.enabled;
    	      this.encryptionConfig = defaults.encryptionConfig;
    	      this.recoveryWindowDays = defaults.recoveryWindowDays;
        }

        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {
            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder encryptionConfig(@Nullable ClusterContinuousBackupConfigEncryptionConfig encryptionConfig) {
            this.encryptionConfig = encryptionConfig;
            return this;
        }
        @CustomType.Setter
        public Builder recoveryWindowDays(@Nullable Integer recoveryWindowDays) {
            this.recoveryWindowDays = recoveryWindowDays;
            return this;
        }
        public ClusterContinuousBackupConfig build() {
            final var o = new ClusterContinuousBackupConfig();
            o.enabled = enabled;
            o.encryptionConfig = encryptionConfig;
            o.recoveryWindowDays = recoveryWindowDays;
            return o;
        }
    }
}
