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

com.pulumi.mongodbatlas.MaintenanceWindowArgs Maven / Gradle / Ivy

// *** 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.mongodbatlas;

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


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

    public static final MaintenanceWindowArgs Empty = new MaintenanceWindowArgs();

    /**
     * Defer any scheduled maintenance for the given project for one week.
     * 
     */
    @Import(name="autoDefer")
    private @Nullable Output autoDefer;

    /**
     * @return Defer any scheduled maintenance for the given project for one week.
     * 
     */
    public Optional> autoDefer() {
        return Optional.ofNullable(this.autoDefer);
    }

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

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

    /**
     * Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7.
     * 
     */
    @Import(name="dayOfWeek", required=true)
    private Output dayOfWeek;

    /**
     * @return Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7.
     * 
     */
    public Output dayOfWeek() {
        return this.dayOfWeek;
    }

    /**
     * Defer the next scheduled maintenance for the given project for one week.
     * 
     */
    @Import(name="defer")
    private @Nullable Output defer;

    /**
     * @return Defer the next scheduled maintenance for the given project for one week.
     * 
     */
    public Optional> defer() {
        return Optional.ofNullable(this.defer);
    }

    /**
     * Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
     * 
     */
    @Import(name="hourOfDay")
    private @Nullable Output hourOfDay;

    /**
     * @return Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
     * 
     */
    public Optional> hourOfDay() {
        return Optional.ofNullable(this.hourOfDay);
    }

    /**
     * The unique identifier of the project for the Maintenance Window.
     * 
     */
    @Import(name="projectId", required=true)
    private Output projectId;

    /**
     * @return The unique identifier of the project for the Maintenance Window.
     * 
     */
    public Output projectId() {
        return this.projectId;
    }

    /**
     * Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
     * 
     */
    @Import(name="startAsap")
    private @Nullable Output startAsap;

    /**
     * @return Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
     * 
     */
    public Optional> startAsap() {
        return Optional.ofNullable(this.startAsap);
    }

    private MaintenanceWindowArgs() {}

    private MaintenanceWindowArgs(MaintenanceWindowArgs $) {
        this.autoDefer = $.autoDefer;
        this.autoDeferOnceEnabled = $.autoDeferOnceEnabled;
        this.dayOfWeek = $.dayOfWeek;
        this.defer = $.defer;
        this.hourOfDay = $.hourOfDay;
        this.projectId = $.projectId;
        this.startAsap = $.startAsap;
    }

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

    public static final class Builder {
        private MaintenanceWindowArgs $;

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

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

        /**
         * @param autoDefer Defer any scheduled maintenance for the given project for one week.
         * 
         * @return builder
         * 
         */
        public Builder autoDefer(@Nullable Output autoDefer) {
            $.autoDefer = autoDefer;
            return this;
        }

        /**
         * @param autoDefer Defer any scheduled maintenance for the given project for one week.
         * 
         * @return builder
         * 
         */
        public Builder autoDefer(Boolean autoDefer) {
            return autoDefer(Output.of(autoDefer));
        }

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

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

        /**
         * @param dayOfWeek Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7.
         * 
         * @return builder
         * 
         */
        public Builder dayOfWeek(Output dayOfWeek) {
            $.dayOfWeek = dayOfWeek;
            return this;
        }

        /**
         * @param dayOfWeek Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7.
         * 
         * @return builder
         * 
         */
        public Builder dayOfWeek(Integer dayOfWeek) {
            return dayOfWeek(Output.of(dayOfWeek));
        }

        /**
         * @param defer Defer the next scheduled maintenance for the given project for one week.
         * 
         * @return builder
         * 
         */
        public Builder defer(@Nullable Output defer) {
            $.defer = defer;
            return this;
        }

        /**
         * @param defer Defer the next scheduled maintenance for the given project for one week.
         * 
         * @return builder
         * 
         */
        public Builder defer(Boolean defer) {
            return defer(Output.of(defer));
        }

        /**
         * @param hourOfDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
         * 
         * @return builder
         * 
         */
        public Builder hourOfDay(@Nullable Output hourOfDay) {
            $.hourOfDay = hourOfDay;
            return this;
        }

        /**
         * @param hourOfDay Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12 (Time zone is UTC).
         * 
         * @return builder
         * 
         */
        public Builder hourOfDay(Integer hourOfDay) {
            return hourOfDay(Output.of(hourOfDay));
        }

        /**
         * @param projectId The unique identifier of the project for the Maintenance Window.
         * 
         * @return builder
         * 
         */
        public Builder projectId(Output projectId) {
            $.projectId = projectId;
            return this;
        }

        /**
         * @param projectId The unique identifier of the project for the Maintenance Window.
         * 
         * @return builder
         * 
         */
        public Builder projectId(String projectId) {
            return projectId(Output.of(projectId));
        }

        /**
         * @param startAsap Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
         * 
         * @return builder
         * 
         */
        public Builder startAsap(@Nullable Output startAsap) {
            $.startAsap = startAsap;
            return this;
        }

        /**
         * @param startAsap Flag indicating whether project maintenance has been directed to start immediately. If you request that maintenance begin immediately, this field returns true from the time the request was made until the time the maintenance event completes.
         * 
         * @return builder
         * 
         */
        public Builder startAsap(Boolean startAsap) {
            return startAsap(Output.of(startAsap));
        }

        public MaintenanceWindowArgs build() {
            if ($.dayOfWeek == null) {
                throw new MissingRequiredPropertyException("MaintenanceWindowArgs", "dayOfWeek");
            }
            if ($.projectId == null) {
                throw new MissingRequiredPropertyException("MaintenanceWindowArgs", "projectId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy