The API is designed to be the canonical source for machine-readable access to Google's + * developer documentation. + * + *
A typical use case is to first use + * [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks] + * to find relevant page URIs based on a query, and then use + * [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] + * or + * [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] + * to fetch the full content of the top results. + * + *
All document content is provided in Markdown format. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * DocumentName name = DocumentName.of("[DOCUMENT]");
+ * Document response = developerKnowledgeClient.getDocument(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the DeveloperKnowledgeClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
SearchDocumentChunks |
+ * Searches for developer knowledge across Google's developer documentation. Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s based on the user's query. There may be many chunks from the same [Document][google.developers.knowledge.v1.Document]. To retrieve full documents, use [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] with the [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] returned in the [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results]. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetDocument |
+ * Retrieves a single document with its full Markdown content. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
BatchGetDocuments |
+ * Retrieves multiple documents, each with its full Markdown content. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of DeveloperKnowledgeSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@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
+ * DeveloperKnowledgeSettings developerKnowledgeSettings =
+ * DeveloperKnowledgeSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DeveloperKnowledgeClient developerKnowledgeClient =
+ * DeveloperKnowledgeClient.create(developerKnowledgeSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@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
+ * DeveloperKnowledgeSettings developerKnowledgeSettings =
+ * DeveloperKnowledgeSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DeveloperKnowledgeClient developerKnowledgeClient =
+ * DeveloperKnowledgeClient.create(developerKnowledgeSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@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
+ * DeveloperKnowledgeSettings developerKnowledgeSettings =
+ * DeveloperKnowledgeSettings.newHttpJsonBuilder().build();
+ * DeveloperKnowledgeClient developerKnowledgeClient =
+ * DeveloperKnowledgeClient.create(developerKnowledgeSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DeveloperKnowledgeClient implements BackgroundResource { + private final DeveloperKnowledgeSettings settings; + private final DeveloperKnowledgeStub stub; + + /** Constructs an instance of DeveloperKnowledgeClient with default settings. */ + public static final DeveloperKnowledgeClient create() throws IOException { + return create(DeveloperKnowledgeSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DeveloperKnowledgeClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DeveloperKnowledgeClient create(DeveloperKnowledgeSettings settings) + throws IOException { + return new DeveloperKnowledgeClient(settings); + } + + /** + * Constructs an instance of DeveloperKnowledgeClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(DeveloperKnowledgeSettings). + */ + public static final DeveloperKnowledgeClient create(DeveloperKnowledgeStub stub) { + return new DeveloperKnowledgeClient(stub); + } + + /** + * Constructs an instance of DeveloperKnowledgeClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected DeveloperKnowledgeClient(DeveloperKnowledgeSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DeveloperKnowledgeStubSettings) settings.getStubSettings()).createStub(); + } + + protected DeveloperKnowledgeClient(DeveloperKnowledgeStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DeveloperKnowledgeSettings getSettings() { + return settings; + } + + public DeveloperKnowledgeStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Searches for developer knowledge across Google's developer documentation. Returns + * [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s based on the user's query. There + * may be many chunks from the same [Document][google.developers.knowledge.v1.Document]. To + * retrieve full documents, use + * [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] + * or + * [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] + * with the [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] returned + * in the + * [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results]. + * + *
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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * SearchDocumentChunksRequest request =
+ * SearchDocumentChunksRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (DocumentChunk element :
+ * developerKnowledgeClient.searchDocumentChunks(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 SearchDocumentChunksPagedResponse searchDocumentChunks(
+ SearchDocumentChunksRequest request) {
+ return searchDocumentChunksPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for developer knowledge across Google's developer documentation. Returns
+ * [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s based on the user's query. There
+ * may be many chunks from the same [Document][google.developers.knowledge.v1.Document]. To
+ * retrieve full documents, use
+ * [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument]
+ * or
+ * [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments]
+ * with the [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] returned
+ * in the
+ * [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results].
+ *
+ * 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * SearchDocumentChunksRequest request =
+ * SearchDocumentChunksRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future =
+ * developerKnowledgeClient.searchDocumentChunksPagedCallable().futureCall(request);
+ * // Do something.
+ * for (DocumentChunk element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * SearchDocumentChunksRequest request =
+ * SearchDocumentChunksRequest.newBuilder()
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * SearchDocumentChunksResponse response =
+ * developerKnowledgeClient.searchDocumentChunksCallable().call(request);
+ * for (DocumentChunk element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * DocumentName name = DocumentName.of("[DOCUMENT]");
+ * Document response = developerKnowledgeClient.getDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Specifies the name of the document to retrieve. Format:
+ * `documents/{uri_without_scheme}` Example:
+ * `documents/docs.cloud.google.com/storage/docs/creating-buckets`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Document getDocument(DocumentName name) {
+ GetDocumentRequest request =
+ GetDocumentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single document with its full Markdown content.
+ *
+ * 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * String name = DocumentName.of("[DOCUMENT]").toString();
+ * Document response = developerKnowledgeClient.getDocument(name);
+ * }
+ * }
+ *
+ * @param name Required. Specifies the name of the document to retrieve. Format:
+ * `documents/{uri_without_scheme}` Example:
+ * `documents/docs.cloud.google.com/storage/docs/creating-buckets`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Document getDocument(String name) {
+ GetDocumentRequest request = GetDocumentRequest.newBuilder().setName(name).build();
+ return getDocument(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single document with its full Markdown content.
+ *
+ * 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * GetDocumentRequest request =
+ * GetDocumentRequest.newBuilder()
+ * .setName(DocumentName.of("[DOCUMENT]").toString())
+ * .setView(DocumentView.forNumber(0))
+ * .build();
+ * Document response = developerKnowledgeClient.getDocument(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 Document getDocument(GetDocumentRequest request) {
+ return getDocumentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a single document with its full Markdown content.
+ *
+ * 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * GetDocumentRequest request =
+ * GetDocumentRequest.newBuilder()
+ * .setName(DocumentName.of("[DOCUMENT]").toString())
+ * .setView(DocumentView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * developerKnowledgeClient.getDocumentCallable().futureCall(request);
+ * // Do something.
+ * Document response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * BatchGetDocumentsRequest request =
+ * BatchGetDocumentsRequest.newBuilder()
+ * .addAllNames(new ArrayList())
+ * .setView(DocumentView.forNumber(0))
+ * .build();
+ * BatchGetDocumentsResponse response = developerKnowledgeClient.batchGetDocuments(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 BatchGetDocumentsResponse batchGetDocuments(BatchGetDocumentsRequest request) {
+ return batchGetDocumentsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves multiple documents, each with its full Markdown content.
+ *
+ * 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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * BatchGetDocumentsRequest request =
+ * BatchGetDocumentsRequest.newBuilder()
+ * .addAllNames(new ArrayList())
+ * .setView(DocumentView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * developerKnowledgeClient.batchGetDocumentsCallable().futureCall(request);
+ * // Do something.
+ * BatchGetDocumentsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getDocument: + * + *
{@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
+ * DeveloperKnowledgeSettings.Builder developerKnowledgeSettingsBuilder =
+ * DeveloperKnowledgeSettings.newBuilder();
+ * developerKnowledgeSettingsBuilder
+ * .getDocumentSettings()
+ * .setRetrySettings(
+ * developerKnowledgeSettingsBuilder
+ * .getDocumentSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * DeveloperKnowledgeSettings developerKnowledgeSettings =
+ * developerKnowledgeSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@Generated("by gapic-generator-java")
+public class DeveloperKnowledgeSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= DeveloperKnowledgeClient =======================
+ *
+ * Service Description: The Developer Knowledge API provides programmatic access to Google's
+ * public developer documentation, enabling you to integrate this knowledge base into your own
+ * applications and workflows.
+ *
+ * The API is designed to be the canonical source for machine-readable access to Google's
+ * developer documentation.
+ *
+ * A typical use case is to first use
+ * [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks]
+ * to find relevant page URIs based on a query, and then use
+ * [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument]
+ * or
+ * [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments]
+ * to fetch the full content of the top results.
+ *
+ * All document content is provided in Markdown format.
+ *
+ * Sample for DeveloperKnowledgeClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class DeveloperKnowledgeStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getDocument:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcDeveloperKnowledgeCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcDeveloperKnowledgeStub extends DeveloperKnowledgeStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class HttpJsonDeveloperKnowledgeCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class HttpJsonDeveloperKnowledgeStub extends DeveloperKnowledgeStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor<
+ SearchDocumentChunksRequest, SearchDocumentChunksResponse>
+ searchDocumentChunksMethodDescriptor =
+ ApiMethodDescriptor
+ .{@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 (DeveloperKnowledgeClient developerKnowledgeClient = DeveloperKnowledgeClient.create()) {
+ * DocumentName name = DocumentName.of("[DOCUMENT]");
+ * Document response = developerKnowledgeClient.getDocument(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.developers.knowledge.v1;
+
+import javax.annotation.Generated;
diff --git a/java-developerknowledge/google-cloud-developer-knowledge/src/main/java/com/google/developers/knowledge/v1/stub/DeveloperKnowledgeStub.java b/java-developerknowledge/google-cloud-developer-knowledge/src/main/java/com/google/developers/knowledge/v1/stub/DeveloperKnowledgeStub.java
new file mode 100644
index 000000000000..47aa43ce0ba9
--- /dev/null
+++ b/java-developerknowledge/google-cloud-developer-knowledge/src/main/java/com/google/developers/knowledge/v1/stub/DeveloperKnowledgeStub.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.developers.knowledge.v1.stub;
+
+import static com.google.developers.knowledge.v1.DeveloperKnowledgeClient.SearchDocumentChunksPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.developers.knowledge.v1.BatchGetDocumentsRequest;
+import com.google.developers.knowledge.v1.BatchGetDocumentsResponse;
+import com.google.developers.knowledge.v1.Document;
+import com.google.developers.knowledge.v1.GetDocumentRequest;
+import com.google.developers.knowledge.v1.SearchDocumentChunksRequest;
+import com.google.developers.knowledge.v1.SearchDocumentChunksResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the DeveloperKnowledge service API.
+ *
+ *
+ *
+ *
+ * {@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
+ * DeveloperKnowledgeStubSettings.Builder developerKnowledgeSettingsBuilder =
+ * DeveloperKnowledgeStubSettings.newBuilder();
+ * developerKnowledgeSettingsBuilder
+ * .getDocumentSettings()
+ * .setRetrySettings(
+ * developerKnowledgeSettingsBuilder
+ * .getDocumentSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * DeveloperKnowledgeStubSettings developerKnowledgeSettings =
+ * developerKnowledgeSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class DeveloperKnowledgeStubSettings extends StubSettings