Skip to content

Commit afc367f

Browse files
BREAKING_CHANGE: [vertexai] Remove vararg scopes in VertexAI (googleapis#10544)
PiperOrigin-RevId: 615890471 Co-authored-by: Jaycee Li <[email protected]>
1 parent 598d25d commit afc367f

File tree

1 file changed

+0
-42
lines changed
  • java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai

1 file changed

+0
-42
lines changed

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/VertexAI.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import com.google.cloud.vertexai.api.PredictionServiceClient;
2929
import com.google.cloud.vertexai.api.PredictionServiceSettings;
3030
import java.io.IOException;
31-
import java.util.Arrays;
3231
import java.util.List;
3332
import java.util.logging.Level;
3433
import java.util.logging.Logger;
@@ -145,47 +144,6 @@ public VertexAI(String projectId, String location, Transport transport, List<Str
145144
this.transport = transport;
146145
}
147146

148-
/**
149-
* Construct a VertexAI instance with application default credentials.
150-
*
151-
* @deprecated Use {@link #VertexAI(String, String, List<String>)} instead.
152-
* @param projectId the default project to use when making API calls
153-
* @param location the default location to use when making API calls
154-
* @param scopes collection of scopes in the default credentials. Make sure you have specified
155-
* "https://www.googleapis.com/auth/cloud-platform" scope to access resources on Vertex AI.
156-
*/
157-
@Deprecated
158-
public VertexAI(String projectId, String location, String... scopes) throws IOException {
159-
CredentialsProvider credentialsProvider =
160-
scopes.length == 0
161-
? null
162-
: GoogleCredentialsProvider.newBuilder()
163-
.setScopesToApply(Arrays.asList(scopes))
164-
.setUseJwtAccessWithScope(true)
165-
.build();
166-
167-
this.projectId = projectId;
168-
this.location = location;
169-
this.apiEndpoint = String.format("%s-aiplatform.googleapis.com", this.location);
170-
this.credentialsProvider = credentialsProvider;
171-
}
172-
173-
/**
174-
* Construct a VertexAI instance with default transport layer and application default credentials.
175-
*
176-
* @deprecated Use {@link #VertexAI(String, String, Transport, List<String>)} instead.
177-
* @param projectId the default project to use when making API calls
178-
* @param location the default location to use when making API calls
179-
* @param transport the default {@link Transport} layer to use to send API requests
180-
* @param scopes collection of scopes in the default credentials
181-
*/
182-
@Deprecated
183-
public VertexAI(String projectId, String location, Transport transport, String... scopes)
184-
throws IOException {
185-
this(projectId, location, scopes);
186-
this.transport = transport;
187-
}
188-
189147
/**
190148
* Returns the default {@link Transport} layer to use to send API requests.
191149
*

0 commit comments

Comments
 (0)