// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.desktopvirtualization.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek;
import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm;
import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen;
import com.azure.resourcemanager.desktopvirtualization.models.Time;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Represents a ScalingPlanPooledSchedule definition. */
@Fluent
public final class ScalingPlanPooledScheduleInner extends ProxyResource {
    /*
     * Metadata pertaining to creation and last modification of the resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

    /*
     * Detailed properties for ScalingPlanPooledSchedule
     */
    @JsonProperty(value = "properties", required = true)
    private ScalingPlanPooledScheduleProperties innerProperties = new ScalingPlanPooledScheduleProperties();

    /** Creates an instance of ScalingPlanPooledScheduleInner class. */
    public ScalingPlanPooledScheduleInner() {
    }

    /**
     * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the innerProperties property: Detailed properties for ScalingPlanPooledSchedule.
     *
     * @return the innerProperties value.
     */
    private ScalingPlanPooledScheduleProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the daysOfWeek property: Set of days of the week on which this schedule is active.
     *
     * @return the daysOfWeek value.
     */
    public List<DayOfWeek> daysOfWeek() {
        return this.innerProperties() == null ? null : this.innerProperties().daysOfWeek();
    }

    /**
     * Set the daysOfWeek property: Set of days of the week on which this schedule is active.
     *
     * @param daysOfWeek the daysOfWeek value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withDaysOfWeek(List<DayOfWeek> daysOfWeek) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withDaysOfWeek(daysOfWeek);
        return this;
    }

    /**
     * Get the rampUpStartTime property: Starting time for ramp up period.
     *
     * @return the rampUpStartTime value.
     */
    public Time rampUpStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().rampUpStartTime();
    }

    /**
     * Set the rampUpStartTime property: Starting time for ramp up period.
     *
     * @param rampUpStartTime the rampUpStartTime value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampUpStartTime(Time rampUpStartTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampUpStartTime(rampUpStartTime);
        return this;
    }

    /**
     * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period.
     *
     * @return the rampUpLoadBalancingAlgorithm value.
     */
    public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() {
        return this.innerProperties() == null ? null : this.innerProperties().rampUpLoadBalancingAlgorithm();
    }

    /**
     * Set the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period.
     *
     * @param rampUpLoadBalancingAlgorithm the rampUpLoadBalancingAlgorithm value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampUpLoadBalancingAlgorithm(
        SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm);
        return this;
    }

    /**
     * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period.
     *
     * @return the rampUpMinimumHostsPct value.
     */
    public Integer rampUpMinimumHostsPct() {
        return this.innerProperties() == null ? null : this.innerProperties().rampUpMinimumHostsPct();
    }

    /**
     * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period.
     *
     * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampUpMinimumHostsPct(rampUpMinimumHostsPct);
        return this;
    }

    /**
     * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period.
     *
     * @return the rampUpCapacityThresholdPct value.
     */
    public Integer rampUpCapacityThresholdPct() {
        return this.innerProperties() == null ? null : this.innerProperties().rampUpCapacityThresholdPct();
    }

    /**
     * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period.
     *
     * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampUpCapacityThresholdPct(Integer rampUpCapacityThresholdPct) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampUpCapacityThresholdPct(rampUpCapacityThresholdPct);
        return this;
    }

    /**
     * Get the peakStartTime property: Starting time for peak period.
     *
     * @return the peakStartTime value.
     */
    public Time peakStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().peakStartTime();
    }

    /**
     * Set the peakStartTime property: Starting time for peak period.
     *
     * @param peakStartTime the peakStartTime value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withPeakStartTime(Time peakStartTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withPeakStartTime(peakStartTime);
        return this;
    }

    /**
     * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period.
     *
     * @return the peakLoadBalancingAlgorithm value.
     */
    public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() {
        return this.innerProperties() == null ? null : this.innerProperties().peakLoadBalancingAlgorithm();
    }

    /**
     * Set the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period.
     *
     * @param peakLoadBalancingAlgorithm the peakLoadBalancingAlgorithm value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withPeakLoadBalancingAlgorithm(
        SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm);
        return this;
    }

    /**
     * Get the rampDownStartTime property: Starting time for ramp down period.
     *
     * @return the rampDownStartTime value.
     */
    public Time rampDownStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownStartTime();
    }

    /**
     * Set the rampDownStartTime property: Starting time for ramp down period.
     *
     * @param rampDownStartTime the rampDownStartTime value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownStartTime(Time rampDownStartTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownStartTime(rampDownStartTime);
        return this;
    }

    /**
     * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period.
     *
     * @return the rampDownLoadBalancingAlgorithm value.
     */
    public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownLoadBalancingAlgorithm();
    }

    /**
     * Set the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period.
     *
     * @param rampDownLoadBalancingAlgorithm the rampDownLoadBalancingAlgorithm value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownLoadBalancingAlgorithm(
        SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm);
        return this;
    }

    /**
     * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period.
     *
     * @return the rampDownMinimumHostsPct value.
     */
    public Integer rampDownMinimumHostsPct() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownMinimumHostsPct();
    }

    /**
     * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period.
     *
     * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownMinimumHostsPct(Integer rampDownMinimumHostsPct) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownMinimumHostsPct(rampDownMinimumHostsPct);
        return this;
    }

    /**
     * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period.
     *
     * @return the rampDownCapacityThresholdPct value.
     */
    public Integer rampDownCapacityThresholdPct() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownCapacityThresholdPct();
    }

    /**
     * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period.
     *
     * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownCapacityThresholdPct(Integer rampDownCapacityThresholdPct) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownCapacityThresholdPct(rampDownCapacityThresholdPct);
        return this;
    }

    /**
     * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts.
     *
     * @return the rampDownForceLogoffUsers value.
     */
    public Boolean rampDownForceLogoffUsers() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownForceLogoffUsers();
    }

    /**
     * Set the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts.
     *
     * @param rampDownForceLogoffUsers the rampDownForceLogoffUsers value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownForceLogoffUsers(Boolean rampDownForceLogoffUsers) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownForceLogoffUsers(rampDownForceLogoffUsers);
        return this;
    }

    /**
     * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period.
     *
     * @return the rampDownStopHostsWhen value.
     */
    public StopHostsWhen rampDownStopHostsWhen() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownStopHostsWhen();
    }

    /**
     * Set the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period.
     *
     * @param rampDownStopHostsWhen the rampDownStopHostsWhen value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownStopHostsWhen(StopHostsWhen rampDownStopHostsWhen) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownStopHostsWhen(rampDownStopHostsWhen);
        return this;
    }

    /**
     * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period.
     *
     * @return the rampDownWaitTimeMinutes value.
     */
    public Integer rampDownWaitTimeMinutes() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownWaitTimeMinutes();
    }

    /**
     * Set the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period.
     *
     * @param rampDownWaitTimeMinutes the rampDownWaitTimeMinutes value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinutes) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownWaitTimeMinutes(rampDownWaitTimeMinutes);
        return this;
    }

    /**
     * Get the rampDownNotificationMessage property: Notification message for users during ramp down period.
     *
     * @return the rampDownNotificationMessage value.
     */
    public String rampDownNotificationMessage() {
        return this.innerProperties() == null ? null : this.innerProperties().rampDownNotificationMessage();
    }

    /**
     * Set the rampDownNotificationMessage property: Notification message for users during ramp down period.
     *
     * @param rampDownNotificationMessage the rampDownNotificationMessage value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withRampDownNotificationMessage(String rampDownNotificationMessage) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withRampDownNotificationMessage(rampDownNotificationMessage);
        return this;
    }

    /**
     * Get the offPeakStartTime property: Starting time for off-peak period.
     *
     * @return the offPeakStartTime value.
     */
    public Time offPeakStartTime() {
        return this.innerProperties() == null ? null : this.innerProperties().offPeakStartTime();
    }

    /**
     * Set the offPeakStartTime property: Starting time for off-peak period.
     *
     * @param offPeakStartTime the offPeakStartTime value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withOffPeakStartTime(Time offPeakStartTime) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withOffPeakStartTime(offPeakStartTime);
        return this;
    }

    /**
     * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period.
     *
     * @return the offPeakLoadBalancingAlgorithm value.
     */
    public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() {
        return this.innerProperties() == null ? null : this.innerProperties().offPeakLoadBalancingAlgorithm();
    }

    /**
     * Set the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period.
     *
     * @param offPeakLoadBalancingAlgorithm the offPeakLoadBalancingAlgorithm value to set.
     * @return the ScalingPlanPooledScheduleInner object itself.
     */
    public ScalingPlanPooledScheduleInner withOffPeakLoadBalancingAlgorithm(
        SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) {
        if (this.innerProperties() == null) {
            this.innerProperties = new ScalingPlanPooledScheduleProperties();
        }
        this.innerProperties().withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property innerProperties in model ScalingPlanPooledScheduleInner"));
        } else {
            innerProperties().validate();
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(ScalingPlanPooledScheduleInner.class);
}
