// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Network Fabric Controller updatable properties. */
@Fluent
public class NetworkFabricControllerPatchableProperties {
    /*
     * 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)
     */
    @JsonProperty(value = "infrastructureExpressRouteConnections")
    private List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections;

    /*
     * 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).
     */
    @JsonProperty(value = "workloadExpressRouteConnections")
    private List<ExpressRouteConnectionInformation> workloadExpressRouteConnections;

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

    /**
     * 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.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 NetworkFabricControllerPatchableProperties object itself.
     */
    public NetworkFabricControllerPatchableProperties withInfrastructureExpressRouteConnections(
        List<ExpressRouteConnectionInformation> infrastructureExpressRouteConnections) {
        this.infrastructureExpressRouteConnections = 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.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 NetworkFabricControllerPatchableProperties object itself.
     */
    public NetworkFabricControllerPatchableProperties withWorkloadExpressRouteConnections(
        List<ExpressRouteConnectionInformation> workloadExpressRouteConnections) {
        this.workloadExpressRouteConnections = workloadExpressRouteConnections;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (infrastructureExpressRouteConnections() != null) {
            infrastructureExpressRouteConnections().forEach(e -> e.validate());
        }
        if (workloadExpressRouteConnections() != null) {
            workloadExpressRouteConnections().forEach(e -> e.validate());
        }
    }
}
