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

com.pulumi.vsphere.VirtualMachineClassArgs Maven / Gradle / Ivy

There is a newer version: 4.13.0-alpha.1732775311
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.vsphere;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final VirtualMachineClassArgs Empty = new VirtualMachineClassArgs();

    /**
     * The percentage of the available CPU capacity which will be reserved.
     * 
     */
    @Import(name="cpuReservation")
    private @Nullable Output cpuReservation;

    /**
     * @return The percentage of the available CPU capacity which will be reserved.
     * 
     */
    public Optional> cpuReservation() {
        return Optional.ofNullable(this.cpuReservation);
    }

    /**
     * The number of CPUs.
     * 
     */
    @Import(name="cpus", required=true)
    private Output cpus;

    /**
     * @return The number of CPUs.
     * 
     */
    public Output cpus() {
        return this.cpus;
    }

    /**
     * The amount of memory in MB.
     * 
     */
    @Import(name="memory", required=true)
    private Output memory;

    /**
     * @return The amount of memory in MB.
     * 
     */
    public Output memory() {
        return this.memory;
    }

    /**
     * The percentage of memory reservation.
     * 
     */
    @Import(name="memoryReservation")
    private @Nullable Output memoryReservation;

    /**
     * @return The percentage of memory reservation.
     * 
     */
    public Optional> memoryReservation() {
        return Optional.ofNullable(this.memoryReservation);
    }

    /**
     * The name for the class.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name for the class.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
     * 
     */
    @Import(name="vgpuDevices")
    private @Nullable Output> vgpuDevices;

    /**
     * @return The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
     * 
     */
    public Optional>> vgpuDevices() {
        return Optional.ofNullable(this.vgpuDevices);
    }

    private VirtualMachineClassArgs() {}

    private VirtualMachineClassArgs(VirtualMachineClassArgs $) {
        this.cpuReservation = $.cpuReservation;
        this.cpus = $.cpus;
        this.memory = $.memory;
        this.memoryReservation = $.memoryReservation;
        this.name = $.name;
        this.vgpuDevices = $.vgpuDevices;
    }

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

    public static final class Builder {
        private VirtualMachineClassArgs $;

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

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

        /**
         * @param cpuReservation The percentage of the available CPU capacity which will be reserved.
         * 
         * @return builder
         * 
         */
        public Builder cpuReservation(@Nullable Output cpuReservation) {
            $.cpuReservation = cpuReservation;
            return this;
        }

        /**
         * @param cpuReservation The percentage of the available CPU capacity which will be reserved.
         * 
         * @return builder
         * 
         */
        public Builder cpuReservation(Integer cpuReservation) {
            return cpuReservation(Output.of(cpuReservation));
        }

        /**
         * @param cpus The number of CPUs.
         * 
         * @return builder
         * 
         */
        public Builder cpus(Output cpus) {
            $.cpus = cpus;
            return this;
        }

        /**
         * @param cpus The number of CPUs.
         * 
         * @return builder
         * 
         */
        public Builder cpus(Integer cpus) {
            return cpus(Output.of(cpus));
        }

        /**
         * @param memory The amount of memory in MB.
         * 
         * @return builder
         * 
         */
        public Builder memory(Output memory) {
            $.memory = memory;
            return this;
        }

        /**
         * @param memory The amount of memory in MB.
         * 
         * @return builder
         * 
         */
        public Builder memory(Integer memory) {
            return memory(Output.of(memory));
        }

        /**
         * @param memoryReservation The percentage of memory reservation.
         * 
         * @return builder
         * 
         */
        public Builder memoryReservation(@Nullable Output memoryReservation) {
            $.memoryReservation = memoryReservation;
            return this;
        }

        /**
         * @param memoryReservation The percentage of memory reservation.
         * 
         * @return builder
         * 
         */
        public Builder memoryReservation(Integer memoryReservation) {
            return memoryReservation(Output.of(memoryReservation));
        }

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

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

        /**
         * @param vgpuDevices The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
         * 
         * @return builder
         * 
         */
        public Builder vgpuDevices(@Nullable Output> vgpuDevices) {
            $.vgpuDevices = vgpuDevices;
            return this;
        }

        /**
         * @param vgpuDevices The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
         * 
         * @return builder
         * 
         */
        public Builder vgpuDevices(List vgpuDevices) {
            return vgpuDevices(Output.of(vgpuDevices));
        }

        /**
         * @param vgpuDevices The identifiers of the vGPU devices for the class. If this is set memory reservation needs to be 100.
         * 
         * @return builder
         * 
         */
        public Builder vgpuDevices(String... vgpuDevices) {
            return vgpuDevices(List.of(vgpuDevices));
        }

        public VirtualMachineClassArgs build() {
            if ($.cpus == null) {
                throw new MissingRequiredPropertyException("VirtualMachineClassArgs", "cpus");
            }
            if ($.memory == null) {
                throw new MissingRequiredPropertyException("VirtualMachineClassArgs", "memory");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy