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

com.pulumi.azurenative.dbformariadb.ServerArgs 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.dbformariadb;

import com.pulumi.azurenative.dbformariadb.inputs.ServerPropertiesForDefaultCreateArgs;
import com.pulumi.azurenative.dbformariadb.inputs.ServerPropertiesForGeoRestoreArgs;
import com.pulumi.azurenative.dbformariadb.inputs.ServerPropertiesForReplicaArgs;
import com.pulumi.azurenative.dbformariadb.inputs.ServerPropertiesForRestoreArgs;
import com.pulumi.azurenative.dbformariadb.inputs.SkuArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServerArgs Empty = new ServerArgs();

    /**
     * The location the resource resides in.
     * 
     */
    @Import(name="location")
    private @Nullable Output location;

    /**
     * @return The location the resource resides in.
     * 
     */
    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Properties of the server.
     * 
     */
    @Import(name="properties", required=true)
    private Output properties;

    /**
     * @return Properties of the server.
     * 
     */
    public Output properties() {
        return this.properties;
    }

    /**
     * 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;
    }

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

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

    /**
     * The SKU (pricing tier) of the server.
     * 
     */
    @Import(name="sku")
    private @Nullable Output sku;

    /**
     * @return The SKU (pricing tier) of the server.
     * 
     */
    public Optional> sku() {
        return Optional.ofNullable(this.sku);
    }

    /**
     * Application-specific metadata in the form of key-value pairs.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Application-specific metadata in the form of key-value pairs.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private ServerArgs() {}

    private ServerArgs(ServerArgs $) {
        this.location = $.location;
        this.properties = $.properties;
        this.resourceGroupName = $.resourceGroupName;
        this.serverName = $.serverName;
        this.sku = $.sku;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private ServerArgs $;

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

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

        /**
         * @param location The location the resource resides in.
         * 
         * @return builder
         * 
         */
        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        /**
         * @param location The location the resource resides in.
         * 
         * @return builder
         * 
         */
        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param properties Properties of the server.
         * 
         * @return builder
         * 
         */
        public Builder properties(Output properties) {
            $.properties = properties;
            return this;
        }

        /**
         * @param properties Properties of the server.
         * 
         * @return builder
         * 
         */
        public Builder properties(Object properties) {
            return properties(Output.of(properties));
        }

        /**
         * @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));
        }

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

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

        /**
         * @param sku The SKU (pricing tier) of the server.
         * 
         * @return builder
         * 
         */
        public Builder sku(@Nullable Output sku) {
            $.sku = sku;
            return this;
        }

        /**
         * @param sku The SKU (pricing tier) of the server.
         * 
         * @return builder
         * 
         */
        public Builder sku(SkuArgs sku) {
            return sku(Output.of(sku));
        }

        /**
         * @param tags Application-specific metadata in the form of key-value pairs.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Application-specific metadata in the form of key-value pairs.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

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

}