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

com.pulumi.digitalocean.CustomImageArgs 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.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 CustomImageArgs extends com.pulumi.resources.ResourceArgs {

    public static final CustomImageArgs Empty = new CustomImageArgs();

    /**
     * An optional description for the image.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return An optional description for the image.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/api-reference/#operation/create_custom_image)
     * 
     */
    @Import(name="distribution")
    private @Nullable Output distribution;

    /**
     * @return An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/api-reference/#operation/create_custom_image)
     * 
     */
    public Optional> distribution() {
        return Optional.ofNullable(this.distribution);
    }

    /**
     * A name for the Custom Image.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return A name for the Custom Image.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A list of regions. (Currently only one is supported).
     * 
     */
    @Import(name="regions", required=true)
    private Output> regions;

    /**
     * @return A list of regions. (Currently only one is supported).
     * 
     */
    public Output> regions() {
        return this.regions;
    }

    /**
     * A list of optional tags for the image.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A list of optional tags for the image.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * A URL from which the custom Linux virtual machine image may be retrieved.
     * 
     */
    @Import(name="url", required=true)
    private Output url;

    /**
     * @return A URL from which the custom Linux virtual machine image may be retrieved.
     * 
     */
    public Output url() {
        return this.url;
    }

    private CustomImageArgs() {}

    private CustomImageArgs(CustomImageArgs $) {
        this.description = $.description;
        this.distribution = $.distribution;
        this.name = $.name;
        this.regions = $.regions;
        this.tags = $.tags;
        this.url = $.url;
    }

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

    public static final class Builder {
        private CustomImageArgs $;

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

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

        /**
         * @param description An optional description for the image.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description An optional description for the image.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param distribution An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/api-reference/#operation/create_custom_image)
         * 
         * @return builder
         * 
         */
        public Builder distribution(@Nullable Output distribution) {
            $.distribution = distribution;
            return this;
        }

        /**
         * @param distribution An optional distribution name for the image. Valid values are documented [here](https://docs.digitalocean.com/reference/api/api-reference/#operation/create_custom_image)
         * 
         * @return builder
         * 
         */
        public Builder distribution(String distribution) {
            return distribution(Output.of(distribution));
        }

        /**
         * @param name A name for the Custom Image.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A name for the Custom Image.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param regions A list of regions. (Currently only one is supported).
         * 
         * @return builder
         * 
         */
        public Builder regions(Output> regions) {
            $.regions = regions;
            return this;
        }

        /**
         * @param regions A list of regions. (Currently only one is supported).
         * 
         * @return builder
         * 
         */
        public Builder regions(List regions) {
            return regions(Output.of(regions));
        }

        /**
         * @param regions A list of regions. (Currently only one is supported).
         * 
         * @return builder
         * 
         */
        public Builder regions(String... regions) {
            return regions(List.of(regions));
        }

        /**
         * @param tags A list of optional tags for the image.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A list of optional tags for the image.
         * 
         * @return builder
         * 
         */
        public Builder tags(List tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tags A list of optional tags for the image.
         * 
         * @return builder
         * 
         */
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }

        /**
         * @param url A URL from which the custom Linux virtual machine image may be retrieved.
         * 
         * @return builder
         * 
         */
        public Builder url(Output url) {
            $.url = url;
            return this;
        }

        /**
         * @param url A URL from which the custom Linux virtual machine image may be retrieved.
         * 
         * @return builder
         * 
         */
        public Builder url(String url) {
            return url(Output.of(url));
        }

        public CustomImageArgs build() {
            if ($.regions == null) {
                throw new MissingRequiredPropertyException("CustomImageArgs", "regions");
            }
            if ($.url == null) {
                throw new MissingRequiredPropertyException("CustomImageArgs", "url");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy