// 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.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionVendorConfiguration;
import com.azure.resourcemanager.hybridnetwork.models.ProvisioningState;
import com.azure.resourcemanager.hybridnetwork.models.SkuType;
import com.azure.resourcemanager.hybridnetwork.models.VendorProvisioningState;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Vendor network function sub resource. */
@Fluent
public final class VendorNetworkFunctionInner extends ProxyResource {
    /*
     * Network function details.
     */
    @JsonProperty(value = "properties")
    private VendorNetworkFunctionPropertiesFormat innerProperties;

    /*
     * The system meta data relating to this resource.
     */
    @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
    private SystemData systemData;

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

    /**
     * Get the innerProperties property: Network function details.
     *
     * @return the innerProperties value.
     */
    private VendorNetworkFunctionPropertiesFormat innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the systemData property: The system meta data relating to this resource.
     *
     * @return the systemData value.
     */
    public SystemData systemData() {
        return this.systemData;
    }

    /**
     * Get the provisioningState property: The provisioning state of the vendor network function sub resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the vendorProvisioningState property: The vendor controlled provisioning state of the vendor network
     * function.
     *
     * @return the vendorProvisioningState value.
     */
    public VendorProvisioningState vendorProvisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().vendorProvisioningState();
    }

    /**
     * Set the vendorProvisioningState property: The vendor controlled provisioning state of the vendor network
     * function.
     *
     * @param vendorProvisioningState the vendorProvisioningState value to set.
     * @return the VendorNetworkFunctionInner object itself.
     */
    public VendorNetworkFunctionInner withVendorProvisioningState(VendorProvisioningState vendorProvisioningState) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VendorNetworkFunctionPropertiesFormat();
        }
        this.innerProperties().withVendorProvisioningState(vendorProvisioningState);
        return this;
    }

    /**
     * Get the skuName property: The name of the sku. Once set, it cannot be updated.
     *
     * @return the skuName value.
     */
    public String skuName() {
        return this.innerProperties() == null ? null : this.innerProperties().skuName();
    }

    /**
     * Get the skuType property: The sku type.
     *
     * @return the skuType value.
     */
    public SkuType skuType() {
        return this.innerProperties() == null ? null : this.innerProperties().skuType();
    }

    /**
     * Get the networkFunctionVendorConfigurations property: An array of network function vendor configurations.
     *
     * @return the networkFunctionVendorConfigurations value.
     */
    public List<NetworkFunctionVendorConfiguration> networkFunctionVendorConfigurations() {
        return this.innerProperties() == null ? null : this.innerProperties().networkFunctionVendorConfigurations();
    }

    /**
     * Set the networkFunctionVendorConfigurations property: An array of network function vendor configurations.
     *
     * @param networkFunctionVendorConfigurations the networkFunctionVendorConfigurations value to set.
     * @return the VendorNetworkFunctionInner object itself.
     */
    public VendorNetworkFunctionInner withNetworkFunctionVendorConfigurations(
        List<NetworkFunctionVendorConfiguration> networkFunctionVendorConfigurations) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VendorNetworkFunctionPropertiesFormat();
        }
        this.innerProperties().withNetworkFunctionVendorConfigurations(networkFunctionVendorConfigurations);
        return this;
    }

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