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

com.pulumi.azurenative.dbforpostgresql.inputs.AuthConfigArgs 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.dbforpostgresql.inputs;

import com.pulumi.azurenative.dbforpostgresql.enums.ActiveDirectoryAuthEnum;
import com.pulumi.azurenative.dbforpostgresql.enums.PasswordAuthEnum;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Authentication configuration properties of a server
 * 
 */
public final class AuthConfigArgs extends com.pulumi.resources.ResourceArgs {

    public static final AuthConfigArgs Empty = new AuthConfigArgs();

    /**
     * If Enabled, Azure Active Directory authentication is enabled.
     * 
     */
    @Import(name="activeDirectoryAuth")
    private @Nullable Output> activeDirectoryAuth;

    /**
     * @return If Enabled, Azure Active Directory authentication is enabled.
     * 
     */
    public Optional>> activeDirectoryAuth() {
        return Optional.ofNullable(this.activeDirectoryAuth);
    }

    /**
     * If Enabled, Password authentication is enabled.
     * 
     */
    @Import(name="passwordAuth")
    private @Nullable Output> passwordAuth;

    /**
     * @return If Enabled, Password authentication is enabled.
     * 
     */
    public Optional>> passwordAuth() {
        return Optional.ofNullable(this.passwordAuth);
    }

    /**
     * Tenant id of the server.
     * 
     */
    @Import(name="tenantId")
    private @Nullable Output tenantId;

    /**
     * @return Tenant id of the server.
     * 
     */
    public Optional> tenantId() {
        return Optional.ofNullable(this.tenantId);
    }

    private AuthConfigArgs() {}

    private AuthConfigArgs(AuthConfigArgs $) {
        this.activeDirectoryAuth = $.activeDirectoryAuth;
        this.passwordAuth = $.passwordAuth;
        this.tenantId = $.tenantId;
    }

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

    public static final class Builder {
        private AuthConfigArgs $;

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

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

        /**
         * @param activeDirectoryAuth If Enabled, Azure Active Directory authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder activeDirectoryAuth(@Nullable Output> activeDirectoryAuth) {
            $.activeDirectoryAuth = activeDirectoryAuth;
            return this;
        }

        /**
         * @param activeDirectoryAuth If Enabled, Azure Active Directory authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder activeDirectoryAuth(Either activeDirectoryAuth) {
            return activeDirectoryAuth(Output.of(activeDirectoryAuth));
        }

        /**
         * @param activeDirectoryAuth If Enabled, Azure Active Directory authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder activeDirectoryAuth(String activeDirectoryAuth) {
            return activeDirectoryAuth(Either.ofLeft(activeDirectoryAuth));
        }

        /**
         * @param activeDirectoryAuth If Enabled, Azure Active Directory authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder activeDirectoryAuth(ActiveDirectoryAuthEnum activeDirectoryAuth) {
            return activeDirectoryAuth(Either.ofRight(activeDirectoryAuth));
        }

        /**
         * @param passwordAuth If Enabled, Password authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder passwordAuth(@Nullable Output> passwordAuth) {
            $.passwordAuth = passwordAuth;
            return this;
        }

        /**
         * @param passwordAuth If Enabled, Password authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder passwordAuth(Either passwordAuth) {
            return passwordAuth(Output.of(passwordAuth));
        }

        /**
         * @param passwordAuth If Enabled, Password authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder passwordAuth(String passwordAuth) {
            return passwordAuth(Either.ofLeft(passwordAuth));
        }

        /**
         * @param passwordAuth If Enabled, Password authentication is enabled.
         * 
         * @return builder
         * 
         */
        public Builder passwordAuth(PasswordAuthEnum passwordAuth) {
            return passwordAuth(Either.ofRight(passwordAuth));
        }

        /**
         * @param tenantId Tenant id of the server.
         * 
         * @return builder
         * 
         */
        public Builder tenantId(@Nullable Output tenantId) {
            $.tenantId = tenantId;
            return this;
        }

        /**
         * @param tenantId Tenant id of the server.
         * 
         * @return builder
         * 
         */
        public Builder tenantId(String tenantId) {
            return tenantId(Output.of(tenantId));
        }

        public AuthConfigArgs build() {
            $.passwordAuth = Codegen.stringProp("passwordAuth").left(PasswordAuthEnum.class).output().arg($.passwordAuth).def("Enabled").getNullable();
            $.tenantId = Codegen.stringProp("tenantId").output().arg($.tenantId).def("").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy