All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.cache.inputs.PersistenceArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.cache.inputs;

import com.pulumi.azurenative.cache.enums.AofFrequency;
import com.pulumi.azurenative.cache.enums.RdbFrequency;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Persistence-related configuration for the RedisEnterprise database
 * 
 */
public final class PersistenceArgs extends com.pulumi.resources.ResourceArgs {

    public static final PersistenceArgs Empty = new PersistenceArgs();

    /**
     * Sets whether AOF is enabled.
     * 
     */
    @Import(name="aofEnabled")
    private @Nullable Output aofEnabled;

    /**
     * @return Sets whether AOF is enabled.
     * 
     */
    public Optional> aofEnabled() {
        return Optional.ofNullable(this.aofEnabled);
    }

    /**
     * Sets the frequency at which data is written to disk.
     * 
     */
    @Import(name="aofFrequency")
    private @Nullable Output> aofFrequency;

    /**
     * @return Sets the frequency at which data is written to disk.
     * 
     */
    public Optional>> aofFrequency() {
        return Optional.ofNullable(this.aofFrequency);
    }

    /**
     * Sets whether RDB is enabled.
     * 
     */
    @Import(name="rdbEnabled")
    private @Nullable Output rdbEnabled;

    /**
     * @return Sets whether RDB is enabled.
     * 
     */
    public Optional> rdbEnabled() {
        return Optional.ofNullable(this.rdbEnabled);
    }

    /**
     * Sets the frequency at which a snapshot of the database is created.
     * 
     */
    @Import(name="rdbFrequency")
    private @Nullable Output> rdbFrequency;

    /**
     * @return Sets the frequency at which a snapshot of the database is created.
     * 
     */
    public Optional>> rdbFrequency() {
        return Optional.ofNullable(this.rdbFrequency);
    }

    private PersistenceArgs() {}

    private PersistenceArgs(PersistenceArgs $) {
        this.aofEnabled = $.aofEnabled;
        this.aofFrequency = $.aofFrequency;
        this.rdbEnabled = $.rdbEnabled;
        this.rdbFrequency = $.rdbFrequency;
    }

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

    public static final class Builder {
        private PersistenceArgs $;

        public Builder() {
            $ = new PersistenceArgs();
        }

        public Builder(PersistenceArgs defaults) {
            $ = new PersistenceArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param aofEnabled Sets whether AOF is enabled.
         * 
         * @return builder
         * 
         */
        public Builder aofEnabled(@Nullable Output aofEnabled) {
            $.aofEnabled = aofEnabled;
            return this;
        }

        /**
         * @param aofEnabled Sets whether AOF is enabled.
         * 
         * @return builder
         * 
         */
        public Builder aofEnabled(Boolean aofEnabled) {
            return aofEnabled(Output.of(aofEnabled));
        }

        /**
         * @param aofFrequency Sets the frequency at which data is written to disk.
         * 
         * @return builder
         * 
         */
        public Builder aofFrequency(@Nullable Output> aofFrequency) {
            $.aofFrequency = aofFrequency;
            return this;
        }

        /**
         * @param aofFrequency Sets the frequency at which data is written to disk.
         * 
         * @return builder
         * 
         */
        public Builder aofFrequency(Either aofFrequency) {
            return aofFrequency(Output.of(aofFrequency));
        }

        /**
         * @param aofFrequency Sets the frequency at which data is written to disk.
         * 
         * @return builder
         * 
         */
        public Builder aofFrequency(String aofFrequency) {
            return aofFrequency(Either.ofLeft(aofFrequency));
        }

        /**
         * @param aofFrequency Sets the frequency at which data is written to disk.
         * 
         * @return builder
         * 
         */
        public Builder aofFrequency(AofFrequency aofFrequency) {
            return aofFrequency(Either.ofRight(aofFrequency));
        }

        /**
         * @param rdbEnabled Sets whether RDB is enabled.
         * 
         * @return builder
         * 
         */
        public Builder rdbEnabled(@Nullable Output rdbEnabled) {
            $.rdbEnabled = rdbEnabled;
            return this;
        }

        /**
         * @param rdbEnabled Sets whether RDB is enabled.
         * 
         * @return builder
         * 
         */
        public Builder rdbEnabled(Boolean rdbEnabled) {
            return rdbEnabled(Output.of(rdbEnabled));
        }

        /**
         * @param rdbFrequency Sets the frequency at which a snapshot of the database is created.
         * 
         * @return builder
         * 
         */
        public Builder rdbFrequency(@Nullable Output> rdbFrequency) {
            $.rdbFrequency = rdbFrequency;
            return this;
        }

        /**
         * @param rdbFrequency Sets the frequency at which a snapshot of the database is created.
         * 
         * @return builder
         * 
         */
        public Builder rdbFrequency(Either rdbFrequency) {
            return rdbFrequency(Output.of(rdbFrequency));
        }

        /**
         * @param rdbFrequency Sets the frequency at which a snapshot of the database is created.
         * 
         * @return builder
         * 
         */
        public Builder rdbFrequency(String rdbFrequency) {
            return rdbFrequency(Either.ofLeft(rdbFrequency));
        }

        /**
         * @param rdbFrequency Sets the frequency at which a snapshot of the database is created.
         * 
         * @return builder
         * 
         */
        public Builder rdbFrequency(RdbFrequency rdbFrequency) {
            return rdbFrequency(Either.ofRight(rdbFrequency));
        }

        public PersistenceArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy