How to run Natural Language API V2

I want to try sentiment analysis by using Natural Language API in Japanese.

I was able to run the sample code.https://cloud.google.com/natural-language/docs/analyzing-sentiment#language-sentiment-string-gcloud

But this page doesn’t mention API versions, so I don’t know how to run Natural Language API V2 on sentiment analysis.

Thanks