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

com.pulumi.azurenative.automation.ScheduleArgs 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.azurenative.automation;

import com.pulumi.azurenative.automation.enums.ScheduleFrequency;
import com.pulumi.azurenative.automation.inputs.AdvancedScheduleArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Object;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final ScheduleArgs Empty = new ScheduleArgs();

    /**
     * Gets or sets the AdvancedSchedule.
     * 
     */
    @Import(name="advancedSchedule")
    private @Nullable Output advancedSchedule;

    /**
     * @return Gets or sets the AdvancedSchedule.
     * 
     */
    public Optional> advancedSchedule() {
        return Optional.ofNullable(this.advancedSchedule);
    }

    /**
     * The name of the automation account.
     * 
     */
    @Import(name="automationAccountName", required=true)
    private Output automationAccountName;

    /**
     * @return The name of the automation account.
     * 
     */
    public Output automationAccountName() {
        return this.automationAccountName;
    }

    /**
     * Gets or sets the description of the schedule.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Gets or sets the description of the schedule.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Gets or sets the end time of the schedule.
     * 
     */
    @Import(name="expiryTime")
    private @Nullable Output expiryTime;

    /**
     * @return Gets or sets the end time of the schedule.
     * 
     */
    public Optional> expiryTime() {
        return Optional.ofNullable(this.expiryTime);
    }

    /**
     * Gets or sets the frequency of the schedule.
     * 
     */
    @Import(name="frequency", required=true)
    private Output> frequency;

    /**
     * @return Gets or sets the frequency of the schedule.
     * 
     */
    public Output> frequency() {
        return this.frequency;
    }

    /**
     * Gets or sets the interval of the schedule.
     * 
     */
    @Import(name="interval")
    private @Nullable Output interval;

    /**
     * @return Gets or sets the interval of the schedule.
     * 
     */
    public Optional> interval() {
        return Optional.ofNullable(this.interval);
    }

    /**
     * Gets or sets the name of the Schedule.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Gets or sets the name of the Schedule.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Name of an Azure Resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return Name of an Azure Resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * The schedule name.
     * 
     */
    @Import(name="scheduleName")
    private @Nullable Output scheduleName;

    /**
     * @return The schedule name.
     * 
     */
    public Optional> scheduleName() {
        return Optional.ofNullable(this.scheduleName);
    }

    /**
     * Gets or sets the start time of the schedule.
     * 
     */
    @Import(name="startTime", required=true)
    private Output startTime;

    /**
     * @return Gets or sets the start time of the schedule.
     * 
     */
    public Output startTime() {
        return this.startTime;
    }

    /**
     * Gets or sets the time zone of the schedule.
     * 
     */
    @Import(name="timeZone")
    private @Nullable Output timeZone;

    /**
     * @return Gets or sets the time zone of the schedule.
     * 
     */
    public Optional> timeZone() {
        return Optional.ofNullable(this.timeZone);
    }

    private ScheduleArgs() {}

    private ScheduleArgs(ScheduleArgs $) {
        this.advancedSchedule = $.advancedSchedule;
        this.automationAccountName = $.automationAccountName;
        this.description = $.description;
        this.expiryTime = $.expiryTime;
        this.frequency = $.frequency;
        this.interval = $.interval;
        this.name = $.name;
        this.resourceGroupName = $.resourceGroupName;
        this.scheduleName = $.scheduleName;
        this.startTime = $.startTime;
        this.timeZone = $.timeZone;
    }

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

    public static final class Builder {
        private ScheduleArgs $;

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

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

        /**
         * @param advancedSchedule Gets or sets the AdvancedSchedule.
         * 
         * @return builder
         * 
         */
        public Builder advancedSchedule(@Nullable Output advancedSchedule) {
            $.advancedSchedule = advancedSchedule;
            return this;
        }

        /**
         * @param advancedSchedule Gets or sets the AdvancedSchedule.
         * 
         * @return builder
         * 
         */
        public Builder advancedSchedule(AdvancedScheduleArgs advancedSchedule) {
            return advancedSchedule(Output.of(advancedSchedule));
        }

        /**
         * @param automationAccountName The name of the automation account.
         * 
         * @return builder
         * 
         */
        public Builder automationAccountName(Output automationAccountName) {
            $.automationAccountName = automationAccountName;
            return this;
        }

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

        /**
         * @param description Gets or sets the description of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Gets or sets the description of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param expiryTime Gets or sets the end time of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder expiryTime(@Nullable Output expiryTime) {
            $.expiryTime = expiryTime;
            return this;
        }

        /**
         * @param expiryTime Gets or sets the end time of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder expiryTime(String expiryTime) {
            return expiryTime(Output.of(expiryTime));
        }

        /**
         * @param frequency Gets or sets the frequency of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder frequency(Output> frequency) {
            $.frequency = frequency;
            return this;
        }

        /**
         * @param frequency Gets or sets the frequency of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder frequency(Either frequency) {
            return frequency(Output.of(frequency));
        }

        /**
         * @param frequency Gets or sets the frequency of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder frequency(String frequency) {
            return frequency(Either.ofLeft(frequency));
        }

        /**
         * @param frequency Gets or sets the frequency of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder frequency(ScheduleFrequency frequency) {
            return frequency(Either.ofRight(frequency));
        }

        /**
         * @param interval Gets or sets the interval of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder interval(@Nullable Output interval) {
            $.interval = interval;
            return this;
        }

        /**
         * @param interval Gets or sets the interval of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder interval(Object interval) {
            return interval(Output.of(interval));
        }

        /**
         * @param name Gets or sets the name of the Schedule.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Gets or sets the name of the Schedule.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param resourceGroupName Name of an Azure Resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName Name of an Azure Resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

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

        /**
         * @param scheduleName The schedule name.
         * 
         * @return builder
         * 
         */
        public Builder scheduleName(String scheduleName) {
            return scheduleName(Output.of(scheduleName));
        }

        /**
         * @param startTime Gets or sets the start time of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder startTime(Output startTime) {
            $.startTime = startTime;
            return this;
        }

        /**
         * @param startTime Gets or sets the start time of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder startTime(String startTime) {
            return startTime(Output.of(startTime));
        }

        /**
         * @param timeZone Gets or sets the time zone of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder timeZone(@Nullable Output timeZone) {
            $.timeZone = timeZone;
            return this;
        }

        /**
         * @param timeZone Gets or sets the time zone of the schedule.
         * 
         * @return builder
         * 
         */
        public Builder timeZone(String timeZone) {
            return timeZone(Output.of(timeZone));
        }

        public ScheduleArgs build() {
            if ($.automationAccountName == null) {
                throw new MissingRequiredPropertyException("ScheduleArgs", "automationAccountName");
            }
            if ($.frequency == null) {
                throw new MissingRequiredPropertyException("ScheduleArgs", "frequency");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("ScheduleArgs", "name");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("ScheduleArgs", "resourceGroupName");
            }
            if ($.startTime == null) {
                throw new MissingRequiredPropertyException("ScheduleArgs", "startTime");
            }
            return $;
        }
    }

}