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

com.pulumi.azurenative.cache.DatabaseArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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;

import com.pulumi.azurenative.cache.enums.ClusteringPolicy;
import com.pulumi.azurenative.cache.enums.EvictionPolicy;
import com.pulumi.azurenative.cache.enums.Protocol;
import com.pulumi.azurenative.cache.inputs.DatabasePropertiesGeoReplicationArgs;
import com.pulumi.azurenative.cache.inputs.ModuleArgs;
import com.pulumi.azurenative.cache.inputs.PersistenceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class DatabaseArgs extends com.pulumi.resources.ResourceArgs {

    public static final DatabaseArgs Empty = new DatabaseArgs();

    /**
     * Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
     * 
     */
    @Import(name="clientProtocol")
    private @Nullable Output> clientProtocol;

    /**
     * @return Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
     * 
     */
    public Optional>> clientProtocol() {
        return Optional.ofNullable(this.clientProtocol);
    }

    /**
     * The name of the RedisEnterprise cluster.
     * 
     */
    @Import(name="clusterName", required=true)
    private Output clusterName;

    /**
     * @return The name of the RedisEnterprise cluster.
     * 
     */
    public Output clusterName() {
        return this.clusterName;
    }

    /**
     * Clustering policy - default is OSSCluster. Specified at create time.
     * 
     */
    @Import(name="clusteringPolicy")
    private @Nullable Output> clusteringPolicy;

    /**
     * @return Clustering policy - default is OSSCluster. Specified at create time.
     * 
     */
    public Optional>> clusteringPolicy() {
        return Optional.ofNullable(this.clusteringPolicy);
    }

    /**
     * The name of the database.
     * 
     */
    @Import(name="databaseName")
    private @Nullable Output databaseName;

    /**
     * @return The name of the database.
     * 
     */
    public Optional> databaseName() {
        return Optional.ofNullable(this.databaseName);
    }

    /**
     * Redis eviction policy - default is VolatileLRU
     * 
     */
    @Import(name="evictionPolicy")
    private @Nullable Output> evictionPolicy;

    /**
     * @return Redis eviction policy - default is VolatileLRU
     * 
     */
    public Optional>> evictionPolicy() {
        return Optional.ofNullable(this.evictionPolicy);
    }

    /**
     * Optional set of properties to configure geo replication for this database.
     * 
     */
    @Import(name="geoReplication")
    private @Nullable Output geoReplication;

    /**
     * @return Optional set of properties to configure geo replication for this database.
     * 
     */
    public Optional> geoReplication() {
        return Optional.ofNullable(this.geoReplication);
    }

    /**
     * Optional set of redis modules to enable in this database - modules can only be added at creation time.
     * 
     */
    @Import(name="modules")
    private @Nullable Output> modules;

    /**
     * @return Optional set of redis modules to enable in this database - modules can only be added at creation time.
     * 
     */
    public Optional>> modules() {
        return Optional.ofNullable(this.modules);
    }

    /**
     * Persistence settings
     * 
     */
    @Import(name="persistence")
    private @Nullable Output persistence;

    /**
     * @return Persistence settings
     * 
     */
    public Optional> persistence() {
        return Optional.ofNullable(this.persistence);
    }

    /**
     * TCP port of the database endpoint. Specified at create time. Defaults to an available port.
     * 
     */
    @Import(name="port")
    private @Nullable Output port;

    /**
     * @return TCP port of the database endpoint. Specified at create time. Defaults to an available port.
     * 
     */
    public Optional> port() {
        return Optional.ofNullable(this.port);
    }

    /**
     * The name of the resource group. The name is case insensitive.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group. The name is case insensitive.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    private DatabaseArgs() {}

    private DatabaseArgs(DatabaseArgs $) {
        this.clientProtocol = $.clientProtocol;
        this.clusterName = $.clusterName;
        this.clusteringPolicy = $.clusteringPolicy;
        this.databaseName = $.databaseName;
        this.evictionPolicy = $.evictionPolicy;
        this.geoReplication = $.geoReplication;
        this.modules = $.modules;
        this.persistence = $.persistence;
        this.port = $.port;
        this.resourceGroupName = $.resourceGroupName;
    }

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

    public static final class Builder {
        private DatabaseArgs $;

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

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

        /**
         * @param clientProtocol Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
         * 
         * @return builder
         * 
         */
        public Builder clientProtocol(@Nullable Output> clientProtocol) {
            $.clientProtocol = clientProtocol;
            return this;
        }

        /**
         * @param clientProtocol Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
         * 
         * @return builder
         * 
         */
        public Builder clientProtocol(Either clientProtocol) {
            return clientProtocol(Output.of(clientProtocol));
        }

        /**
         * @param clientProtocol Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
         * 
         * @return builder
         * 
         */
        public Builder clientProtocol(String clientProtocol) {
            return clientProtocol(Either.ofLeft(clientProtocol));
        }

        /**
         * @param clientProtocol Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted.
         * 
         * @return builder
         * 
         */
        public Builder clientProtocol(Protocol clientProtocol) {
            return clientProtocol(Either.ofRight(clientProtocol));
        }

        /**
         * @param clusterName The name of the RedisEnterprise cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterName(Output clusterName) {
            $.clusterName = clusterName;
            return this;
        }

        /**
         * @param clusterName The name of the RedisEnterprise cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterName(String clusterName) {
            return clusterName(Output.of(clusterName));
        }

        /**
         * @param clusteringPolicy Clustering policy - default is OSSCluster. Specified at create time.
         * 
         * @return builder
         * 
         */
        public Builder clusteringPolicy(@Nullable Output> clusteringPolicy) {
            $.clusteringPolicy = clusteringPolicy;
            return this;
        }

        /**
         * @param clusteringPolicy Clustering policy - default is OSSCluster. Specified at create time.
         * 
         * @return builder
         * 
         */
        public Builder clusteringPolicy(Either clusteringPolicy) {
            return clusteringPolicy(Output.of(clusteringPolicy));
        }

        /**
         * @param clusteringPolicy Clustering policy - default is OSSCluster. Specified at create time.
         * 
         * @return builder
         * 
         */
        public Builder clusteringPolicy(String clusteringPolicy) {
            return clusteringPolicy(Either.ofLeft(clusteringPolicy));
        }

        /**
         * @param clusteringPolicy Clustering policy - default is OSSCluster. Specified at create time.
         * 
         * @return builder
         * 
         */
        public Builder clusteringPolicy(ClusteringPolicy clusteringPolicy) {
            return clusteringPolicy(Either.ofRight(clusteringPolicy));
        }

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(@Nullable Output databaseName) {
            $.databaseName = databaseName;
            return this;
        }

        /**
         * @param databaseName The name of the database.
         * 
         * @return builder
         * 
         */
        public Builder databaseName(String databaseName) {
            return databaseName(Output.of(databaseName));
        }

        /**
         * @param evictionPolicy Redis eviction policy - default is VolatileLRU
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(@Nullable Output> evictionPolicy) {
            $.evictionPolicy = evictionPolicy;
            return this;
        }

        /**
         * @param evictionPolicy Redis eviction policy - default is VolatileLRU
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(Either evictionPolicy) {
            return evictionPolicy(Output.of(evictionPolicy));
        }

        /**
         * @param evictionPolicy Redis eviction policy - default is VolatileLRU
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(String evictionPolicy) {
            return evictionPolicy(Either.ofLeft(evictionPolicy));
        }

        /**
         * @param evictionPolicy Redis eviction policy - default is VolatileLRU
         * 
         * @return builder
         * 
         */
        public Builder evictionPolicy(EvictionPolicy evictionPolicy) {
            return evictionPolicy(Either.ofRight(evictionPolicy));
        }

        /**
         * @param geoReplication Optional set of properties to configure geo replication for this database.
         * 
         * @return builder
         * 
         */
        public Builder geoReplication(@Nullable Output geoReplication) {
            $.geoReplication = geoReplication;
            return this;
        }

        /**
         * @param geoReplication Optional set of properties to configure geo replication for this database.
         * 
         * @return builder
         * 
         */
        public Builder geoReplication(DatabasePropertiesGeoReplicationArgs geoReplication) {
            return geoReplication(Output.of(geoReplication));
        }

        /**
         * @param modules Optional set of redis modules to enable in this database - modules can only be added at creation time.
         * 
         * @return builder
         * 
         */
        public Builder modules(@Nullable Output> modules) {
            $.modules = modules;
            return this;
        }

        /**
         * @param modules Optional set of redis modules to enable in this database - modules can only be added at creation time.
         * 
         * @return builder
         * 
         */
        public Builder modules(List modules) {
            return modules(Output.of(modules));
        }

        /**
         * @param modules Optional set of redis modules to enable in this database - modules can only be added at creation time.
         * 
         * @return builder
         * 
         */
        public Builder modules(ModuleArgs... modules) {
            return modules(List.of(modules));
        }

        /**
         * @param persistence Persistence settings
         * 
         * @return builder
         * 
         */
        public Builder persistence(@Nullable Output persistence) {
            $.persistence = persistence;
            return this;
        }

        /**
         * @param persistence Persistence settings
         * 
         * @return builder
         * 
         */
        public Builder persistence(PersistenceArgs persistence) {
            return persistence(Output.of(persistence));
        }

        /**
         * @param port TCP port of the database endpoint. Specified at create time. Defaults to an available port.
         * 
         * @return builder
         * 
         */
        public Builder port(@Nullable Output port) {
            $.port = port;
            return this;
        }

        /**
         * @param port TCP port of the database endpoint. Specified at create time. Defaults to an available port.
         * 
         * @return builder
         * 
         */
        public Builder port(Integer port) {
            return port(Output.of(port));
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group. The name is case insensitive.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        public DatabaseArgs build() {
            if ($.clusterName == null) {
                throw new MissingRequiredPropertyException("DatabaseArgs", "clusterName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("DatabaseArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy