// *** 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.azure.lab.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ScheduleRecurrence {
    /**
     * @return When the recurrence will expire in RFC-3339 format.
     * 
     */
    private String expirationDate;
    /**
     * @return The frequency of the recurrence. Possible values are `Daily` and `Weekly`.
     * 
     */
    private String frequency;
    /**
     * @return The interval to invoke the schedule on. Possible values are between `1` and `365`.
     * 
     */
    private @Nullable Integer interval;
    /**
     * @return The interval to invoke the schedule on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`.
     * 
     */
    private @Nullable List<String> weekDays;

    private ScheduleRecurrence() {}
    /**
     * @return When the recurrence will expire in RFC-3339 format.
     * 
     */
    public String expirationDate() {
        return this.expirationDate;
    }
    /**
     * @return The frequency of the recurrence. Possible values are `Daily` and `Weekly`.
     * 
     */
    public String frequency() {
        return this.frequency;
    }
    /**
     * @return The interval to invoke the schedule on. Possible values are between `1` and `365`.
     * 
     */
    public Optional<Integer> interval() {
        return Optional.ofNullable(this.interval);
    }
    /**
     * @return The interval to invoke the schedule on. Possible values are `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` and `Saturday`.
     * 
     */
    public List<String> weekDays() {
        return this.weekDays == null ? List.of() : this.weekDays;
    }

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

    public static Builder builder(ScheduleRecurrence defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String expirationDate;
        private String frequency;
        private @Nullable Integer interval;
        private @Nullable List<String> weekDays;
        public Builder() {}
        public Builder(ScheduleRecurrence defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.expirationDate = defaults.expirationDate;
    	      this.frequency = defaults.frequency;
    	      this.interval = defaults.interval;
    	      this.weekDays = defaults.weekDays;
        }

        @CustomType.Setter
        public Builder expirationDate(String expirationDate) {
            this.expirationDate = Objects.requireNonNull(expirationDate);
            return this;
        }
        @CustomType.Setter
        public Builder frequency(String frequency) {
            this.frequency = Objects.requireNonNull(frequency);
            return this;
        }
        @CustomType.Setter
        public Builder interval(@Nullable Integer interval) {
            this.interval = interval;
            return this;
        }
        @CustomType.Setter
        public Builder weekDays(@Nullable List<String> weekDays) {
            this.weekDays = weekDays;
            return this;
        }
        public Builder weekDays(String... weekDays) {
            return weekDays(List.of(weekDays));
        }
        public ScheduleRecurrence build() {
            final var o = new ScheduleRecurrence();
            o.expirationDate = expirationDate;
            o.frequency = frequency;
            o.interval = interval;
            o.weekDays = weekDays;
            return o;
        }
    }
}
