diff --git a/generation_config.yaml b/generation_config.yaml
index 0909dc1bc824..bfb1d2dffd77 100644
--- a/generation_config.yaml
+++ b/generation_config.yaml
@@ -1,5 +1,5 @@
gapic_generator_version: 2.67.0
-googleapis_commitish: 8f70147e819ed25cc75c73c4037ce64f9cbb68db
+googleapis_commitish: 6f8a554039638f4a9ca78d5f0c964281a16f4166
libraries_bom_version: 26.77.0
libraries:
- api_shortname: accessapproval
diff --git a/java-aiplatform/README.md b/java-aiplatform/README.md
index 7e2d28987a1d..90d4732eb315 100644
--- a/java-aiplatform/README.md
+++ b/java-aiplatform/README.md
@@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies:
createSessionAsync(ReasoningEngineName parent, Session session) *
createSessionAsync(String parent, Session session) + *
createSessionAsync(ReasoningEngineName parent, Session session, String sessionId) + *
createSessionAsync(String parent, Session session, String sessionId) *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * ReasoningEngineName parent =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]");
+ * Session session = Session.newBuilder().build();
+ * String sessionId = "sessionId607796817";
+ * Session response = sessionServiceClient.createSessionAsync(parent, session, sessionId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the location to create the session in. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @param session Required. The session to create.
+ * @param sessionId Optional. The user defined ID to use for session, which will become the final
+ * component of the session resource name. If not provided, Vertex AI will generate a value
+ * for this ID.
+ * This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first
+ * character must be a letter, and the last character must be a letter or number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture Sample code:
+ *
+ * This value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The first
+ * character must be a letter, and the last character must be a letter or number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture CreateRagDataSchema Creates a RagDataSchema. Request object method variants only take one parameter, a request object, which must be constructed before the call. createRagDataSchema(CreateRagDataSchemaRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createRagDataSchema(RagCorpusName parent, RagDataSchema ragDataSchema, String ragDataSchemaId)
+ * createRagDataSchema(String parent, RagDataSchema ragDataSchema, String ragDataSchemaId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createRagDataSchemaCallable()
+ * BatchCreateRagDataSchemas Batch Create one or more RagDataSchemas Request object method variants only take one parameter, a request object, which must be constructed before the call. batchCreateRagDataSchemasAsync(BatchCreateRagDataSchemasRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchCreateRagDataSchemasOperationCallable()
+ * batchCreateRagDataSchemasCallable()
+ * GetRagDataSchema Gets a RagDataSchema. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRagDataSchema(GetRagDataSchemaRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRagDataSchema(RagDataSchemaName name)
+ * getRagDataSchema(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRagDataSchemaCallable()
+ * ListRagDataSchemas Lists RagDataSchemas in a Location. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRagDataSchemas(ListRagDataSchemasRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRagDataSchemas(RagCorpusName parent)
+ * listRagDataSchemas(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRagDataSchemasPagedCallable()
+ * listRagDataSchemasCallable()
+ * DeleteRagDataSchema Deletes a RagDataSchema. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteRagDataSchema(DeleteRagDataSchemaRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteRagDataSchema(RagDataSchemaName name)
+ * deleteRagDataSchema(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteRagDataSchemaCallable()
+ * BatchDeleteRagDataSchemas Batch Deletes one or more RagDataSchemas Request object method variants only take one parameter, a request object, which must be constructed before the call. batchDeleteRagDataSchemasAsync(BatchDeleteRagDataSchemasRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchDeleteRagDataSchemasOperationCallable()
+ * batchDeleteRagDataSchemasCallable()
+ * CreateRagMetadata Creates a RagMetadata. Request object method variants only take one parameter, a request object, which must be constructed before the call. createRagMetadata(CreateRagMetadataRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createRagMetadata(RagFileName parent, RagMetadata ragMetadata, String ragMetadataId)
+ * createRagMetadata(String parent, RagMetadata ragMetadata, String ragMetadataId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createRagMetadataCallable()
+ * BatchCreateRagMetadata Batch Create one or more RagMetadatas Request object method variants only take one parameter, a request object, which must be constructed before the call. batchCreateRagMetadataAsync(BatchCreateRagMetadataRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchCreateRagMetadataOperationCallable()
+ * batchCreateRagMetadataCallable()
+ * UpdateRagMetadata Updates a RagMetadata. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateRagMetadata(UpdateRagMetadataRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. updateRagMetadata(RagMetadata ragMetadata)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateRagMetadataCallable()
+ * GetRagMetadata Gets a RagMetadata. Request object method variants only take one parameter, a request object, which must be constructed before the call. getRagMetadata(GetRagMetadataRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getRagMetadata(RagMetadataName name)
+ * getRagMetadata(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getRagMetadataCallable()
+ * ListRagMetadata Lists RagMetadata in a RagFile. Request object method variants only take one parameter, a request object, which must be constructed before the call. listRagMetadata(ListRagMetadataRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. listRagMetadata(RagFileName parent)
+ * listRagMetadata(String parent)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listRagMetadataPagedCallable()
+ * listRagMetadataCallable()
+ * DeleteRagMetadata Deletes a RagMetadata. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteRagMetadata(DeleteRagMetadataRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteRagMetadata(RagMetadataName name)
+ * deleteRagMetadata(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteRagMetadataCallable()
+ * BatchDeleteRagMetadata Batch Deletes one or more RagMetadata. Request object method variants only take one parameter, a request object, which must be constructed before the call. batchDeleteRagMetadataAsync(BatchDeleteRagMetadataRequest request)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. batchDeleteRagMetadataOperationCallable()
+ * batchDeleteRagMetadataCallable()
+ * ListLocations Lists information about the supported locations for this service. Sample code:
*
@@ -2220,29 +2452,38 @@ public final RagEngineConfig getRagEngineConfig(GetRagEngineConfigRequest reques
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (VertexRagDataServiceClient vertexRagDataServiceClient =
* VertexRagDataServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : vertexRagDataServiceClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
+ * RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+ * RagDataSchema ragDataSchema = RagDataSchema.newBuilder().build();
+ * String ragDataSchemaId = "ragDataSchemaId-1094185826";
+ * RagDataSchema response =
+ * vertexRagDataServiceClient.createRagDataSchema(parent, ragDataSchema, ragDataSchemaId);
* }
* }
*
- * @param request The request object containing all of the parameters for the API call.
+ * @param parent Required. The resource name of the RagCorpus to create the RagDataSchema in.
+ * Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+ * @param ragDataSchema Required. The RagDataSchema to create.
+ * @param ragDataSchemaId Optional. The ID to use for the RagDataSchema, which will become the
+ * final component of the RagDataSchema's resource name if the user chooses to specify.
+ * Otherwise, RagDataSchema id will be generated by system.
+ * This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The
+ * first character must be a letter, the last could be a letter or a number.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
+ public final RagDataSchema createRagDataSchema(
+ RagCorpusName parent, RagDataSchema ragDataSchema, String ragDataSchemaId) {
+ CreateRagDataSchemaRequest request =
+ CreateRagDataSchemaRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRagDataSchema(ragDataSchema)
+ .setRagDataSchemaId(ragDataSchemaId)
+ .build();
+ return createRagDataSchema(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Creates a RagDataSchema.
*
* Sample code:
*
@@ -2254,30 +2495,38 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (VertexRagDataServiceClient vertexRagDataServiceClient =
* VertexRagDataServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The
+ * first character must be a letter, the last could be a letter or a number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable Sample code:
*
@@ -2289,36 +2538,26 @@ public final ListLocationsPagedResponse listLocations(ListLocationsRequest reque
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (VertexRagDataServiceClient vertexRagDataServiceClient =
* VertexRagDataServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
+ * CreateRagDataSchemaRequest request =
+ * CreateRagDataSchemaRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .setRagDataSchema(RagDataSchema.newBuilder().build())
+ * .setRagDataSchemaId("ragDataSchemaId-1094185826")
* .build();
- * while (true) {
- * ListLocationsResponse response =
- * vertexRagDataServiceClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
+ * RagDataSchema response = vertexRagDataServiceClient.createRagDataSchema(request);
* }
* }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
- public final UnaryCallable Sample code:
*
@@ -2330,21 +2569,27 @@ public final UnaryCallable Sample code:
*
@@ -2356,23 +2601,28 @@ public final Location getLocation(GetLocationRequest request) {
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (VertexRagDataServiceClient vertexRagDataServiceClient =
* VertexRagDataServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ * Batch Create one or more RagDataSchemas
*
* Sample code:
*
@@ -2384,11 +2634,1644 @@ public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The
+ * first character must be a letter, the last could be a letter or a number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata createRagMetadata(
+ RagFileName parent, RagMetadata ragMetadata, String ragMetadataId) {
+ CreateRagMetadataRequest request =
+ CreateRagMetadataRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setRagMetadata(ragMetadata)
+ .setRagMetadataId(ragMetadataId)
+ .build();
+ return createRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a RagMetadata.
+ *
+ * Sample code:
+ *
+ * This value should be up to 63 characters, and valid characters are /[a-z][0-9]-/. The
+ * first character must be a letter, the last could be a letter or a number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata createRagMetadata(
+ String parent, RagMetadata ragMetadata, String ragMetadataId) {
+ CreateRagMetadataRequest request =
+ CreateRagMetadataRequest.newBuilder()
+ .setParent(parent)
+ .setRagMetadata(ragMetadata)
+ .setRagMetadataId(ragMetadataId)
+ .build();
+ return createRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a RagMetadata.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SessionServiceClient sessionServiceClient = SessionServiceClient.create()) {
+ * String parent =
+ * ReasoningEngineName.of("[PROJECT]", "[LOCATION]", "[REASONING_ENGINE]").toString();
+ * Session session = Session.newBuilder().build();
+ * String sessionId = "sessionId607796817";
+ * Session response = sessionServiceClient.createSessionAsync(parent, session, sessionId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the location to create the session in. Format:
+ * `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
+ * @param session Required. The session to create.
+ * @param sessionId Optional. The user defined ID to use for session, which will become the final
+ * component of the session resource name. If not provided, Vertex AI will generate a value
+ * for this ID.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -2208,7 +2440,7 @@ public final RagEngineConfig getRagEngineConfig(GetRagEngineConfigRequest reques
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists information about the supported locations for this service.
+ * Creates a RagDataSchema.
*
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchCreateRagDataSchemasRequest request =
+ * BatchCreateRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .addAllRequests(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagDataSchemaName name =
+ * RagDataSchemaName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]");
+ * RagDataSchema response = vertexRagDataServiceClient.getRagDataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagDataSchema resource. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragDataSchemas/{rag_data_schema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagDataSchema getRagDataSchema(RagDataSchemaName name) {
+ GetRagDataSchemaRequest request =
+ GetRagDataSchemaRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRagDataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String name =
+ * RagDataSchemaName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString();
+ * RagDataSchema response = vertexRagDataServiceClient.getRagDataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagDataSchema resource. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragDataSchemas/{rag_data_schema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagDataSchema getRagDataSchema(String name) {
+ GetRagDataSchemaRequest request = GetRagDataSchemaRequest.newBuilder().setName(name).build();
+ return getRagDataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetRagDataSchemaRequest request =
+ * GetRagDataSchemaRequest.newBuilder()
+ * .setName(
+ * RagDataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * RagDataSchema response = vertexRagDataServiceClient.getRagDataSchema(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagDataSchema getRagDataSchema(GetRagDataSchemaRequest request) {
+ return getRagDataSchemaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetRagDataSchemaRequest request =
+ * GetRagDataSchemaRequest.newBuilder()
+ * .setName(
+ * RagDataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagCorpusName parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]");
+ * for (RagDataSchema element :
+ * vertexRagDataServiceClient.listRagDataSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the RagCorpus from which to list the
+ * RagDataSchemas. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagDataSchemasPagedResponse listRagDataSchemas(RagCorpusName parent) {
+ ListRagDataSchemasRequest request =
+ ListRagDataSchemasRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listRagDataSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagDataSchemas in a Location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String parent = RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString();
+ * for (RagDataSchema element :
+ * vertexRagDataServiceClient.listRagDataSchemas(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the RagCorpus from which to list the
+ * RagDataSchemas. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagDataSchemasPagedResponse listRagDataSchemas(String parent) {
+ ListRagDataSchemasRequest request =
+ ListRagDataSchemasRequest.newBuilder().setParent(parent).build();
+ return listRagDataSchemas(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagDataSchemas in a Location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagDataSchemasRequest request =
+ * ListRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (RagDataSchema element :
+ * vertexRagDataServiceClient.listRagDataSchemas(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagDataSchemasPagedResponse listRagDataSchemas(
+ ListRagDataSchemasRequest request) {
+ return listRagDataSchemasPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagDataSchemas in a Location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagDataSchemasRequest request =
+ * ListRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagDataSchemasRequest request =
+ * ListRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListRagDataSchemasResponse response =
+ * vertexRagDataServiceClient.listRagDataSchemasCallable().call(request);
+ * for (RagDataSchema element : response.getRagDataSchemasList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagDataSchemaName name =
+ * RagDataSchemaName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]");
+ * vertexRagDataServiceClient.deleteRagDataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagDataSchema resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragDataSchemas/{rag_data_schema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagDataSchema(RagDataSchemaName name) {
+ DeleteRagDataSchemaRequest request =
+ DeleteRagDataSchemaRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteRagDataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String name =
+ * RagDataSchemaName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString();
+ * vertexRagDataServiceClient.deleteRagDataSchema(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagDataSchema resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragDataSchemas/{rag_data_schema}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagDataSchema(String name) {
+ DeleteRagDataSchemaRequest request =
+ DeleteRagDataSchemaRequest.newBuilder().setName(name).build();
+ deleteRagDataSchema(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * DeleteRagDataSchemaRequest request =
+ * DeleteRagDataSchemaRequest.newBuilder()
+ * .setName(
+ * RagDataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * vertexRagDataServiceClient.deleteRagDataSchema(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagDataSchema(DeleteRagDataSchemaRequest request) {
+ deleteRagDataSchemaCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagDataSchema.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * DeleteRagDataSchemaRequest request =
+ * DeleteRagDataSchemaRequest.newBuilder()
+ * .setName(
+ * RagDataSchemaName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_DATA_SCHEMA]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagDataSchemasRequest request =
+ * BatchDeleteRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .addAllNames(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagDataSchemasRequest request =
+ * BatchDeleteRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .addAllNames(new ArrayList
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagDataSchemasRequest request =
+ * BatchDeleteRagDataSchemasRequest.newBuilder()
+ * .setParent(RagCorpusName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]").toString())
+ * .addAllNames(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagFileName parent = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
+ * RagMetadata ragMetadata = RagMetadata.newBuilder().build();
+ * String ragMetadataId = "ragMetadataId-818296094";
+ * RagMetadata response =
+ * vertexRagDataServiceClient.createRagMetadata(parent, ragMetadata, ragMetadataId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this metadata will be created. Format:
+ * `projects/{project_number}/locations/{location_id}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+ * @param ragMetadata Required. The metadata to create.
+ * @param ragMetadataId Optional. The ID to use for the metadata, which will become the final
+ * component of the metadata's resource name if the user chooses to specify. Otherwise,
+ * metadata id will be generated by system.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String parent =
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString();
+ * RagMetadata ragMetadata = RagMetadata.newBuilder().build();
+ * String ragMetadataId = "ragMetadataId-818296094";
+ * RagMetadata response =
+ * vertexRagDataServiceClient.createRagMetadata(parent, ragMetadata, ragMetadataId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this metadata will be created. Format:
+ * `projects/{project_number}/locations/{location_id}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+ * @param ragMetadata Required. The metadata to create.
+ * @param ragMetadataId Optional. The ID to use for the metadata, which will become the final
+ * component of the metadata's resource name if the user chooses to specify. Otherwise,
+ * metadata id will be generated by system.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * CreateRagMetadataRequest request =
+ * CreateRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .setRagMetadata(RagMetadata.newBuilder().build())
+ * .setRagMetadataId("ragMetadataId-818296094")
+ * .build();
+ * RagMetadata response = vertexRagDataServiceClient.createRagMetadata(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata createRagMetadata(CreateRagMetadataRequest request) {
+ return createRagMetadataCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * CreateRagMetadataRequest request =
+ * CreateRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .setRagMetadata(RagMetadata.newBuilder().build())
+ * .setRagMetadataId("ragMetadataId-818296094")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchCreateRagMetadataRequest request =
+ * BatchCreateRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture<
+ BatchCreateRagMetadataResponse, BatchCreateRagMetadataOperationMetadata>
+ batchCreateRagMetadataAsync(BatchCreateRagMetadataRequest request) {
+ return batchCreateRagMetadataOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch Create one or more RagMetadatas
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchCreateRagMetadataRequest request =
+ * BatchCreateRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ */
+ public final OperationCallable<
+ BatchCreateRagMetadataRequest,
+ BatchCreateRagMetadataResponse,
+ BatchCreateRagMetadataOperationMetadata>
+ batchCreateRagMetadataOperationCallable() {
+ return stub.batchCreateRagMetadataOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Batch Create one or more RagMetadatas
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchCreateRagMetadataRequest request =
+ * BatchCreateRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllRequests(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagMetadata ragMetadata = RagMetadata.newBuilder().build();
+ * RagMetadata response = vertexRagDataServiceClient.updateRagMetadata(ragMetadata);
+ * }
+ * }
+ *
+ * @param ragMetadata Required. The RagMetadata which replaces the resource on the server.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata updateRagMetadata(RagMetadata ragMetadata) {
+ UpdateRagMetadataRequest request =
+ UpdateRagMetadataRequest.newBuilder().setRagMetadata(ragMetadata).build();
+ return updateRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * UpdateRagMetadataRequest request =
+ * UpdateRagMetadataRequest.newBuilder()
+ * .setRagMetadata(RagMetadata.newBuilder().build())
+ * .build();
+ * RagMetadata response = vertexRagDataServiceClient.updateRagMetadata(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata updateRagMetadata(UpdateRagMetadataRequest request) {
+ return updateRagMetadataCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * UpdateRagMetadataRequest request =
+ * UpdateRagMetadataRequest.newBuilder()
+ * .setRagMetadata(RagMetadata.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagMetadataName name =
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]");
+ * RagMetadata response = vertexRagDataServiceClient.getRagMetadata(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagMetadata resource. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}/ragMetadata/{rag_metadata}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata getRagMetadata(RagMetadataName name) {
+ GetRagMetadataRequest request =
+ GetRagMetadataRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String name =
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString();
+ * RagMetadata response = vertexRagDataServiceClient.getRagMetadata(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagMetadata resource. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}/ragMetadata/{rag_metadata}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata getRagMetadata(String name) {
+ GetRagMetadataRequest request = GetRagMetadataRequest.newBuilder().setName(name).build();
+ return getRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetRagMetadataRequest request =
+ * GetRagMetadataRequest.newBuilder()
+ * .setName(
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString())
+ * .build();
+ * RagMetadata response = vertexRagDataServiceClient.getRagMetadata(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RagMetadata getRagMetadata(GetRagMetadataRequest request) {
+ return getRagMetadataCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetRagMetadataRequest request =
+ * GetRagMetadataRequest.newBuilder()
+ * .setName(
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagFileName parent = RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]");
+ * for (RagMetadata element : vertexRagDataServiceClient.listRagMetadata(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the RagFile from which to list the RagMetadata.
+ * Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagMetadataPagedResponse listRagMetadata(RagFileName parent) {
+ ListRagMetadataRequest request =
+ ListRagMetadataRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagMetadata in a RagFile.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String parent =
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]").toString();
+ * for (RagMetadata element : vertexRagDataServiceClient.listRagMetadata(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the RagFile from which to list the RagMetadata.
+ * Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagMetadataPagedResponse listRagMetadata(String parent) {
+ ListRagMetadataRequest request = ListRagMetadataRequest.newBuilder().setParent(parent).build();
+ return listRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagMetadata in a RagFile.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagMetadataRequest request =
+ * ListRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (RagMetadata element : vertexRagDataServiceClient.listRagMetadata(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListRagMetadataPagedResponse listRagMetadata(ListRagMetadataRequest request) {
+ return listRagMetadataPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists RagMetadata in a RagFile.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagMetadataRequest request =
+ * ListRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListRagMetadataRequest request =
+ * ListRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListRagMetadataResponse response =
+ * vertexRagDataServiceClient.listRagMetadataCallable().call(request);
+ * for (RagMetadata element : response.getRagMetadataList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * RagMetadataName name =
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]");
+ * vertexRagDataServiceClient.deleteRagMetadata(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagMetadata resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}/ragMetadata/{rag_metadata}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagMetadata(RagMetadataName name) {
+ DeleteRagMetadataRequest request =
+ DeleteRagMetadataRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * String name =
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString();
+ * vertexRagDataServiceClient.deleteRagMetadata(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the RagMetadata resource to be deleted. Format:
+ * `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}/ragMetadata/{rag_metadata}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagMetadata(String name) {
+ DeleteRagMetadataRequest request = DeleteRagMetadataRequest.newBuilder().setName(name).build();
+ deleteRagMetadata(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * DeleteRagMetadataRequest request =
+ * DeleteRagMetadataRequest.newBuilder()
+ * .setName(
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString())
+ * .build();
+ * vertexRagDataServiceClient.deleteRagMetadata(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteRagMetadata(DeleteRagMetadataRequest request) {
+ deleteRagMetadataCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a RagMetadata.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * DeleteRagMetadataRequest request =
+ * DeleteRagMetadataRequest.newBuilder()
+ * .setName(
+ * RagMetadataName.of(
+ * "[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]", "[RAG_METADATA]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagMetadataRequest request =
+ * BatchDeleteRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllNames(new ArrayList
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagMetadataRequest request =
+ * BatchDeleteRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllNames(new ArrayList
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * BatchDeleteRagMetadataRequest request =
+ * BatchDeleteRagMetadataRequest.newBuilder()
+ * .setParent(
+ * RagFileName.of("[PROJECT]", "[LOCATION]", "[RAG_CORPUS]", "[RAG_FILE]")
+ * .toString())
+ * .addAllNames(new ArrayList
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : vertexRagDataServiceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * vertexRagDataServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = vertexRagDataServiceClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VertexRagDataServiceClient vertexRagDataServiceClient =
+ * VertexRagDataServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * EndpointName.ofProjectLocationEndpointName(
+ * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
* .toString())
* .setPolicy(Policy.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
@@ -2766,6 +4649,163 @@ protected ListRagFilesFixedSizeCollection createCollection(
}
}
+ public static class ListRagDataSchemasPagedResponse
+ extends AbstractPagedListResponse<
+ ListRagDataSchemasRequest,
+ ListRagDataSchemasResponse,
+ RagDataSchema,
+ ListRagDataSchemasPage,
+ ListRagDataSchemasFixedSizeCollection> {
+
+ public static ApiFuture