Skip to content

Commit 3c6f8b6

Browse files
jscudcopybara-github
authored andcommitted
feat: Update data types from discovery doc.
PiperOrigin-RevId: 865450418
1 parent 6d03337 commit 3c6f8b6

File tree

411 files changed

+70717
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+70717
-0
lines changed

java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/genai/AgentEngines.java

Lines changed: 967 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Auto-generated code. Do not edit.
18+
19+
package com.google.cloud.vertexai.genai;
20+
21+
import com.google.cloud.vertexai.genai.types.AgentEngineOperation;
22+
import com.google.cloud.vertexai.genai.types.CreateAgentEngineConfig;
23+
import com.google.cloud.vertexai.genai.types.DeleteAgentEngineConfig;
24+
import com.google.cloud.vertexai.genai.types.DeleteAgentEngineOperation;
25+
import com.google.cloud.vertexai.genai.types.GetAgentEngineConfig;
26+
import com.google.cloud.vertexai.genai.types.GetAgentEngineOperationConfig;
27+
import com.google.cloud.vertexai.genai.types.ListAgentEngineConfig;
28+
import com.google.cloud.vertexai.genai.types.ListReasoningEnginesResponse;
29+
import com.google.cloud.vertexai.genai.types.QueryAgentEngineConfig;
30+
import com.google.cloud.vertexai.genai.types.QueryReasoningEngineResponse;
31+
import com.google.cloud.vertexai.genai.types.ReasoningEngine;
32+
import com.google.cloud.vertexai.genai.types.UpdateAgentEngineConfig;
33+
import com.google.genai.ApiClient;
34+
import com.google.genai.ApiResponse;
35+
import com.google.genai.Common.BuiltRequest;
36+
import java.util.concurrent.CompletableFuture;
37+
38+
/** Async module of {@link AgentEngines} */
39+
public final class AsyncAgentEngines {
40+
41+
AgentEngines agentEngines;
42+
ApiClient apiClient;
43+
44+
public AsyncAgentEngines(ApiClient apiClient) {
45+
this.apiClient = apiClient;
46+
this.agentEngines = new AgentEngines(apiClient);
47+
}
48+
49+
CompletableFuture<AgentEngineOperation> privateCreate(CreateAgentEngineConfig config) {
50+
51+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateCreate(config);
52+
return this.apiClient
53+
.asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
54+
.thenApplyAsync(
55+
response -> {
56+
try (ApiResponse res = response) {
57+
return agentEngines.processResponseForPrivateCreate(res, config);
58+
}
59+
});
60+
}
61+
62+
CompletableFuture<DeleteAgentEngineOperation> privateDelete(
63+
String name, boolean force, DeleteAgentEngineConfig config) {
64+
65+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateDelete(name, force, config);
66+
return this.apiClient
67+
.asyncRequest(
68+
"delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
69+
.thenApplyAsync(
70+
response -> {
71+
try (ApiResponse res = response) {
72+
return agentEngines.processResponseForPrivateDelete(res, config);
73+
}
74+
});
75+
}
76+
77+
CompletableFuture<ReasoningEngine> privateGet(String name, GetAgentEngineConfig config) {
78+
79+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateGet(name, config);
80+
return this.apiClient
81+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
82+
.thenApplyAsync(
83+
response -> {
84+
try (ApiResponse res = response) {
85+
return agentEngines.processResponseForPrivateGet(res, config);
86+
}
87+
});
88+
}
89+
90+
CompletableFuture<ListReasoningEnginesResponse> privateList(ListAgentEngineConfig config) {
91+
92+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateList(config);
93+
return this.apiClient
94+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
95+
.thenApplyAsync(
96+
response -> {
97+
try (ApiResponse res = response) {
98+
return agentEngines.processResponseForPrivateList(res, config);
99+
}
100+
});
101+
}
102+
103+
CompletableFuture<AgentEngineOperation> privateGetAgentOperation(
104+
String operationName, GetAgentEngineOperationConfig config) {
105+
106+
BuiltRequest builtRequest =
107+
agentEngines.buildRequestForPrivateGetAgentOperation(operationName, config);
108+
return this.apiClient
109+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
110+
.thenApplyAsync(
111+
response -> {
112+
try (ApiResponse res = response) {
113+
return agentEngines.processResponseForPrivateGetAgentOperation(res, config);
114+
}
115+
});
116+
}
117+
118+
CompletableFuture<QueryReasoningEngineResponse> privateQuery(
119+
String name, QueryAgentEngineConfig config) {
120+
121+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateQuery(name, config);
122+
return this.apiClient
123+
.asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
124+
.thenApplyAsync(
125+
response -> {
126+
try (ApiResponse res = response) {
127+
return agentEngines.processResponseForPrivateQuery(res, config);
128+
}
129+
});
130+
}
131+
132+
CompletableFuture<AgentEngineOperation> privateUpdate(
133+
String name, UpdateAgentEngineConfig config) {
134+
135+
BuiltRequest builtRequest = agentEngines.buildRequestForPrivateUpdate(name, config);
136+
return this.apiClient
137+
.asyncRequest("patch", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
138+
.thenApplyAsync(
139+
response -> {
140+
try (ApiResponse res = response) {
141+
return agentEngines.processResponseForPrivateUpdate(res, config);
142+
}
143+
});
144+
}
145+
}
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Auto-generated code. Do not edit.
18+
19+
package com.google.cloud.vertexai.genai;
20+
21+
import com.google.cloud.vertexai.genai.types.AssembleDatasetConfig;
22+
import com.google.cloud.vertexai.genai.types.CreateMultimodalDatasetConfig;
23+
import com.google.cloud.vertexai.genai.types.GeminiRequestReadConfig;
24+
import com.google.cloud.vertexai.genai.types.GetMultimodalDatasetOperationConfig;
25+
import com.google.cloud.vertexai.genai.types.ListMultimodalDatasetsConfig;
26+
import com.google.cloud.vertexai.genai.types.ListMultimodalDatasetsResponse;
27+
import com.google.cloud.vertexai.genai.types.MultimodalDataset;
28+
import com.google.cloud.vertexai.genai.types.MultimodalDatasetOperation;
29+
import com.google.cloud.vertexai.genai.types.SchemaTablesDatasetMetadata;
30+
import com.google.cloud.vertexai.genai.types.UpdateMultimodalDatasetConfig;
31+
import com.google.cloud.vertexai.genai.types.VertexBaseConfig;
32+
import com.google.genai.ApiClient;
33+
import com.google.genai.ApiResponse;
34+
import com.google.genai.Common.BuiltRequest;
35+
import com.google.genai.types.EncryptionSpec;
36+
import java.util.concurrent.CompletableFuture;
37+
38+
/** Async module of {@link Datasets} */
39+
public final class AsyncDatasets {
40+
41+
Datasets datasets;
42+
ApiClient apiClient;
43+
44+
public AsyncDatasets(ApiClient apiClient) {
45+
this.apiClient = apiClient;
46+
this.datasets = new Datasets(apiClient);
47+
}
48+
49+
CompletableFuture<MultimodalDatasetOperation> privateAssembleMultimodalDataset(
50+
String name, GeminiRequestReadConfig geminiRequestReadConfig, AssembleDatasetConfig config) {
51+
52+
BuiltRequest builtRequest =
53+
datasets.buildRequestForPrivateAssembleMultimodalDataset(
54+
name, geminiRequestReadConfig, config);
55+
return this.apiClient
56+
.asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
57+
.thenApplyAsync(
58+
response -> {
59+
try (ApiResponse res = response) {
60+
return datasets.processResponseForPrivateAssembleMultimodalDataset(res, config);
61+
}
62+
});
63+
}
64+
65+
CompletableFuture<MultimodalDatasetOperation> privateCreateMultimodalDataset(
66+
String name,
67+
String displayName,
68+
String metadataSchemaUri,
69+
SchemaTablesDatasetMetadata metadata,
70+
String description,
71+
EncryptionSpec encryptionSpec,
72+
CreateMultimodalDatasetConfig config) {
73+
74+
BuiltRequest builtRequest =
75+
datasets.buildRequestForPrivateCreateMultimodalDataset(
76+
name, displayName, metadataSchemaUri, metadata, description, encryptionSpec, config);
77+
return this.apiClient
78+
.asyncRequest("post", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
79+
.thenApplyAsync(
80+
response -> {
81+
try (ApiResponse res = response) {
82+
return datasets.processResponseForPrivateCreateMultimodalDataset(res, config);
83+
}
84+
});
85+
}
86+
87+
CompletableFuture<MultimodalDatasetOperation> privateDeleteMultimodalDataset(
88+
String name, VertexBaseConfig config) {
89+
90+
BuiltRequest builtRequest =
91+
datasets.buildRequestForPrivateDeleteMultimodalDataset(name, config);
92+
return this.apiClient
93+
.asyncRequest(
94+
"delete", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
95+
.thenApplyAsync(
96+
response -> {
97+
try (ApiResponse res = response) {
98+
return datasets.processResponseForPrivateDeleteMultimodalDataset(res, config);
99+
}
100+
});
101+
}
102+
103+
CompletableFuture<MultimodalDataset> privateGetMultimodalDataset(
104+
String name, VertexBaseConfig config) {
105+
106+
BuiltRequest builtRequest = datasets.buildRequestForPrivateGetMultimodalDataset(name, config);
107+
return this.apiClient
108+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
109+
.thenApplyAsync(
110+
response -> {
111+
try (ApiResponse res = response) {
112+
return datasets.processResponseForPrivateGetMultimodalDataset(res, config);
113+
}
114+
});
115+
}
116+
117+
CompletableFuture<MultimodalDatasetOperation> privateGetMultimodalDatasetOperation(
118+
String datasetId, String operationId, GetMultimodalDatasetOperationConfig config) {
119+
120+
BuiltRequest builtRequest =
121+
datasets.buildRequestForPrivateGetMultimodalDatasetOperation(
122+
datasetId, operationId, config);
123+
return this.apiClient
124+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
125+
.thenApplyAsync(
126+
response -> {
127+
try (ApiResponse res = response) {
128+
return datasets.processResponseForPrivateGetMultimodalDatasetOperation(res, config);
129+
}
130+
});
131+
}
132+
133+
CompletableFuture<ListMultimodalDatasetsResponse> privateListMultimodalDatasets(
134+
ListMultimodalDatasetsConfig config) {
135+
136+
BuiltRequest builtRequest = datasets.buildRequestForPrivateListMultimodalDatasets(config);
137+
return this.apiClient
138+
.asyncRequest("get", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
139+
.thenApplyAsync(
140+
response -> {
141+
try (ApiResponse res = response) {
142+
return datasets.processResponseForPrivateListMultimodalDatasets(res, config);
143+
}
144+
});
145+
}
146+
147+
CompletableFuture<MultimodalDataset> privateUpdateMultimodalDataset(
148+
String name,
149+
String displayName,
150+
SchemaTablesDatasetMetadata metadata,
151+
String description,
152+
EncryptionSpec encryptionSpec,
153+
UpdateMultimodalDatasetConfig config) {
154+
155+
BuiltRequest builtRequest =
156+
datasets.buildRequestForPrivateUpdateMultimodalDataset(
157+
name, displayName, metadata, description, encryptionSpec, config);
158+
return this.apiClient
159+
.asyncRequest("patch", builtRequest.path(), builtRequest.body(), builtRequest.httpOptions())
160+
.thenApplyAsync(
161+
response -> {
162+
try (ApiResponse res = response) {
163+
return datasets.processResponseForPrivateUpdateMultimodalDataset(res, config);
164+
}
165+
});
166+
}
167+
}

0 commit comments

Comments
 (0)