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

package com.azure.resourcemanager.providerhub.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.Duration;
import java.util.List;

/** The SubscriptionLifecycleNotificationSpecifications model. */
@Fluent
public class SubscriptionLifecycleNotificationSpecifications {
    /*
     * The subscriptionStateOverrideActions property.
     */
    @JsonProperty(value = "subscriptionStateOverrideActions")
    private List<SubscriptionStateOverrideAction> subscriptionStateOverrideActions;

    /*
     * The softDeleteTTL property.
     */
    @JsonProperty(value = "softDeleteTTL")
    private Duration softDeleteTtl;

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

    /**
     * Get the subscriptionStateOverrideActions property: The subscriptionStateOverrideActions property.
     *
     * @return the subscriptionStateOverrideActions value.
     */
    public List<SubscriptionStateOverrideAction> subscriptionStateOverrideActions() {
        return this.subscriptionStateOverrideActions;
    }

    /**
     * Set the subscriptionStateOverrideActions property: The subscriptionStateOverrideActions property.
     *
     * @param subscriptionStateOverrideActions the subscriptionStateOverrideActions value to set.
     * @return the SubscriptionLifecycleNotificationSpecifications object itself.
     */
    public SubscriptionLifecycleNotificationSpecifications withSubscriptionStateOverrideActions(
        List<SubscriptionStateOverrideAction> subscriptionStateOverrideActions) {
        this.subscriptionStateOverrideActions = subscriptionStateOverrideActions;
        return this;
    }

    /**
     * Get the softDeleteTtl property: The softDeleteTTL property.
     *
     * @return the softDeleteTtl value.
     */
    public Duration softDeleteTtl() {
        return this.softDeleteTtl;
    }

    /**
     * Set the softDeleteTtl property: The softDeleteTTL property.
     *
     * @param softDeleteTtl the softDeleteTtl value to set.
     * @return the SubscriptionLifecycleNotificationSpecifications object itself.
     */
    public SubscriptionLifecycleNotificationSpecifications withSoftDeleteTtl(Duration softDeleteTtl) {
        this.softDeleteTtl = softDeleteTtl;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (subscriptionStateOverrideActions() != null) {
            subscriptionStateOverrideActions().forEach(e -> e.validate());
        }
    }
}
