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

package com.azure.resourcemanager.nginx.models;

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

/** The NginxNetworkProfile model. */
@Fluent
public final class NginxNetworkProfile {
    /*
     * The frontEndIPConfiguration property.
     */
    @JsonProperty(value = "frontEndIPConfiguration")
    private NginxFrontendIpConfiguration frontEndIpConfiguration;

    /*
     * The networkInterfaceConfiguration property.
     */
    @JsonProperty(value = "networkInterfaceConfiguration")
    private NginxNetworkInterfaceConfiguration networkInterfaceConfiguration;

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

    /**
     * Get the frontEndIpConfiguration property: The frontEndIPConfiguration property.
     *
     * @return the frontEndIpConfiguration value.
     */
    public NginxFrontendIpConfiguration frontEndIpConfiguration() {
        return this.frontEndIpConfiguration;
    }

    /**
     * Set the frontEndIpConfiguration property: The frontEndIPConfiguration property.
     *
     * @param frontEndIpConfiguration the frontEndIpConfiguration value to set.
     * @return the NginxNetworkProfile object itself.
     */
    public NginxNetworkProfile withFrontEndIpConfiguration(NginxFrontendIpConfiguration frontEndIpConfiguration) {
        this.frontEndIpConfiguration = frontEndIpConfiguration;
        return this;
    }

    /**
     * Get the networkInterfaceConfiguration property: The networkInterfaceConfiguration property.
     *
     * @return the networkInterfaceConfiguration value.
     */
    public NginxNetworkInterfaceConfiguration networkInterfaceConfiguration() {
        return this.networkInterfaceConfiguration;
    }

    /**
     * Set the networkInterfaceConfiguration property: The networkInterfaceConfiguration property.
     *
     * @param networkInterfaceConfiguration the networkInterfaceConfiguration value to set.
     * @return the NginxNetworkProfile object itself.
     */
    public NginxNetworkProfile withNetworkInterfaceConfiguration(
        NginxNetworkInterfaceConfiguration networkInterfaceConfiguration) {
        this.networkInterfaceConfiguration = networkInterfaceConfiguration;
        return this;
    }

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