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

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

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.apimanagement.models.RecipientsContractProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Notification details. */
@Fluent
public final class NotificationContractInner extends ProxyResource {
    /*
     * Notification entity contract properties.
     */
    @JsonProperty(value = "properties")
    private NotificationContractProperties innerProperties;

    /**
     * Get the innerProperties property: Notification entity contract properties.
     *
     * @return the innerProperties value.
     */
    private NotificationContractProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the title property: Title of the Notification.
     *
     * @return the title value.
     */
    public String title() {
        return this.innerProperties() == null ? null : this.innerProperties().title();
    }

    /**
     * Set the title property: Title of the Notification.
     *
     * @param title the title value to set.
     * @return the NotificationContractInner object itself.
     */
    public NotificationContractInner withTitle(String title) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NotificationContractProperties();
        }
        this.innerProperties().withTitle(title);
        return this;
    }

    /**
     * Get the description property: Description of the Notification.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Set the description property: Description of the Notification.
     *
     * @param description the description value to set.
     * @return the NotificationContractInner object itself.
     */
    public NotificationContractInner withDescription(String description) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NotificationContractProperties();
        }
        this.innerProperties().withDescription(description);
        return this;
    }

    /**
     * Get the recipients property: Recipient Parameter values.
     *
     * @return the recipients value.
     */
    public RecipientsContractProperties recipients() {
        return this.innerProperties() == null ? null : this.innerProperties().recipients();
    }

    /**
     * Set the recipients property: Recipient Parameter values.
     *
     * @param recipients the recipients value to set.
     * @return the NotificationContractInner object itself.
     */
    public NotificationContractInner withRecipients(RecipientsContractProperties recipients) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NotificationContractProperties();
        }
        this.innerProperties().withRecipients(recipients);
        return this;
    }

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