What's the function of "と" in "海に行きたいといつしか話した"?


It's not hard to understand the meaning of this sentence but I just want to
know which function the "と" serves in this case.




> 「海に行きたい」と、(いつしか)話した

The と is a quotative particle.

