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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The InferenceContainerProperties model. */
@Fluent
public final class InferenceContainerProperties {
    /*
     * The route to check the liveness of the inference server container.
     */
    @JsonProperty(value = "livenessRoute")
    private Route livenessRoute;

    /*
     * The route to check the readiness of the inference server container.
     */
    @JsonProperty(value = "readinessRoute")
    private Route readinessRoute;

    /*
     * The port to send the scoring requests to, within the inference server container.
     */
    @JsonProperty(value = "scoringRoute")
    private Route scoringRoute;

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

    /**
     * Get the livenessRoute property: The route to check the liveness of the inference server container.
     *
     * @return the livenessRoute value.
     */
    public Route livenessRoute() {
        return this.livenessRoute;
    }

    /**
     * Set the livenessRoute property: The route to check the liveness of the inference server container.
     *
     * @param livenessRoute the livenessRoute value to set.
     * @return the InferenceContainerProperties object itself.
     */
    public InferenceContainerProperties withLivenessRoute(Route livenessRoute) {
        this.livenessRoute = livenessRoute;
        return this;
    }

    /**
     * Get the readinessRoute property: The route to check the readiness of the inference server container.
     *
     * @return the readinessRoute value.
     */
    public Route readinessRoute() {
        return this.readinessRoute;
    }

    /**
     * Set the readinessRoute property: The route to check the readiness of the inference server container.
     *
     * @param readinessRoute the readinessRoute value to set.
     * @return the InferenceContainerProperties object itself.
     */
    public InferenceContainerProperties withReadinessRoute(Route readinessRoute) {
        this.readinessRoute = readinessRoute;
        return this;
    }

    /**
     * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container.
     *
     * @return the scoringRoute value.
     */
    public Route scoringRoute() {
        return this.scoringRoute;
    }

    /**
     * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container.
     *
     * @param scoringRoute the scoringRoute value to set.
     * @return the InferenceContainerProperties object itself.
     */
    public InferenceContainerProperties withScoringRoute(Route scoringRoute) {
        this.scoringRoute = scoringRoute;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (livenessRoute() != null) {
            livenessRoute().validate();
        }
        if (readinessRoute() != null) {
            readinessRoute().validate();
        }
        if (scoringRoute() != null) {
            scoringRoute().validate();
        }
    }
}
