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

com.ovhcloud.pulumi.ovh.Dedicated.inputs.ServerPlanArgs Maven / Gradle / Ivy

There is a newer version: 1.1.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.ovhcloud.pulumi.ovh.Dedicated.inputs;

import com.ovhcloud.pulumi.ovh.Dedicated.inputs.ServerPlanConfigurationArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ServerPlanArgs Empty = new ServerPlanArgs();

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

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

    /**
     * Duration selected for the purchase of the product
     * 
     */
    @Import(name="duration", required=true)
    private Output duration;

    /**
     * @return Duration selected for the purchase of the product
     * 
     */
    public Output duration() {
        return this.duration;
    }

    /**
     * Cart item to be linked
     * 
     */
    @Import(name="itemId")
    private @Nullable Output itemId;

    /**
     * @return Cart item to be linked
     * 
     */
    public Optional> itemId() {
        return Optional.ofNullable(this.itemId);
    }

    /**
     * Identifier of the option offer
     * 
     */
    @Import(name="planCode", required=true)
    private Output planCode;

    /**
     * @return Identifier of the option offer
     * 
     */
    public Output planCode() {
        return this.planCode;
    }

    /**
     * Pricing mode selected for the purchase of the product
     * 
     */
    @Import(name="pricingMode", required=true)
    private Output pricingMode;

    /**
     * @return Pricing mode selected for the purchase of the product
     * 
     */
    public Output pricingMode() {
        return this.pricingMode;
    }

    /**
     * Quantity of product desired
     * 
     */
    @Import(name="quantity")
    private @Nullable Output quantity;

    /**
     * @return Quantity of product desired
     * 
     */
    public Optional> quantity() {
        return Optional.ofNullable(this.quantity);
    }

    private ServerPlanArgs() {}

    private ServerPlanArgs(ServerPlanArgs $) {
        this.configurations = $.configurations;
        this.duration = $.duration;
        this.itemId = $.itemId;
        this.planCode = $.planCode;
        this.pricingMode = $.pricingMode;
        this.quantity = $.quantity;
    }

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

    public static final class Builder {
        private ServerPlanArgs $;

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

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

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

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

        public Builder configurations(ServerPlanConfigurationArgs... configurations) {
            return configurations(List.of(configurations));
        }

        /**
         * @param duration Duration selected for the purchase of the product
         * 
         * @return builder
         * 
         */
        public Builder duration(Output duration) {
            $.duration = duration;
            return this;
        }

        /**
         * @param duration Duration selected for the purchase of the product
         * 
         * @return builder
         * 
         */
        public Builder duration(String duration) {
            return duration(Output.of(duration));
        }

        /**
         * @param itemId Cart item to be linked
         * 
         * @return builder
         * 
         */
        public Builder itemId(@Nullable Output itemId) {
            $.itemId = itemId;
            return this;
        }

        /**
         * @param itemId Cart item to be linked
         * 
         * @return builder
         * 
         */
        public Builder itemId(Double itemId) {
            return itemId(Output.of(itemId));
        }

        /**
         * @param planCode Identifier of the option offer
         * 
         * @return builder
         * 
         */
        public Builder planCode(Output planCode) {
            $.planCode = planCode;
            return this;
        }

        /**
         * @param planCode Identifier of the option offer
         * 
         * @return builder
         * 
         */
        public Builder planCode(String planCode) {
            return planCode(Output.of(planCode));
        }

        /**
         * @param pricingMode Pricing mode selected for the purchase of the product
         * 
         * @return builder
         * 
         */
        public Builder pricingMode(Output pricingMode) {
            $.pricingMode = pricingMode;
            return this;
        }

        /**
         * @param pricingMode Pricing mode selected for the purchase of the product
         * 
         * @return builder
         * 
         */
        public Builder pricingMode(String pricingMode) {
            return pricingMode(Output.of(pricingMode));
        }

        /**
         * @param quantity Quantity of product desired
         * 
         * @return builder
         * 
         */
        public Builder quantity(@Nullable Output quantity) {
            $.quantity = quantity;
            return this;
        }

        /**
         * @param quantity Quantity of product desired
         * 
         * @return builder
         * 
         */
        public Builder quantity(Double quantity) {
            return quantity(Output.of(quantity));
        }

        public ServerPlanArgs build() {
            if ($.duration == null) {
                throw new MissingRequiredPropertyException("ServerPlanArgs", "duration");
            }
            if ($.planCode == null) {
                throw new MissingRequiredPropertyException("ServerPlanArgs", "planCode");
            }
            if ($.pricingMode == null) {
                throw new MissingRequiredPropertyException("ServerPlanArgs", "pricingMode");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy