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

package com.azure.resourcemanager.eventgrid.models;

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

/** Information about the retry policy for an event subscription. */
@Fluent
public final class RetryPolicy {
    /*
     * Maximum number of delivery retry attempts for events.
     */
    @JsonProperty(value = "maxDeliveryAttempts")
    private Integer maxDeliveryAttempts;

    /*
     * Time To Live (in minutes) for events.
     */
    @JsonProperty(value = "eventTimeToLiveInMinutes")
    private Integer eventTimeToLiveInMinutes;

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

    /**
     * Get the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.
     *
     * @return the maxDeliveryAttempts value.
     */
    public Integer maxDeliveryAttempts() {
        return this.maxDeliveryAttempts;
    }

    /**
     * Set the maxDeliveryAttempts property: Maximum number of delivery retry attempts for events.
     *
     * @param maxDeliveryAttempts the maxDeliveryAttempts value to set.
     * @return the RetryPolicy object itself.
     */
    public RetryPolicy withMaxDeliveryAttempts(Integer maxDeliveryAttempts) {
        this.maxDeliveryAttempts = maxDeliveryAttempts;
        return this;
    }

    /**
     * Get the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.
     *
     * @return the eventTimeToLiveInMinutes value.
     */
    public Integer eventTimeToLiveInMinutes() {
        return this.eventTimeToLiveInMinutes;
    }

    /**
     * Set the eventTimeToLiveInMinutes property: Time To Live (in minutes) for events.
     *
     * @param eventTimeToLiveInMinutes the eventTimeToLiveInMinutes value to set.
     * @return the RetryPolicy object itself.
     */
    public RetryPolicy withEventTimeToLiveInMinutes(Integer eventTimeToLiveInMinutes) {
        this.eventTimeToLiveInMinutes = eventTimeToLiveInMinutes;
        return this;
    }

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