// 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.core.management.ProxyResource;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Event Type for a subject under a topic. */
@Fluent
public final class EventTypeInner extends ProxyResource {
    /*
     * Properties of the event type.
     */
    @JsonProperty(value = "properties")
    private EventTypeProperties innerProperties;

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

    /**
     * Get the innerProperties property: Properties of the event type.
     *
     * @return the innerProperties value.
     */
    private EventTypeProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the displayName property: Display name of the event type.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerProperties() == null ? null : this.innerProperties().displayName();
    }

    /**
     * Set the displayName property: Display name of the event type.
     *
     * @param displayName the displayName value to set.
     * @return the EventTypeInner object itself.
     */
    public EventTypeInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new EventTypeProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

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

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

    /**
     * Get the schemaUrl property: Url of the schema for this event type.
     *
     * @return the schemaUrl value.
     */
    public String schemaUrl() {
        return this.innerProperties() == null ? null : this.innerProperties().schemaUrl();
    }

    /**
     * Set the schemaUrl property: Url of the schema for this event type.
     *
     * @param schemaUrl the schemaUrl value to set.
     * @return the EventTypeInner object itself.
     */
    public EventTypeInner withSchemaUrl(String schemaUrl) {
        if (this.innerProperties() == null) {
            this.innerProperties = new EventTypeProperties();
        }
        this.innerProperties().withSchemaUrl(schemaUrl);
        return this;
    }

    /**
     * Get the isInDefaultSet property: IsInDefaultSet flag of the event type.
     *
     * @return the isInDefaultSet value.
     */
    public Boolean isInDefaultSet() {
        return this.innerProperties() == null ? null : this.innerProperties().isInDefaultSet();
    }

    /**
     * Set the isInDefaultSet property: IsInDefaultSet flag of the event type.
     *
     * @param isInDefaultSet the isInDefaultSet value to set.
     * @return the EventTypeInner object itself.
     */
    public EventTypeInner withIsInDefaultSet(Boolean isInDefaultSet) {
        if (this.innerProperties() == null) {
            this.innerProperties = new EventTypeProperties();
        }
        this.innerProperties().withIsInDefaultSet(isInDefaultSet);
        return this;
    }

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