|
28 | 28 | import com.google.cloud.vertexai.api.PredictionServiceClient; |
29 | 29 | import com.google.cloud.vertexai.api.PredictionServiceSettings; |
30 | 30 | import java.io.IOException; |
31 | | -import java.util.Arrays; |
32 | 31 | import java.util.List; |
33 | 32 | import java.util.logging.Level; |
34 | 33 | import java.util.logging.Logger; |
@@ -145,47 +144,6 @@ public VertexAI(String projectId, String location, Transport transport, List<Str |
145 | 144 | this.transport = transport; |
146 | 145 | } |
147 | 146 |
|
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 | | - |
189 | 147 | /** |
190 | 148 | * Returns the default {@link Transport} layer to use to send API requests. |
191 | 149 | * |
|
0 commit comments