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

/**
 * Network Fabric Controller patch parameters
 *
 * <p>The NetworkFabricControllerPatch payload definition.
 */
@Fluent
public final class NetworkFabricControllerPatch {
    /*
     * Network Fabric Controller updatable properties
     *
     * Network Fabric Controller patch properties.
     */
    @JsonProperty(value = "properties")
    private NetworkFabricControllerPatchableProperties 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 NetworkFabricControllerPatch class. */
    public NetworkFabricControllerPatch() {
    }

    /**
     * Get the innerProperties property: Network Fabric Controller updatable properties
     *
     * <p>Network Fabric Controller patch properties.
     *
     * @return the innerProperties value.
     */
    private NetworkFabricControllerPatchableProperties 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 NetworkFabricControllerPatch object itself.
     */
    public NetworkFabricControllerPatch withTags(Map<String, String> tags) {
        this.tags = tags;
        return this;
    }

    /**
     * Get the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute
     * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure
     * services. (This is a Mandatory attribute).
     *
     * @return the infrastructureExpressRouteConnections value.
     */
    public List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections() {
        return this.innerProperties() == null ? null : this.innerProperties().infrastructureExpressRouteConnections();
    }

    /**
     * Set the infrastructureExpressRouteConnections property: As part of an update, the Infrastructure ExpressRoute
     * CircuitID should be provided to create and Provision a NFC. This Express route is dedicated for Infrastructure
     * services. (This is a Mandatory attribute).
     *
     * @param infrastructureExpressRouteConnections the infrastructureExpressRouteConnections value to set.
     * @return the NetworkFabricControllerPatch object itself.
     */
    public NetworkFabricControllerPatch withInfrastructureExpressRouteConnections(
        List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerPatchableProperties();
        }
        this.innerProperties().withInfrastructureExpressRouteConnections(infrastructureExpressRouteConnections);
        return this;
    }

    /**
     * Get the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID
     * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is
     * a Mandatory attribute).
     *
     * @return the workloadExpressRouteConnections value.
     */
    public List<ExpressRouteConnectionInformation> workloadExpressRouteConnections() {
        return this.innerProperties() == null ? null : this.innerProperties().workloadExpressRouteConnections();
    }

    /**
     * Set the workloadExpressRouteConnections property: As part of an update, the workload ExpressRoute CircuitID
     * should be provided to create and Provision a NFC. This Express route is dedicated for Workload services. (This is
     * a Mandatory attribute).
     *
     * @param workloadExpressRouteConnections the workloadExpressRouteConnections value to set.
     * @return the NetworkFabricControllerPatch object itself.
     */
    public NetworkFabricControllerPatch withWorkloadExpressRouteConnections(
        List<ExpressRouteConnectionInformation> workloadExpressRouteConnections) {
        if (this.innerProperties() == null) {
            this.innerProperties = new NetworkFabricControllerPatchableProperties();
        }
        this.innerProperties().withWorkloadExpressRouteConnections(workloadExpressRouteConnections);
        return this;
    }

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