// 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.NetworkFabricPatchParametersProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;

/** The NetworkFabric resource definition. */
@Fluent
public final class NetworkFabricPatchParameters {
    /*
     * Network Fabric Patch properties.
     */
    @JsonProperty(value = "properties")
    private NetworkFabricPatchParametersProperties innerProperties;

    /*
     * Azure resource tags that will replace the existing ones.
     */
    @JsonProperty(value = "tags")
    @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
    private Map<String, String> tags;

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

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

    /**
     * Get the tags property: Azure resource tags that will replace the existing ones.
     *
     * @return the tags value.
     */
    public Map<String, String> tags() {
        return this.tags;
    }

    /**
     * Set the tags property: Azure resource tags that will replace the existing ones.
     *
     * @param tags the tags value to set.
     * @return the NetworkFabricPatchParameters object itself.
     */
    public NetworkFabricPatchParameters withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the terminalServerConfiguration property: Network and credentials configuration already applied to terminal
     * server.
     *
     * @return the terminalServerConfiguration value.
     */
    public TerminalServerPatchableProperties terminalServerConfiguration() {
        return this.innerProperties() == null ? null : this.innerProperties().terminalServerConfiguration();
    }

    /**
     * Set the terminalServerConfiguration property: Network and credentials configuration already applied to terminal
     * server.
     *
     * @param terminalServerConfiguration the terminalServerConfiguration value to set.
     * @return the NetworkFabricPatchParameters object itself.
     */
    public NetworkFabricPatchParameters withTerminalServerConfiguration(
        TerminalServerPatchableProperties terminalServerConfiguration) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricPatchParametersProperties();
        }
        this.innerProperties().withTerminalServerConfiguration(terminalServerConfiguration);
        return this;
    }

    /**
     * Get the racks property: List of NetworkRack resource IDs under the Network Fabric. The number of racks allowed
     * depends on the Network Fabric SKU.
     *
     * @return the racks value.
     */
    public List<String> racks() {
        return this.innerProperties() == null ? null : this.innerProperties().racks();
    }

    /**
     * Get the l2IsolationDomains property: List of L2IsolationDomain resource IDs under the Network Fabric.
     *
     * @return the l2IsolationDomains value.
     */
    public List<String> l2IsolationDomains() {
        return this.innerProperties() == null ? null : this.innerProperties().l2IsolationDomains();
    }

    /**
     * Get the l3IsolationDomains property: List of L3IsolationDomain resource IDs under the Network Fabric.
     *
     * @return the l3IsolationDomains value.
     */
    public List<String> l3IsolationDomains() {
        return this.innerProperties() == null ? null : this.innerProperties().l3IsolationDomains();
    }

    /**
     * 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 NetworkFabricPatchParameters object itself.
     */
    public NetworkFabricPatchParameters withAnnotation(String annotation) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricPatchParametersProperties();
        }
        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();
        }
    }
}
