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

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** NSX DHCP Server. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dhcpType")
@JsonTypeName("SERVER")
@Fluent
public final class WorkloadNetworkDhcpServer extends WorkloadNetworkDhcpEntity {
    /*
     * DHCP Server Address.
     */
    @JsonProperty(value = "serverAddress")
    private String serverAddress;

    /*
     * DHCP Server Lease Time.
     */
    @JsonProperty(value = "leaseTime")
    private Long leaseTime;

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

    /**
     * Get the serverAddress property: DHCP Server Address.
     *
     * @return the serverAddress value.
     */
    public String serverAddress() {
        return this.serverAddress;
    }

    /**
     * Set the serverAddress property: DHCP Server Address.
     *
     * @param serverAddress the serverAddress value to set.
     * @return the WorkloadNetworkDhcpServer object itself.
     */
    public WorkloadNetworkDhcpServer withServerAddress(String serverAddress) {
        this.serverAddress = serverAddress;
        return this;
    }

    /**
     * Get the leaseTime property: DHCP Server Lease Time.
     *
     * @return the leaseTime value.
     */
    public Long leaseTime() {
        return this.leaseTime;
    }

    /**
     * Set the leaseTime property: DHCP Server Lease Time.
     *
     * @param leaseTime the leaseTime value to set.
     * @return the WorkloadNetworkDhcpServer object itself.
     */
    public WorkloadNetworkDhcpServer withLeaseTime(Long leaseTime) {
        this.leaseTime = leaseTime;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public WorkloadNetworkDhcpServer withDisplayName(String displayName) {
        super.withDisplayName(displayName);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public WorkloadNetworkDhcpServer withRevision(Long revision) {
        super.withRevision(revision);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
