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

package com.azure.resourcemanager.avs.generated;

import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpServer;

/** Samples for WorkloadNetworks CreateDhcp. */
public final class WorkloadNetworksCreateDhcpSamples {
    /*
     * x-ms-original-file: specification/vmware/resource-manager/Microsoft.AVS/stable/2022-05-01/examples/WorkloadNetworks_CreateDhcpConfigurations.json
     */
    /**
     * Sample code: WorkloadNetworks_CreateDhcp.
     *
     * @param manager Entry point to AvsManager.
     */
    public static void workloadNetworksCreateDhcp(com.azure.resourcemanager.avs.AvsManager manager) {
        manager
            .workloadNetworks()
            .defineDhcp("dhcp1")
            .withExistingPrivateCloud("group1", "cloud1")
            .withProperties(
                new WorkloadNetworkDhcpServer()
                    .withDisplayName("dhcpConfigurations1")
                    .withRevision(1L)
                    .withServerAddress("40.1.5.1/24")
                    .withLeaseTime(86400L))
            .create();
    }
}
