func (networkdevicefunction *NetworkDeviceFunction) Update() error {
	original := new(NetworkDeviceFunction)
	err := original.UnmarshalJSON(networkdevicefunction.rawData)
	if err != nil {
		return err
	}
	readWriteFields := []string{
		"BootMode",
		"DeviceEnabled",
		"NetDevFuncType",
	}
	originalElement := reflect.ValueOf(original).Elem()
	currentElement := reflect.ValueOf(networkdevicefunction).Elem()
	return networkdevicefunction.Entity.Update(originalElement, currentElement, readWriteFields)
}
Update commits updates to this object's properties to the running system.
package redfish
import (
	"encoding/json"
	"reflect"
	"github.com/stmcginnis/gofish/common"
)
type AuthenticationMethod string
const (
	NoneAuthenticationMethod AuthenticationMethod = "None"
	CHAPAuthenticationMethod AuthenticationMethod = "CHAP"
	MutualCHAPAuthenticationMethod AuthenticationMethod = "MutualCHAP"
)
type BootMode string
const (
	DisabledBootMode BootMode = "Disabled"
	PXEBootMode BootMode = "PXE"
	ISCSIBootMode BootMode = "iSCSI"
	FibreChannelBootMode BootMode = "FibreChannel"
	FibreChannelOverEthernetBootMode BootMode = "FibreChannelOverEthernet"
)
type IPAddressType string
const (
	IPv4IPAddressType IPAddressType = "IPv4"
	IPv6IPAddressType IPAddressType = "IPv6"
)
type NetworkDeviceTechnology string
const (
	DisabledNetworkDeviceTechnology NetworkDeviceTechnology = "Disabled"
	EthernetNetworkDeviceTechnology NetworkDeviceTechnology = "Ethernet"
	FibreChannelNetworkDeviceTechnology NetworkDeviceTechnology = "FibreChannel"
	ISCSINetworkDeviceTechnology NetworkDeviceTechnology = "iSCSI"
	FibreChannelOverEthernetNetworkDeviceTechnology NetworkDeviceTechnology = "FibreChannelOverEthernet"
)
type WWNSource string
const (
	ConfiguredLocallyWWNSource WWNSource = "ConfiguredLocally"
	ProvidedByFabricWWNSource WWNSource = "ProvidedByFabric"
)
type BootTargets struct {
	BootPriority int
	LUNID string
	WWPN string
}
func (boottargets *BootTargets) UnmarshalJSON(b []byte) error {
	type temp BootTargets
	var t struct {
		temp
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*boottargets = BootTargets(t.temp)
	return nil
}
type Ethernet struct {
	MACAddress string
	MTUSize int
	PermanentMACAddress string
	vlan string
	vlans string
}
func (ethernet *Ethernet) UnmarshalJSON(b []byte) error {
	type temp Ethernet
	var t struct {
		temp
		VLAN  common.Link
		VLANs common.Link
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*ethernet = Ethernet(t.temp)
	ethernet.vlan = string(t.VLAN)
	ethernet.vlans = string(t.VLANs)
	return nil
}
type FibreChannel struct {
	AllowFIPVLANDiscovery bool
	BootTargets []BootTargets
	FCoEActiveVLANId int
	FCoELocalVLANId int
	FibreChannelID string `json:"FibreChannelId"`
	PermanentWWNN string
	PermanentWWPN string
	WWNN string
	WWNSource WWNSource
	WWPN string
}
type NetworkDeviceFunction struct {
	common.Entity
	ODataContext string `json:"@odata.context"`
	ODataType string `json:"@odata.type"`
	AssignablePhysicalPortsCount int `json:"AssignablePhysicalPorts@odata.count"`
	BootMode BootMode
	Description string
	DeviceEnabled bool
	Ethernet Ethernet
	FibreChannel FibreChannel
	MaxVirtualFunctions int
	NetDevFuncCapabilities []NetworkDeviceTechnology
	NetDevFuncType NetworkDeviceTechnology
	Status common.Status
	VirtualFunctionsEnabled bool
	ISCSIBoot ISCSIBoot `json:"iSCSIBoot"`
	endpoints []string
	EndpointsCount int
	pcieFunction string
	physicalPortAssignment string
	rawData []byte
}
func (networkdevicefunction *NetworkDeviceFunction) UnmarshalJSON(b []byte) error {
	type temp NetworkDeviceFunction
	type links struct {
		Endpoints              common.Links
		EndpointsCount         int `json:"Endpoints@odata.count"`
		PCIeFunction           common.Link
		PhysicalPortAssignment common.Link
	}
	var t struct {
		temp
		Links                   links
		AssignablePhysicalPorts common.Links
	}
	err := json.Unmarshal(b, &t)
	if err != nil {
		return err
	}
	*networkdevicefunction = NetworkDeviceFunction(t.temp)
	networkdevicefunction.endpoints = t.Links.Endpoints.ToStrings()
	networkdevicefunction.EndpointsCount = t.Links.EndpointsCount
	networkdevicefunction.pcieFunction = string(t.Links.PCIeFunction)
	networkdevicefunction.physicalPortAssignment = string(t.Links.PhysicalPortAssignment)
	networkdevicefunction.rawData = b
	return nil
}