I am attempting to use functionality from V1 and V2 of the Cloud Resource Manager for GCP. V1 has functionality for Projects not found within the POM import for V2, and V2 has functionality for Folders not found within the POM import for V1. Importing both just causes a conflict. I can only either create a Project utilizing V1, or Create a Folder utilizing V2.
My use case requires me to utilize both functionalities, what is the proper way to go about project and folder creation for the GCP Java library?
com.google.api.services.cloudresourcemanager.model.Project -> Works in V1, not V2 import of CloudResourceManager
/*(crm is an instance of CloudResourceManager)*/ crm.projects().create(project);
com.google.api.services.cloudresourcemanager.model.Folder -> Works in V2, not V1 import of CloudResourceManager
/*(crm is an instance of CloudResourceManager)*/
crm.folders().create(folder);
Is there a different POM import I should be using for combined functionality?
https://developers.google.com/apis-explorer/#p/cloudresourcemanager/v1/ https://developers.google.com/apis-explorer/#p/cloudresourcemanager/v2/
I imagine there is a methodology I'm overlooking pertaining to how I should be creating both GCP folders and projects within java when utilizing their SDK. Below are the guilty POM imports (One commented out currently)
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-cloudresourcemanager</artifactId>
<version>v2-rev20201111-1.30.10</version>
</dependency>
<!--V1 has different libraries then V2-->
<!--https://search.maven.org/artifact/com.google.apis/google-api-services-cloudresourcemanager/v1-rev20201111-1.30.10/jar-->
<!-- <dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-cloudresourcemanager</artifactId>
<version>v1-rev20201111-1.30.10</version>
</dependency>-->