'Updates a network interface.
:param  network_interface: The network interface being updated.
:type   network_interface: :class:`ProfitBricksNetworkInterface`
:param  name: The name of the NIC, e.g. PUBLIC.
:type   name: ``str``
:param  lan_id: The ID for the LAN.
:type   lan_id: : ``int``
:param  ips: The IP addresses for the NIC as a list.
:type   ips: ``list``
:param  dhcp_active: Set to false to disable.
:type   dhcp_active: ``bool``
:return:    Instance of class ``ProfitBricksNetworkInterface``
:rtype:     :class:`ProfitBricksNetworkInterface`'

def ex_update_network_interface(self, network_interface, name=None, lan_id=None, ips=None, dhcp_active=None):

    if lan_id:
        lan_id = str(lan_id)
    action = network_interface.href
    body = {}
    if (name is not None):
        body['name'] = name
    if (lan_id is not None):
        body['lan'] = str(lan_id)
    if (ips is not None):
        body['ips'] = ips
    if (dhcp_active is not None):
        body['dhcp'] = dhcp_active
    response = self.connection.request(action=action, headers={'Content-Type': 'application/json'}, data=body, method='PATCH', with_full_url=True)
    return self._to_interface(response.object, response.headers)
