code: func validateNICForUpdate(n *crimson.NIC, mask *field_mask.FieldMask) error {
  	switch err := validateUpdateMask(mask); {
  	case n == nil:
  		return status.Error(codes.InvalidArgument, "NIC specification is required")
  	case n.Name == "":
  		return status.Error(codes.InvalidArgument, "NIC name is required and must be non-empty")
  	case n.Machine == "":
  		return status.Error(codes.InvalidArgument, "machine is required and must be non-empty")
  	case err != nil:
  		return err
  	}
  	for _, path := range mask.Paths {
  		// TODO(smut): Allow hostname, IPv4 address to be updated.
  		switch path {
  		case "name":
  			return status.Error(codes.InvalidArgument, "NIC name cannot be updated, delete and create a new NIC instead")
  		case "machine":
  			return status.Error(codes.InvalidArgument, "machine cannot be updated, delete and create a new NIC instead")
  		case "mac_address":
  			if n.MacAddress == "" {
  				return status.Error(codes.InvalidArgument, "MAC address is required and must be non-empty")
  			}
  			_, err := common.ParseMAC48(n.MacAddress)
  			if err != nil {
  				return status.Errorf(codes.InvalidArgument, "invalid MAC-48 address %q", n.MacAddress)
  			}
  		case "switch":
  			if n.Switch == "" {
  				return status.Error(codes.InvalidArgument, "switch is required and must be non-empty")
  			}
  		case "switchport":
  			if n.Switchport < 1 {
  				return status.Error(codes.InvalidArgument, "switchport must be positive")
  			}
  		default:
  			return status.Errorf(codes.InvalidArgument, "unsupported update mask path %q", path)
  		}
  	}
  	return nil
  }
docs: // validateNICForUpdate validates a NIC for update.