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

com.pulumi.digitalocean.inputs.AppSpecArgs 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.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.digitalocean.inputs.AppSpecAlertArgs;
import com.pulumi.digitalocean.inputs.AppSpecDatabaseArgs;
import com.pulumi.digitalocean.inputs.AppSpecDomainNameArgs;
import com.pulumi.digitalocean.inputs.AppSpecEgressArgs;
import com.pulumi.digitalocean.inputs.AppSpecEnvArgs;
import com.pulumi.digitalocean.inputs.AppSpecFunctionArgs;
import com.pulumi.digitalocean.inputs.AppSpecIngressArgs;
import com.pulumi.digitalocean.inputs.AppSpecJobArgs;
import com.pulumi.digitalocean.inputs.AppSpecServiceArgs;
import com.pulumi.digitalocean.inputs.AppSpecStaticSiteArgs;
import com.pulumi.digitalocean.inputs.AppSpecWorkerArgs;
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 AppSpecArgs extends com.pulumi.resources.ResourceArgs {

    public static final AppSpecArgs Empty = new AppSpecArgs();

    /**
     * Describes an alert policy for the component.
     * 
     */
    @Import(name="alerts")
    private @Nullable Output> alerts;

    /**
     * @return Describes an alert policy for the component.
     * 
     */
    public Optional>> alerts() {
        return Optional.ofNullable(this.alerts);
    }

    @Import(name="databases")
    private @Nullable Output> databases;

    public Optional>> databases() {
        return Optional.ofNullable(this.databases);
    }

    /**
     * Describes a domain where the application will be made available.
     * 
     */
    @Import(name="domainNames")
    private @Nullable Output> domainNames;

    /**
     * @return Describes a domain where the application will be made available.
     * 
     */
    public Optional>> domainNames() {
        return Optional.ofNullable(this.domainNames);
    }

    /**
     * @deprecated
     * This attribute has been replaced by `domain` which supports additional functionality.
     * 
     */
    @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */
    @Import(name="domains")
    private @Nullable Output> domains;

    /**
     * @deprecated
     * This attribute has been replaced by `domain` which supports additional functionality.
     * 
     */
    @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */
    public Optional>> domains() {
        return Optional.ofNullable(this.domains);
    }

    /**
     * Specification for app egress configurations.
     * 
     */
    @Import(name="egresses")
    private @Nullable Output> egresses;

    /**
     * @return Specification for app egress configurations.
     * 
     */
    public Optional>> egresses() {
        return Optional.ofNullable(this.egresses);
    }

    /**
     * Describes an environment variable made available to an app competent.
     * 
     */
    @Import(name="envs")
    private @Nullable Output> envs;

    /**
     * @return Describes an environment variable made available to an app competent.
     * 
     */
    public Optional>> envs() {
        return Optional.ofNullable(this.envs);
    }

    /**
     * A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/)
     * 
     */
    @Import(name="features")
    private @Nullable Output> features;

    /**
     * @return A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/)
     * 
     */
    public Optional>> features() {
        return Optional.ofNullable(this.features);
    }

    @Import(name="functions")
    private @Nullable Output> functions;

    public Optional>> functions() {
        return Optional.ofNullable(this.functions);
    }

    /**
     * Specification for component routing, rewrites, and redirects.
     * 
     */
    @Import(name="ingress")
    private @Nullable Output ingress;

    /**
     * @return Specification for component routing, rewrites, and redirects.
     * 
     */
    public Optional> ingress() {
        return Optional.ofNullable(this.ingress);
    }

    @Import(name="jobs")
    private @Nullable Output> jobs;

    public Optional>> jobs() {
        return Optional.ofNullable(this.jobs);
    }

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

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

    /**
     * The slug for the DigitalOcean data center region hosting the app.
     * 
     */
    @Import(name="region")
    private @Nullable Output region;

    /**
     * @return The slug for the DigitalOcean data center region hosting the app.
     * 
     */
    public Optional> region() {
        return Optional.ofNullable(this.region);
    }

    @Import(name="services")
    private @Nullable Output> services;

    public Optional>> services() {
        return Optional.ofNullable(this.services);
    }

    @Import(name="staticSites")
    private @Nullable Output> staticSites;

    public Optional>> staticSites() {
        return Optional.ofNullable(this.staticSites);
    }

    @Import(name="workers")
    private @Nullable Output> workers;

    public Optional>> workers() {
        return Optional.ofNullable(this.workers);
    }

    private AppSpecArgs() {}

    private AppSpecArgs(AppSpecArgs $) {
        this.alerts = $.alerts;
        this.databases = $.databases;
        this.domainNames = $.domainNames;
        this.domains = $.domains;
        this.egresses = $.egresses;
        this.envs = $.envs;
        this.features = $.features;
        this.functions = $.functions;
        this.ingress = $.ingress;
        this.jobs = $.jobs;
        this.name = $.name;
        this.region = $.region;
        this.services = $.services;
        this.staticSites = $.staticSites;
        this.workers = $.workers;
    }

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

    public static final class Builder {
        private AppSpecArgs $;

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

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

        /**
         * @param alerts Describes an alert policy for the component.
         * 
         * @return builder
         * 
         */
        public Builder alerts(@Nullable Output> alerts) {
            $.alerts = alerts;
            return this;
        }

        /**
         * @param alerts Describes an alert policy for the component.
         * 
         * @return builder
         * 
         */
        public Builder alerts(List alerts) {
            return alerts(Output.of(alerts));
        }

        /**
         * @param alerts Describes an alert policy for the component.
         * 
         * @return builder
         * 
         */
        public Builder alerts(AppSpecAlertArgs... alerts) {
            return alerts(List.of(alerts));
        }

        public Builder databases(@Nullable Output> databases) {
            $.databases = databases;
            return this;
        }

        public Builder databases(List databases) {
            return databases(Output.of(databases));
        }

        public Builder databases(AppSpecDatabaseArgs... databases) {
            return databases(List.of(databases));
        }

        /**
         * @param domainNames Describes a domain where the application will be made available.
         * 
         * @return builder
         * 
         */
        public Builder domainNames(@Nullable Output> domainNames) {
            $.domainNames = domainNames;
            return this;
        }

        /**
         * @param domainNames Describes a domain where the application will be made available.
         * 
         * @return builder
         * 
         */
        public Builder domainNames(List domainNames) {
            return domainNames(Output.of(domainNames));
        }

        /**
         * @param domainNames Describes a domain where the application will be made available.
         * 
         * @return builder
         * 
         */
        public Builder domainNames(AppSpecDomainNameArgs... domainNames) {
            return domainNames(List.of(domainNames));
        }

        /**
         * @return builder
         * 
         * @deprecated
         * This attribute has been replaced by `domain` which supports additional functionality.
         * 
         */
        @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */
        public Builder domains(@Nullable Output> domains) {
            $.domains = domains;
            return this;
        }

        /**
         * @return builder
         * 
         * @deprecated
         * This attribute has been replaced by `domain` which supports additional functionality.
         * 
         */
        @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */
        public Builder domains(List domains) {
            return domains(Output.of(domains));
        }

        /**
         * @return builder
         * 
         * @deprecated
         * This attribute has been replaced by `domain` which supports additional functionality.
         * 
         */
        @Deprecated /* This attribute has been replaced by `domain` which supports additional functionality. */
        public Builder domains(String... domains) {
            return domains(List.of(domains));
        }

        /**
         * @param egresses Specification for app egress configurations.
         * 
         * @return builder
         * 
         */
        public Builder egresses(@Nullable Output> egresses) {
            $.egresses = egresses;
            return this;
        }

        /**
         * @param egresses Specification for app egress configurations.
         * 
         * @return builder
         * 
         */
        public Builder egresses(List egresses) {
            return egresses(Output.of(egresses));
        }

        /**
         * @param egresses Specification for app egress configurations.
         * 
         * @return builder
         * 
         */
        public Builder egresses(AppSpecEgressArgs... egresses) {
            return egresses(List.of(egresses));
        }

        /**
         * @param envs Describes an environment variable made available to an app competent.
         * 
         * @return builder
         * 
         */
        public Builder envs(@Nullable Output> envs) {
            $.envs = envs;
            return this;
        }

        /**
         * @param envs Describes an environment variable made available to an app competent.
         * 
         * @return builder
         * 
         */
        public Builder envs(List envs) {
            return envs(Output.of(envs));
        }

        /**
         * @param envs Describes an environment variable made available to an app competent.
         * 
         * @return builder
         * 
         */
        public Builder envs(AppSpecEnvArgs... envs) {
            return envs(List.of(envs));
        }

        /**
         * @param features A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/)
         * 
         * @return builder
         * 
         */
        public Builder features(@Nullable Output> features) {
            $.features = features;
            return this;
        }

        /**
         * @param features A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/)
         * 
         * @return builder
         * 
         */
        public Builder features(List features) {
            return features(Output.of(features));
        }

        /**
         * @param features A list of the features applied to the app. The default buildpack can be overridden here. List of available buildpacks can be found using the [doctl CLI](https://docs.digitalocean.com/reference/doctl/reference/apps/list-buildpacks/)
         * 
         * @return builder
         * 
         */
        public Builder features(String... features) {
            return features(List.of(features));
        }

        public Builder functions(@Nullable Output> functions) {
            $.functions = functions;
            return this;
        }

        public Builder functions(List functions) {
            return functions(Output.of(functions));
        }

        public Builder functions(AppSpecFunctionArgs... functions) {
            return functions(List.of(functions));
        }

        /**
         * @param ingress Specification for component routing, rewrites, and redirects.
         * 
         * @return builder
         * 
         */
        public Builder ingress(@Nullable Output ingress) {
            $.ingress = ingress;
            return this;
        }

        /**
         * @param ingress Specification for component routing, rewrites, and redirects.
         * 
         * @return builder
         * 
         */
        public Builder ingress(AppSpecIngressArgs ingress) {
            return ingress(Output.of(ingress));
        }

        public Builder jobs(@Nullable Output> jobs) {
            $.jobs = jobs;
            return this;
        }

        public Builder jobs(List jobs) {
            return jobs(Output.of(jobs));
        }

        public Builder jobs(AppSpecJobArgs... jobs) {
            return jobs(List.of(jobs));
        }

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

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

        /**
         * @param region The slug for the DigitalOcean data center region hosting the app.
         * 
         * @return builder
         * 
         */
        public Builder region(@Nullable Output region) {
            $.region = region;
            return this;
        }

        /**
         * @param region The slug for the DigitalOcean data center region hosting the app.
         * 
         * @return builder
         * 
         */
        public Builder region(String region) {
            return region(Output.of(region));
        }

        public Builder services(@Nullable Output> services) {
            $.services = services;
            return this;
        }

        public Builder services(List services) {
            return services(Output.of(services));
        }

        public Builder services(AppSpecServiceArgs... services) {
            return services(List.of(services));
        }

        public Builder staticSites(@Nullable Output> staticSites) {
            $.staticSites = staticSites;
            return this;
        }

        public Builder staticSites(List staticSites) {
            return staticSites(Output.of(staticSites));
        }

        public Builder staticSites(AppSpecStaticSiteArgs... staticSites) {
            return staticSites(List.of(staticSites));
        }

        public Builder workers(@Nullable Output> workers) {
            $.workers = workers;
            return this;
        }

        public Builder workers(List workers) {
            return workers(Output.of(workers));
        }

        public Builder workers(AppSpecWorkerArgs... workers) {
            return workers(List.of(workers));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy