// 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.fasterxml.jackson.annotation.JsonProperty;

/** Tag Contract details. */
@Fluent
public final class TagContractInner extends ProxyResource {
    /*
     * Tag entity contract properties.
     */
    @JsonProperty(value = "properties")
    private TagContractProperties innerProperties;

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

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

    /**
     * Set the displayName property: Tag name.
     *
     * @param displayName the displayName value to set.
     * @return the TagContractInner object itself.
     */
    public TagContractInner withDisplayName(String displayName) {
        if (this.innerProperties() == null) {
            this.innerProperties = new TagContractProperties();
        }
        this.innerProperties().withDisplayName(displayName);
        return this;
    }

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