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

package com.azure.resourcemanager.hybridnetwork.fluent.models;

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

/** The network function user configuration. */
@Fluent
public final class NetworkFunctionSkuRoleDetailsInner {
    /*
     * The name of the network function role.
     */
    @JsonProperty(value = "roleName")
    private String roleName;

    /*
     * The user data template for customers.
     */
    @JsonProperty(value = "userDataTemplate")
    private Object userDataTemplate;

    /*
     * The user parameters for customers.
     */
    @JsonProperty(value = "userDataParameters")
    private Object userDataParameters;

    /*
     * The network interface configuration.
     */
    @JsonProperty(value = "networkInterfaces")
    private List<NetworkInterface> networkInterfaces;

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

    /**
     * Get the roleName property: The name of the network function role.
     *
     * @return the roleName value.
     */
    public String roleName() {
        return this.roleName;
    }

    /**
     * Set the roleName property: The name of the network function role.
     *
     * @param roleName the roleName value to set.
     * @return the NetworkFunctionSkuRoleDetailsInner object itself.
     */
    public NetworkFunctionSkuRoleDetailsInner withRoleName(String roleName) {
        this.roleName = roleName;
        return this;
    }

    /**
     * Get the userDataTemplate property: The user data template for customers.
     *
     * @return the userDataTemplate value.
     */
    public Object userDataTemplate() {
        return this.userDataTemplate;
    }

    /**
     * Set the userDataTemplate property: The user data template for customers.
     *
     * @param userDataTemplate the userDataTemplate value to set.
     * @return the NetworkFunctionSkuRoleDetailsInner object itself.
     */
    public NetworkFunctionSkuRoleDetailsInner withUserDataTemplate(Object userDataTemplate) {
        this.userDataTemplate = userDataTemplate;
        return this;
    }

    /**
     * Get the userDataParameters property: The user parameters for customers.
     *
     * @return the userDataParameters value.
     */
    public Object userDataParameters() {
        return this.userDataParameters;
    }

    /**
     * Set the userDataParameters property: The user parameters for customers.
     *
     * @param userDataParameters the userDataParameters value to set.
     * @return the NetworkFunctionSkuRoleDetailsInner object itself.
     */
    public NetworkFunctionSkuRoleDetailsInner withUserDataParameters(Object userDataParameters) {
        this.userDataParameters = userDataParameters;
        return this;
    }

    /**
     * Get the networkInterfaces property: The network interface configuration.
     *
     * @return the networkInterfaces value.
     */
    public List<NetworkInterface> networkInterfaces() {
        return this.networkInterfaces;
    }

    /**
     * Set the networkInterfaces property: The network interface configuration.
     *
     * @param networkInterfaces the networkInterfaces value to set.
     * @return the NetworkFunctionSkuRoleDetailsInner object itself.
     */
    public NetworkFunctionSkuRoleDetailsInner withNetworkInterfaces(List<NetworkInterface> networkInterfaces) {
        this.networkInterfaces = networkInterfaces;
        return this;
    }

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