// 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.generated;

import com.azure.resourcemanager.managednetworkfabric.models.ExpressRouteConnectionInformation;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricController;
import java.util.Arrays;

/** Samples for NetworkFabricControllers Update. */
public final class NetworkFabricControllersUpdateSamples {
    /*
     * x-ms-original-file: specification/managednetworkfabric/resource-manager/Microsoft.ManagedNetworkFabric/preview/2023-02-01-preview/examples/NetworkFabricControllers_Update_MaximumSet_Gen.json
     */
    /**
     * Sample code: NetworkFabricControllers_Update_MaximumSet_Gen.
     *
     * @param manager Entry point to ManagedNetworkFabricManager.
     */
    public static void networkFabricControllersUpdateMaximumSetGen(
        com.azure.resourcemanager.managednetworkfabric.ManagedNetworkFabricManager manager) {
        NetworkFabricController resource =
            manager
                .networkFabricControllers()
                .getByResourceGroupWithResponse(
                    "resourceGroupName", "networkFabricControllerName", com.azure.core.util.Context.NONE)
                .getValue();
        resource
            .update()
            .withWorkloadExpressRouteConnections(
                Arrays
                    .asList(
                        new ExpressRouteConnectionInformation()
                            .withExpressRouteCircuitId(
                                "/subscriptions/xxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Network/expressRouteCircuits/expressRouteCircuitName")
                            .withExpressRouteAuthorizationKey("fakeTokenPlaceholder")))
            .apply();
    }
}
