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

package com.azure.resourcemanager.vmwarecloudsimple.implementation;

import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNetworkInner;
import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.VirtualNicInner;
import com.azure.resourcemanager.vmwarecloudsimple.models.GuestOsnicCustomization;
import com.azure.resourcemanager.vmwarecloudsimple.models.NicType;
import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualNetwork;
import com.azure.resourcemanager.vmwarecloudsimple.models.VirtualNic;
import java.util.Collections;
import java.util.List;

public final class VirtualNicImpl implements VirtualNic {
    private VirtualNicInner innerObject;

    private final com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager serviceManager;

    VirtualNicImpl(
        VirtualNicInner innerObject,
        com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager serviceManager) {
        this.innerObject = innerObject;
        this.serviceManager = serviceManager;
    }

    public GuestOsnicCustomization customization() {
        return this.innerModel().customization();
    }

    public List<String> ipAddresses() {
        List<String> inner = this.innerModel().ipAddresses();
        if (inner != null) {
            return Collections.unmodifiableList(inner);
        } else {
            return Collections.emptyList();
        }
    }

    public String macAddress() {
        return this.innerModel().macAddress();
    }

    public VirtualNetwork network() {
        VirtualNetworkInner inner = this.innerModel().network();
        if (inner != null) {
            return new VirtualNetworkImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public NicType nicType() {
        return this.innerModel().nicType();
    }

    public Boolean powerOnBoot() {
        return this.innerModel().powerOnBoot();
    }

    public String virtualNicId() {
        return this.innerModel().virtualNicId();
    }

    public String virtualNicName() {
        return this.innerModel().virtualNicName();
    }

    public VirtualNicInner innerModel() {
        return this.innerObject;
    }

    private com.azure.resourcemanager.vmwarecloudsimple.VMwareCloudSimpleManager manager() {
        return this.serviceManager;
    }
}
