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

com.pulumi.spotinst.ecs.inputs.OceanLaunchSpecSchedulingTaskArgs Maven / Gradle / Ivy

The 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.spotinst.ecs.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.spotinst.ecs.inputs.OceanLaunchSpecSchedulingTaskTaskHeadroomArgs;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final OceanLaunchSpecSchedulingTaskArgs Empty = new OceanLaunchSpecSchedulingTaskArgs();

    /**
     * A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format.
     * 
     */
    @Import(name="cronExpression", required=true)
    private Output cronExpression;

    /**
     * @return A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format.
     * 
     */
    public Output cronExpression() {
        return this.cronExpression;
    }

    /**
     * Describes whether the task is enabled. When `true`, the task runs. When `false`, it does not run.
     * 
     */
    @Import(name="isEnabled", required=true)
    private Output isEnabled;

    /**
     * @return Describes whether the task is enabled. When `true`, the task runs. When `false`, it does not run.
     * 
     */
    public Output isEnabled() {
        return this.isEnabled;
    }

    /**
     * The config of this scheduled task. Depends on the value of taskType.
     * 
     */
    @Import(name="taskHeadrooms")
    private @Nullable Output> taskHeadrooms;

    /**
     * @return The config of this scheduled task. Depends on the value of taskType.
     * 
     */
    public Optional>> taskHeadrooms() {
        return Optional.ofNullable(this.taskHeadrooms);
    }

    /**
     * The activity that you are scheduling. Valid values: "manualHeadroomUpdate".
     * 
     */
    @Import(name="taskType", required=true)
    private Output taskType;

    /**
     * @return The activity that you are scheduling. Valid values: "manualHeadroomUpdate".
     * 
     */
    public Output taskType() {
        return this.taskType;
    }

    private OceanLaunchSpecSchedulingTaskArgs() {}

    private OceanLaunchSpecSchedulingTaskArgs(OceanLaunchSpecSchedulingTaskArgs $) {
        this.cronExpression = $.cronExpression;
        this.isEnabled = $.isEnabled;
        this.taskHeadrooms = $.taskHeadrooms;
        this.taskType = $.taskType;
    }

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

    public static final class Builder {
        private OceanLaunchSpecSchedulingTaskArgs $;

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

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

        /**
         * @param cronExpression A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format.
         * 
         * @return builder
         * 
         */
        public Builder cronExpression(Output cronExpression) {
            $.cronExpression = cronExpression;
            return this;
        }

        /**
         * @param cronExpression A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format.
         * 
         * @return builder
         * 
         */
        public Builder cronExpression(String cronExpression) {
            return cronExpression(Output.of(cronExpression));
        }

        /**
         * @param isEnabled Describes whether the task is enabled. When `true`, the task runs. When `false`, it does not run.
         * 
         * @return builder
         * 
         */
        public Builder isEnabled(Output isEnabled) {
            $.isEnabled = isEnabled;
            return this;
        }

        /**
         * @param isEnabled Describes whether the task is enabled. When `true`, the task runs. When `false`, it does not run.
         * 
         * @return builder
         * 
         */
        public Builder isEnabled(Boolean isEnabled) {
            return isEnabled(Output.of(isEnabled));
        }

        /**
         * @param taskHeadrooms The config of this scheduled task. Depends on the value of taskType.
         * 
         * @return builder
         * 
         */
        public Builder taskHeadrooms(@Nullable Output> taskHeadrooms) {
            $.taskHeadrooms = taskHeadrooms;
            return this;
        }

        /**
         * @param taskHeadrooms The config of this scheduled task. Depends on the value of taskType.
         * 
         * @return builder
         * 
         */
        public Builder taskHeadrooms(List taskHeadrooms) {
            return taskHeadrooms(Output.of(taskHeadrooms));
        }

        /**
         * @param taskHeadrooms The config of this scheduled task. Depends on the value of taskType.
         * 
         * @return builder
         * 
         */
        public Builder taskHeadrooms(OceanLaunchSpecSchedulingTaskTaskHeadroomArgs... taskHeadrooms) {
            return taskHeadrooms(List.of(taskHeadrooms));
        }

        /**
         * @param taskType The activity that you are scheduling. Valid values: "manualHeadroomUpdate".
         * 
         * @return builder
         * 
         */
        public Builder taskType(Output taskType) {
            $.taskType = taskType;
            return this;
        }

        /**
         * @param taskType The activity that you are scheduling. Valid values: "manualHeadroomUpdate".
         * 
         * @return builder
         * 
         */
        public Builder taskType(String taskType) {
            return taskType(Output.of(taskType));
        }

        public OceanLaunchSpecSchedulingTaskArgs build() {
            if ($.cronExpression == null) {
                throw new MissingRequiredPropertyException("OceanLaunchSpecSchedulingTaskArgs", "cronExpression");
            }
            if ($.isEnabled == null) {
                throw new MissingRequiredPropertyException("OceanLaunchSpecSchedulingTaskArgs", "isEnabled");
            }
            if ($.taskType == null) {
                throw new MissingRequiredPropertyException("OceanLaunchSpecSchedulingTaskArgs", "taskType");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy