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

com.pulumi.azurenative.containerregistry.inputs.TimerTriggerArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.azurenative.containerregistry.inputs;

import com.pulumi.azurenative.containerregistry.enums.TriggerStatus;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * The properties of a timer trigger.
 * 
 */
public final class TimerTriggerArgs extends com.pulumi.resources.ResourceArgs {

    public static final TimerTriggerArgs Empty = new TimerTriggerArgs();

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

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

    /**
     * The CRON expression for the task schedule
     * 
     */
    @Import(name="schedule", required=true)
    private Output schedule;

    /**
     * @return The CRON expression for the task schedule
     * 
     */
    public Output schedule() {
        return this.schedule;
    }

    /**
     * The current status of trigger.
     * 
     */
    @Import(name="status")
    private @Nullable Output> status;

    /**
     * @return The current status of trigger.
     * 
     */
    public Optional>> status() {
        return Optional.ofNullable(this.status);
    }

    private TimerTriggerArgs() {}

    private TimerTriggerArgs(TimerTriggerArgs $) {
        this.name = $.name;
        this.schedule = $.schedule;
        this.status = $.status;
    }

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

    public static final class Builder {
        private TimerTriggerArgs $;

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

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

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

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

        /**
         * @param schedule The CRON expression for the task schedule
         * 
         * @return builder
         * 
         */
        public Builder schedule(Output schedule) {
            $.schedule = schedule;
            return this;
        }

        /**
         * @param schedule The CRON expression for the task schedule
         * 
         * @return builder
         * 
         */
        public Builder schedule(String schedule) {
            return schedule(Output.of(schedule));
        }

        /**
         * @param status The current status of trigger.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output> status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The current status of trigger.
         * 
         * @return builder
         * 
         */
        public Builder status(Either status) {
            return status(Output.of(status));
        }

        /**
         * @param status The current status of trigger.
         * 
         * @return builder
         * 
         */
        public Builder status(String status) {
            return status(Either.ofLeft(status));
        }

        /**
         * @param status The current status of trigger.
         * 
         * @return builder
         * 
         */
        public Builder status(TriggerStatus status) {
            return status(Either.ofRight(status));
        }

        public TimerTriggerArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("TimerTriggerArgs", "name");
            }
            if ($.schedule == null) {
                throw new MissingRequiredPropertyException("TimerTriggerArgs", "schedule");
            }
            $.status = Codegen.stringProp("status").left(TriggerStatus.class).output().arg($.status).def("Enabled").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy