def METHOD_NAME(api_client, **kwargs):
    i = empty_interface(api_client)
    method = kwargs.get('method', None)
    if method == None and 'ipv4_address' in kwargs:
        method = 'static'
    if method == 'static':
        i.config.protocols = make_interface_protocols([
            client.models.InterfaceProtocolConfigEth(mac_address=kwargs.get('mac_address', random_mac(i.port_id))),
            client.models.InterfaceProtocolConfigIpv4(
                method='static',
                static=client.models.InterfaceProtocolConfigIpv4Static(
                    address=kwargs['ipv4_address'],
                    prefix_length=kwargs.get('prefix_length', 24),
                    gateway=kwargs.get('gateway', None)))
        ])
    elif method == 'auto':
        i.config.protocols = make_interface_protocols([
            client.models.InterfaceProtocolConfigEth(mac_address=random_mac(i.port_id)),
            client.models.InterfaceProtocolConfigIpv4(method='auto')
        ])
    else:
        i.config.protocols = make_interface_protocols([
            client.models.InterfaceProtocolConfigEth(mac_address=random_mac(i.port_id)),
            client.models.InterfaceProtocolConfigIpv4(
                method='dhcp',
                dhcp=client.models.InterfaceProtocolConfigIpv4Dhcp())
        ])
    return i