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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;

/** The details of the snoozed or dismissed rule; for example, the duration, name, and GUID associated with the rule. */
@Fluent
public final class SuppressionContractInner extends ProxyResource {
    /*
     * The properties of the suppression.
     */
    @JsonProperty(value = "properties")
    private SuppressionProperties innerProperties;

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

    /**
     * Get the innerProperties property: The properties of the suppression.
     *
     * @return the innerProperties value.
     */
    private SuppressionProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the suppressionId property: The GUID of the suppression.
     *
     * @return the suppressionId value.
     */
    public String suppressionId() {
        return this.innerProperties() == null ? null : this.innerProperties().suppressionId();
    }

    /**
     * Set the suppressionId property: The GUID of the suppression.
     *
     * @param suppressionId the suppressionId value to set.
     * @return the SuppressionContractInner object itself.
     */
    public SuppressionContractInner withSuppressionId(String suppressionId) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SuppressionProperties();
        }
        this.innerProperties().withSuppressionId(suppressionId);
        return this;
    }

    /**
     * Get the ttl property: The duration for which the suppression is valid.
     *
     * @return the ttl value.
     */
    public String ttl() {
        return this.innerProperties() == null ? null : this.innerProperties().ttl();
    }

    /**
     * Set the ttl property: The duration for which the suppression is valid.
     *
     * @param ttl the ttl value to set.
     * @return the SuppressionContractInner object itself.
     */
    public SuppressionContractInner withTtl(String ttl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SuppressionProperties();
        }
        this.innerProperties().withTtl(ttl);
        return this;
    }

    /**
     * Get the expirationTimestamp property: Gets or sets the expiration time stamp.
     *
     * @return the expirationTimestamp value.
     */
    public OffsetDateTime expirationTimestamp() {
        return this.innerProperties() == null ? null : this.innerProperties().expirationTimestamp();
    }

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