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

com.pulumi.gitlab.PipelineScheduleArgs 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.gitlab;

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


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

    public static final PipelineScheduleArgs Empty = new PipelineScheduleArgs();

    /**
     * The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.
     * 
     */
    @Import(name="active")
    private @Nullable Output active;

    /**
     * @return The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.
     * 
     */
    public Optional> active() {
        return Optional.ofNullable(this.active);
    }

    /**
     * The cron (e.g. `0 1 * * *`).
     * 
     */
    @Import(name="cron", required=true)
    private Output cron;

    /**
     * @return The cron (e.g. `0 1 * * *`).
     * 
     */
    public Output cron() {
        return this.cron;
    }

    /**
     * The timezone.
     * 
     */
    @Import(name="cronTimezone")
    private @Nullable Output cronTimezone;

    /**
     * @return The timezone.
     * 
     */
    public Optional> cronTimezone() {
        return Optional.ofNullable(this.cronTimezone);
    }

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

    /**
     * @return The description of the pipeline schedule.
     * 
     */
    public Output description() {
        return this.description;
    }

    /**
     * The name or id of the project to add the schedule to.
     * 
     */
    @Import(name="project", required=true)
    private Output project;

    /**
     * @return The name or id of the project to add the schedule to.
     * 
     */
    public Output project() {
        return this.project;
    }

    /**
     * The branch/tag name to be triggered. This must be the full branch reference, for example: `refs/heads/main`, not `main`.
     * 
     */
    @Import(name="ref", required=true)
    private Output ref;

    /**
     * @return The branch/tag name to be triggered. This must be the full branch reference, for example: `refs/heads/main`, not `main`.
     * 
     */
    public Output ref() {
        return this.ref;
    }

    @Import(name="takeOwnership")
    private @Nullable Output takeOwnership;

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

    private PipelineScheduleArgs() {}

    private PipelineScheduleArgs(PipelineScheduleArgs $) {
        this.active = $.active;
        this.cron = $.cron;
        this.cronTimezone = $.cronTimezone;
        this.description = $.description;
        this.project = $.project;
        this.ref = $.ref;
        this.takeOwnership = $.takeOwnership;
    }

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

    public static final class Builder {
        private PipelineScheduleArgs $;

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

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

        /**
         * @param active The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.
         * 
         * @return builder
         * 
         */
        public Builder active(@Nullable Output active) {
            $.active = active;
            return this;
        }

        /**
         * @param active The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially.
         * 
         * @return builder
         * 
         */
        public Builder active(Boolean active) {
            return active(Output.of(active));
        }

        /**
         * @param cron The cron (e.g. `0 1 * * *`).
         * 
         * @return builder
         * 
         */
        public Builder cron(Output cron) {
            $.cron = cron;
            return this;
        }

        /**
         * @param cron The cron (e.g. `0 1 * * *`).
         * 
         * @return builder
         * 
         */
        public Builder cron(String cron) {
            return cron(Output.of(cron));
        }

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

        /**
         * @param cronTimezone The timezone.
         * 
         * @return builder
         * 
         */
        public Builder cronTimezone(String cronTimezone) {
            return cronTimezone(Output.of(cronTimezone));
        }

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

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

        /**
         * @param project The name or id of the project to add the schedule to.
         * 
         * @return builder
         * 
         */
        public Builder project(Output project) {
            $.project = project;
            return this;
        }

        /**
         * @param project The name or id of the project to add the schedule to.
         * 
         * @return builder
         * 
         */
        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param ref The branch/tag name to be triggered. This must be the full branch reference, for example: `refs/heads/main`, not `main`.
         * 
         * @return builder
         * 
         */
        public Builder ref(Output ref) {
            $.ref = ref;
            return this;
        }

        /**
         * @param ref The branch/tag name to be triggered. This must be the full branch reference, for example: `refs/heads/main`, not `main`.
         * 
         * @return builder
         * 
         */
        public Builder ref(String ref) {
            return ref(Output.of(ref));
        }

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

        public Builder takeOwnership(Boolean takeOwnership) {
            return takeOwnership(Output.of(takeOwnership));
        }

        public PipelineScheduleArgs build() {
            if ($.cron == null) {
                throw new MissingRequiredPropertyException("PipelineScheduleArgs", "cron");
            }
            if ($.description == null) {
                throw new MissingRequiredPropertyException("PipelineScheduleArgs", "description");
            }
            if ($.project == null) {
                throw new MissingRequiredPropertyException("PipelineScheduleArgs", "project");
            }
            if ($.ref == null) {
                throw new MissingRequiredPropertyException("PipelineScheduleArgs", "ref");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy