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

package com.azure.resourcemanager.machinelearningservices.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The liveness probe requirements. */
@Fluent
public class LivenessProbeRequirements {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(LivenessProbeRequirements.class);

    /*
     * The number of failures to allow before returning an unhealthy status.
     */
    @JsonProperty(value = "failureThreshold")
    private Integer failureThreshold;

    /*
     * The number of successful probes before returning a healthy status.
     */
    @JsonProperty(value = "successThreshold")
    private Integer successThreshold;

    /*
     * The probe timeout in seconds.
     */
    @JsonProperty(value = "timeoutSeconds")
    private Integer timeoutSeconds;

    /*
     * The length of time between probes in seconds.
     */
    @JsonProperty(value = "periodSeconds")
    private Integer periodSeconds;

    /*
     * The delay before the first probe in seconds.
     */
    @JsonProperty(value = "initialDelaySeconds")
    private Integer initialDelaySeconds;

    /**
     * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status.
     *
     * @return the failureThreshold value.
     */
    public Integer failureThreshold() {
        return this.failureThreshold;
    }

    /**
     * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status.
     *
     * @param failureThreshold the failureThreshold value to set.
     * @return the LivenessProbeRequirements object itself.
     */
    public LivenessProbeRequirements withFailureThreshold(Integer failureThreshold) {
        this.failureThreshold = failureThreshold;
        return this;
    }

    /**
     * Get the successThreshold property: The number of successful probes before returning a healthy status.
     *
     * @return the successThreshold value.
     */
    public Integer successThreshold() {
        return this.successThreshold;
    }

    /**
     * Set the successThreshold property: The number of successful probes before returning a healthy status.
     *
     * @param successThreshold the successThreshold value to set.
     * @return the LivenessProbeRequirements object itself.
     */
    public LivenessProbeRequirements withSuccessThreshold(Integer successThreshold) {
        this.successThreshold = successThreshold;
        return this;
    }

    /**
     * Get the timeoutSeconds property: The probe timeout in seconds.
     *
     * @return the timeoutSeconds value.
     */
    public Integer timeoutSeconds() {
        return this.timeoutSeconds;
    }

    /**
     * Set the timeoutSeconds property: The probe timeout in seconds.
     *
     * @param timeoutSeconds the timeoutSeconds value to set.
     * @return the LivenessProbeRequirements object itself.
     */
    public LivenessProbeRequirements withTimeoutSeconds(Integer timeoutSeconds) {
        this.timeoutSeconds = timeoutSeconds;
        return this;
    }

    /**
     * Get the periodSeconds property: The length of time between probes in seconds.
     *
     * @return the periodSeconds value.
     */
    public Integer periodSeconds() {
        return this.periodSeconds;
    }

    /**
     * Set the periodSeconds property: The length of time between probes in seconds.
     *
     * @param periodSeconds the periodSeconds value to set.
     * @return the LivenessProbeRequirements object itself.
     */
    public LivenessProbeRequirements withPeriodSeconds(Integer periodSeconds) {
        this.periodSeconds = periodSeconds;
        return this;
    }

    /**
     * Get the initialDelaySeconds property: The delay before the first probe in seconds.
     *
     * @return the initialDelaySeconds value.
     */
    public Integer initialDelaySeconds() {
        return this.initialDelaySeconds;
    }

    /**
     * Set the initialDelaySeconds property: The delay before the first probe in seconds.
     *
     * @param initialDelaySeconds the initialDelaySeconds value to set.
     * @return the LivenessProbeRequirements object itself.
     */
    public LivenessProbeRequirements withInitialDelaySeconds(Integer initialDelaySeconds) {
        this.initialDelaySeconds = initialDelaySeconds;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
