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

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

    public static final VolumeSnapshotArgs Empty = new VolumeSnapshotArgs();

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

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

    /**
     * A list of the tags to be applied to this volume snapshot.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return A list of the tags to be applied to this volume snapshot.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * The ID of the volume from which the volume snapshot originated.
     * 
     */
    @Import(name="volumeId", required=true)
    private Output volumeId;

    /**
     * @return The ID of the volume from which the volume snapshot originated.
     * 
     */
    public Output volumeId() {
        return this.volumeId;
    }

    private VolumeSnapshotArgs() {}

    private VolumeSnapshotArgs(VolumeSnapshotArgs $) {
        this.name = $.name;
        this.tags = $.tags;
        this.volumeId = $.volumeId;
    }

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

    public static final class Builder {
        private VolumeSnapshotArgs $;

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

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

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

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

        /**
         * @param tags A list of the tags to be applied to this volume snapshot.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A list of the tags to be applied to this volume snapshot.
         * 
         * @return builder
         * 
         */
        public Builder tags(List tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tags A list of the tags to be applied to this volume snapshot.
         * 
         * @return builder
         * 
         */
        public Builder tags(String... tags) {
            return tags(List.of(tags));
        }

        /**
         * @param volumeId The ID of the volume from which the volume snapshot originated.
         * 
         * @return builder
         * 
         */
        public Builder volumeId(Output volumeId) {
            $.volumeId = volumeId;
            return this;
        }

        /**
         * @param volumeId The ID of the volume from which the volume snapshot originated.
         * 
         * @return builder
         * 
         */
        public Builder volumeId(String volumeId) {
            return volumeId(Output.of(volumeId));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy