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

com.pulumi.linode.inputs.DatabasePostgresqlUpdatesArgs Maven / Gradle / Ivy

There is a newer version: 4.31.0-alpha.1732773076
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.linode.inputs;

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


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

    public static final DatabasePostgresqlUpdatesArgs Empty = new DatabasePostgresqlUpdatesArgs();

    /**
     * The day to perform maintenance.
     * 
     */
    @Import(name="dayOfWeek", required=true)
    private Output dayOfWeek;

    /**
     * @return The day to perform maintenance.
     * 
     */
    public Output dayOfWeek() {
        return this.dayOfWeek;
    }

    /**
     * The maximum maintenance window time in hours.
     * 
     */
    @Import(name="duration", required=true)
    private Output duration;

    /**
     * @return The maximum maintenance window time in hours.
     * 
     */
    public Output duration() {
        return this.duration;
    }

    /**
     * Whether maintenance occurs on a weekly or monthly basis.
     * 
     */
    @Import(name="frequency", required=true)
    private Output frequency;

    /**
     * @return Whether maintenance occurs on a weekly or monthly basis.
     * 
     */
    public Output frequency() {
        return this.frequency;
    }

    /**
     * The hour to begin maintenance based in UTC time.
     * 
     */
    @Import(name="hourOfDay", required=true)
    private Output hourOfDay;

    /**
     * @return The hour to begin maintenance based in UTC time.
     * 
     */
    public Output hourOfDay() {
        return this.hourOfDay;
    }

    /**
     * The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
     * 
     */
    @Import(name="weekOfMonth")
    private @Nullable Output weekOfMonth;

    /**
     * @return The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
     * 
     */
    public Optional> weekOfMonth() {
        return Optional.ofNullable(this.weekOfMonth);
    }

    private DatabasePostgresqlUpdatesArgs() {}

    private DatabasePostgresqlUpdatesArgs(DatabasePostgresqlUpdatesArgs $) {
        this.dayOfWeek = $.dayOfWeek;
        this.duration = $.duration;
        this.frequency = $.frequency;
        this.hourOfDay = $.hourOfDay;
        this.weekOfMonth = $.weekOfMonth;
    }

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

    public static final class Builder {
        private DatabasePostgresqlUpdatesArgs $;

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

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

        /**
         * @param dayOfWeek The day to perform maintenance.
         * 
         * @return builder
         * 
         */
        public Builder dayOfWeek(Output dayOfWeek) {
            $.dayOfWeek = dayOfWeek;
            return this;
        }

        /**
         * @param dayOfWeek The day to perform maintenance.
         * 
         * @return builder
         * 
         */
        public Builder dayOfWeek(String dayOfWeek) {
            return dayOfWeek(Output.of(dayOfWeek));
        }

        /**
         * @param duration The maximum maintenance window time in hours.
         * 
         * @return builder
         * 
         */
        public Builder duration(Output duration) {
            $.duration = duration;
            return this;
        }

        /**
         * @param duration The maximum maintenance window time in hours.
         * 
         * @return builder
         * 
         */
        public Builder duration(Integer duration) {
            return duration(Output.of(duration));
        }

        /**
         * @param frequency Whether maintenance occurs on a weekly or monthly basis.
         * 
         * @return builder
         * 
         */
        public Builder frequency(Output frequency) {
            $.frequency = frequency;
            return this;
        }

        /**
         * @param frequency Whether maintenance occurs on a weekly or monthly basis.
         * 
         * @return builder
         * 
         */
        public Builder frequency(String frequency) {
            return frequency(Output.of(frequency));
        }

        /**
         * @param hourOfDay The hour to begin maintenance based in UTC time.
         * 
         * @return builder
         * 
         */
        public Builder hourOfDay(Output hourOfDay) {
            $.hourOfDay = hourOfDay;
            return this;
        }

        /**
         * @param hourOfDay The hour to begin maintenance based in UTC time.
         * 
         * @return builder
         * 
         */
        public Builder hourOfDay(Integer hourOfDay) {
            return hourOfDay(Output.of(hourOfDay));
        }

        /**
         * @param weekOfMonth The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
         * 
         * @return builder
         * 
         */
        public Builder weekOfMonth(@Nullable Output weekOfMonth) {
            $.weekOfMonth = weekOfMonth;
            return this;
        }

        /**
         * @param weekOfMonth The week of the month to perform monthly frequency updates. Required for monthly frequency updates.
         * 
         * @return builder
         * 
         */
        public Builder weekOfMonth(Integer weekOfMonth) {
            return weekOfMonth(Output.of(weekOfMonth));
        }

        public DatabasePostgresqlUpdatesArgs build() {
            if ($.dayOfWeek == null) {
                throw new MissingRequiredPropertyException("DatabasePostgresqlUpdatesArgs", "dayOfWeek");
            }
            if ($.duration == null) {
                throw new MissingRequiredPropertyException("DatabasePostgresqlUpdatesArgs", "duration");
            }
            if ($.frequency == null) {
                throw new MissingRequiredPropertyException("DatabasePostgresqlUpdatesArgs", "frequency");
            }
            if ($.hourOfDay == null) {
                throw new MissingRequiredPropertyException("DatabasePostgresqlUpdatesArgs", "hourOfDay");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy