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

com.pulumi.digitalocean.DatabaseUserArgs Maven / Gradle / Ivy

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

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.inputs.DatabaseUserSettingArgs;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final DatabaseUserArgs Empty = new DatabaseUserArgs();

    /**
     * The ID of the original source database cluster.
     * 
     */
    @Import(name="clusterId", required=true)
    private Output clusterId;

    /**
     * @return The ID of the original source database cluster.
     * 
     */
    public Output clusterId() {
        return this.clusterId;
    }

    /**
     * The authentication method to use for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password` (this is the default).
     * 
     */
    @Import(name="mysqlAuthPlugin")
    private @Nullable Output mysqlAuthPlugin;

    /**
     * @return The authentication method to use for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password` (this is the default).
     * 
     */
    public Optional> mysqlAuthPlugin() {
        return Optional.ofNullable(this.mysqlAuthPlugin);
    }

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

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

    /**
     * Contains optional settings for the user.
     * The `settings` block is documented below.
     * 
     */
    @Import(name="settings")
    private @Nullable Output> settings;

    /**
     * @return Contains optional settings for the user.
     * The `settings` block is documented below.
     * 
     */
    public Optional>> settings() {
        return Optional.ofNullable(this.settings);
    }

    private DatabaseUserArgs() {}

    private DatabaseUserArgs(DatabaseUserArgs $) {
        this.clusterId = $.clusterId;
        this.mysqlAuthPlugin = $.mysqlAuthPlugin;
        this.name = $.name;
        this.settings = $.settings;
    }

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

    public static final class Builder {
        private DatabaseUserArgs $;

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

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

        /**
         * @param clusterId The ID of the original source database cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(Output clusterId) {
            $.clusterId = clusterId;
            return this;
        }

        /**
         * @param clusterId The ID of the original source database cluster.
         * 
         * @return builder
         * 
         */
        public Builder clusterId(String clusterId) {
            return clusterId(Output.of(clusterId));
        }

        /**
         * @param mysqlAuthPlugin The authentication method to use for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password` (this is the default).
         * 
         * @return builder
         * 
         */
        public Builder mysqlAuthPlugin(@Nullable Output mysqlAuthPlugin) {
            $.mysqlAuthPlugin = mysqlAuthPlugin;
            return this;
        }

        /**
         * @param mysqlAuthPlugin The authentication method to use for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password` (this is the default).
         * 
         * @return builder
         * 
         */
        public Builder mysqlAuthPlugin(String mysqlAuthPlugin) {
            return mysqlAuthPlugin(Output.of(mysqlAuthPlugin));
        }

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

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

        /**
         * @param settings Contains optional settings for the user.
         * The `settings` block is documented below.
         * 
         * @return builder
         * 
         */
        public Builder settings(@Nullable Output> settings) {
            $.settings = settings;
            return this;
        }

        /**
         * @param settings Contains optional settings for the user.
         * The `settings` block is documented below.
         * 
         * @return builder
         * 
         */
        public Builder settings(List settings) {
            return settings(Output.of(settings));
        }

        /**
         * @param settings Contains optional settings for the user.
         * The `settings` block is documented below.
         * 
         * @return builder
         * 
         */
        public Builder settings(DatabaseUserSettingArgs... settings) {
            return settings(List.of(settings));
        }

        public DatabaseUserArgs build() {
            if ($.clusterId == null) {
                throw new MissingRequiredPropertyException("DatabaseUserArgs", "clusterId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy