// 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;
import java.time.Duration;

/** Retry settings for a batch inference operation. */
@Fluent
public final class BatchRetrySettings {
    /*
     * Maximum retry count for a mini-batch
     */
    @JsonProperty(value = "maxRetries")
    private Integer maxRetries;

    /*
     * Invocation timeout for a mini-batch, in ISO 8601 format.
     */
    @JsonProperty(value = "timeout")
    private Duration timeout;

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

    /**
     * Get the maxRetries property: Maximum retry count for a mini-batch.
     *
     * @return the maxRetries value.
     */
    public Integer maxRetries() {
        return this.maxRetries;
    }

    /**
     * Set the maxRetries property: Maximum retry count for a mini-batch.
     *
     * @param maxRetries the maxRetries value to set.
     * @return the BatchRetrySettings object itself.
     */
    public BatchRetrySettings withMaxRetries(Integer maxRetries) {
        this.maxRetries = maxRetries;
        return this;
    }

    /**
     * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format.
     *
     * @return the timeout value.
     */
    public Duration timeout() {
        return this.timeout;
    }

    /**
     * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format.
     *
     * @param timeout the timeout value to set.
     * @return the BatchRetrySettings object itself.
     */
    public BatchRetrySettings withTimeout(Duration timeout) {
        this.timeout = timeout;
        return this;
    }

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