// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.eventgrid.models.EventInputSchema;
import com.azure.resourcemanager.eventgrid.models.NamespaceTopicProvisioningState;
import com.azure.resourcemanager.eventgrid.models.PublisherType;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Properties of the namespace topic. */
@Fluent
public final class NamespaceTopicProperties {
    /*
     * Provisioning state of the namespace topic.
     */
    @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
    private NamespaceTopicProvisioningState provisioningState;

    /*
     * Publisher type of the namespace topic.
     */
    @JsonProperty(value = "publisherType")
    private PublisherType publisherType;

    /*
     * This determines the format that is expected for incoming events published to the topic.
     */
    @JsonProperty(value = "inputSchema")
    private EventInputSchema inputSchema;

    /*
     * Event retention for the namespace topic expressed in days. The property default value is 1 day.
     * Min event retention duration value is 1 day and max event retention duration value is 1 day.
     */
    @JsonProperty(value = "eventRetentionInDays")
    private Integer eventRetentionInDays;

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

    /**
     * Get the provisioningState property: Provisioning state of the namespace topic.
     *
     * @return the provisioningState value.
     */
    public NamespaceTopicProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the publisherType property: Publisher type of the namespace topic.
     *
     * @return the publisherType value.
     */
    public PublisherType publisherType() {
        return this.publisherType;
    }

    /**
     * Set the publisherType property: Publisher type of the namespace topic.
     *
     * @param publisherType the publisherType value to set.
     * @return the NamespaceTopicProperties object itself.
     */
    public NamespaceTopicProperties withPublisherType(PublisherType publisherType) {
        this.publisherType = publisherType;
        return this;
    }

    /**
     * Get the inputSchema property: This determines the format that is expected for incoming events published to the
     * topic.
     *
     * @return the inputSchema value.
     */
    public EventInputSchema inputSchema() {
        return this.inputSchema;
    }

    /**
     * Set the inputSchema property: This determines the format that is expected for incoming events published to the
     * topic.
     *
     * @param inputSchema the inputSchema value to set.
     * @return the NamespaceTopicProperties object itself.
     */
    public NamespaceTopicProperties withInputSchema(EventInputSchema inputSchema) {
        this.inputSchema = inputSchema;
        return this;
    }

    /**
     * Get the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property
     * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1
     * day.
     *
     * @return the eventRetentionInDays value.
     */
    public Integer eventRetentionInDays() {
        return this.eventRetentionInDays;
    }

    /**
     * Set the eventRetentionInDays property: Event retention for the namespace topic expressed in days. The property
     * default value is 1 day. Min event retention duration value is 1 day and max event retention duration value is 1
     * day.
     *
     * @param eventRetentionInDays the eventRetentionInDays value to set.
     * @return the NamespaceTopicProperties object itself.
     */
    public NamespaceTopicProperties withEventRetentionInDays(Integer eventRetentionInDays) {
        this.eventRetentionInDays = eventRetentionInDays;
        return this;
    }

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