'Build network interface dict for use in the GCE API.
Note: Must be wrapped in a list before passing to the GCE API.
:param    network: The network to associate with the node.
:type     network: :class:`GCENetwork`
:keyword  subnetwork: The subnetwork to include.
:type     subnetwork: :class:`GCESubNetwork`
:keyword  external_ip: The external IP address to use.  If \'ephemeral\'
(default), a new non-static address will be
used.  If \'None\', then no external address will
be used.  To use an existing static IP address,
a GCEAddress object should be passed in.
:type     external_ip: :class:`GCEAddress`
:return:  network interface dict
:rtype:   ``dict``'

def _build_network_gce_struct(self, network, subnetwork=None, external_ip=None, use_selflinks=True):

    ni = {}
    ni = {'kind': 'compute#instanceNetworkInterface'}
    if (network is None):
        network = 'default'
    ni['network'] = self._get_selflink_or_name(obj=network, get_selflinks=use_selflinks, objname='network')
    if subnetwork:
        ni['subnetwork'] = self._get_selflink_or_name(obj=subnetwork, get_selflinks=use_selflinks, objname='subnetwork')
    if external_ip:
        access_configs = [{'name': 'External    NAT', 'type': 'ONE_TO_ONE_NAT'}]
        if hasattr(external_ip, 'address'):
            access_configs[0]['natIP'] = external_ip.address
        ni['accessConfigs'] = access_configs
    return ni
