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

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

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.timeseriesinsights.models.StorageLimitExceededBehavior;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;

/** An object that represents a set of mutable Gen1 environment resource properties. */
@Fluent
public final class Gen1EnvironmentMutableProperties {
    /*
     * ISO8601 timespan specifying the minimum number of days the environment's events will be available for query.
     */
    @JsonProperty(value = "dataRetentionTime")
    private Duration dataRetentionTime;

    /*
     * The behavior the Time Series Insights service should take when the environment's capacity has been exceeded. If
     * "PauseIngress" is specified, new events will not be read from the event source. If "PurgeOldData" is specified,
     * new events will continue to be read and old events will be deleted from the environment. The default behavior is
     * PurgeOldData.
     */
    @JsonProperty(value = "storageLimitExceededBehavior")
    private StorageLimitExceededBehavior storageLimitExceededBehavior;

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

    /**
     * Get the dataRetentionTime property: ISO8601 timespan specifying the minimum number of days the environment's
     * events will be available for query.
     *
     * @return the dataRetentionTime value.
     */
    public Duration dataRetentionTime() {
        return this.dataRetentionTime;
    }

    /**
     * Set the dataRetentionTime property: ISO8601 timespan specifying the minimum number of days the environment's
     * events will be available for query.
     *
     * @param dataRetentionTime the dataRetentionTime value to set.
     * @return the Gen1EnvironmentMutableProperties object itself.
     */
    public Gen1EnvironmentMutableProperties withDataRetentionTime(Duration dataRetentionTime) {
        this.dataRetentionTime = dataRetentionTime;
        return this;
    }

    /**
     * Get the storageLimitExceededBehavior property: The behavior the Time Series Insights service should take when the
     * environment's capacity has been exceeded. If "PauseIngress" is specified, new events will not be read from the
     * event source. If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted
     * from the environment. The default behavior is PurgeOldData.
     *
     * @return the storageLimitExceededBehavior value.
     */
    public StorageLimitExceededBehavior storageLimitExceededBehavior() {
        return this.storageLimitExceededBehavior;
    }

    /**
     * Set the storageLimitExceededBehavior property: The behavior the Time Series Insights service should take when the
     * environment's capacity has been exceeded. If "PauseIngress" is specified, new events will not be read from the
     * event source. If "PurgeOldData" is specified, new events will continue to be read and old events will be deleted
     * from the environment. The default behavior is PurgeOldData.
     *
     * @param storageLimitExceededBehavior the storageLimitExceededBehavior value to set.
     * @return the Gen1EnvironmentMutableProperties object itself.
     */
    public Gen1EnvironmentMutableProperties withStorageLimitExceededBehavior(
        StorageLimitExceededBehavior storageLimitExceededBehavior) {
        this.storageLimitExceededBehavior = storageLimitExceededBehavior;
        return this;
    }

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