// *** 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.gcp.redis.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.redis.outputs.InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTime;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class InstanceMaintenancePolicyWeeklyMaintenanceWindow {
    /**
     * @return Required. The day of week that maintenance updates occur.
     * - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
     * - MONDAY: Monday
     * - TUESDAY: Tuesday
     * - WEDNESDAY: Wednesday
     * - THURSDAY: Thursday
     * - FRIDAY: Friday
     * - SATURDAY: Saturday
     * - SUNDAY: Sunday
     *   Possible values are: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     * 
     */
    private String day;
    /**
     * @return (Output)
     * Output only. Duration of the maintenance window.
     * The current window is fixed at 1 hour.
     * A duration in seconds with up to nine fractional digits,
     * terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    private @Nullable String duration;
    /**
     * @return Required. Start time of the window in UTC time.
     * Structure is documented below.
     * 
     */
    private InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTime startTime;

    private InstanceMaintenancePolicyWeeklyMaintenanceWindow() {}
    /**
     * @return Required. The day of week that maintenance updates occur.
     * - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified.
     * - MONDAY: Monday
     * - TUESDAY: Tuesday
     * - WEDNESDAY: Wednesday
     * - THURSDAY: Thursday
     * - FRIDAY: Friday
     * - SATURDAY: Saturday
     * - SUNDAY: Sunday
     *   Possible values are: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     * 
     */
    public String day() {
        return this.day;
    }
    /**
     * @return (Output)
     * Output only. Duration of the maintenance window.
     * The current window is fixed at 1 hour.
     * A duration in seconds with up to nine fractional digits,
     * terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    public Optional<String> duration() {
        return Optional.ofNullable(this.duration);
    }
    /**
     * @return Required. Start time of the window in UTC time.
     * Structure is documented below.
     * 
     */
    public InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTime startTime() {
        return this.startTime;
    }

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

    public static Builder builder(InstanceMaintenancePolicyWeeklyMaintenanceWindow defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String day;
        private @Nullable String duration;
        private InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTime startTime;
        public Builder() {}
        public Builder(InstanceMaintenancePolicyWeeklyMaintenanceWindow defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.day = defaults.day;
    	      this.duration = defaults.duration;
    	      this.startTime = defaults.startTime;
        }

        @CustomType.Setter
        public Builder day(String day) {
            this.day = Objects.requireNonNull(day);
            return this;
        }
        @CustomType.Setter
        public Builder duration(@Nullable String duration) {
            this.duration = duration;
            return this;
        }
        @CustomType.Setter
        public Builder startTime(InstanceMaintenancePolicyWeeklyMaintenanceWindowStartTime startTime) {
            this.startTime = Objects.requireNonNull(startTime);
            return this;
        }
        public InstanceMaintenancePolicyWeeklyMaintenanceWindow build() {
            final var o = new InstanceMaintenancePolicyWeeklyMaintenanceWindow();
            o.day = day;
            o.duration = duration;
            o.startTime = startTime;
            return o;
        }
    }
}
