// 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.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Tag contract Properties. */
@Fluent
public final class TagContractProperties {
    /*
     * Tag name.
     */
    @JsonProperty(value = "displayName", required = true)
    private String displayName;

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

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

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (displayName() == null) {
            throw LOGGER
                .logExceptionAsError(
                    new IllegalArgumentException(
                        "Missing required property displayName in model TagContractProperties"));
        }
    }

    private static final ClientLogger LOGGER = new ClientLogger(TagContractProperties.class);
}
