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

package com.azure.resourcemanager.managednetworkfabric.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkInterfacePatchProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The NetworkInterfacePatch resource definition. */
@Fluent
public final class NetworkInterfacePatch {
    /*
     * Network Interface Patch properties.
     */
    @JsonProperty(value = "properties")
    private NetworkInterfacePatchProperties innerProperties;

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

    /**
     * Get the innerProperties property: Network Interface Patch properties.
     *
     * @return the innerProperties value.
     */
    private NetworkInterfacePatchProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the annotation property: Switch configuration description.
     *
     * @return the annotation value.
     */
    public String annotation() {
        return this.innerProperties() == null ? null : this.innerProperties().annotation();
    }

    /**
     * Set the annotation property: Switch configuration description.
     *
     * @param annotation the annotation value to set.
     * @return the NetworkInterfacePatch object itself.
     */
    public NetworkInterfacePatch withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkInterfacePatchProperties();
        }
        this.innerProperties().withAnnotation(annotation);
        return this;
    }

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