I followed this tutorial https://developers.google.com/youtube/v3/code_samples/java#search_by_keyword
to retreive youtube videos based on keyword using YouTubeData A
These two defines can be found in the youtube example: Auth.java file from example
Are you can just replace the Builder string as follows:
new YouTube.Builder(new NetHttpTransport(), new JacksonFactory(), new HttpRequestInitializer()
This will do the trick, same as finding the defines.
Hopes this helps, BR, Adrian.