diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java index 929943b2ce5b..eeead6d9f668 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClient.java @@ -18,10 +18,14 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.stub.EntityTypesStub; @@ -31,6 +35,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; @@ -168,6 +173,36 @@ * * * + *

ExportEntityTypes + *

Exports the selected entity types. + * + *

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.

+ * + * + * + * + *

ImportEntityTypes + *

Imports the specified entitytypes into the agent. + * + *

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.

+ * + * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -254,6 +289,8 @@ public class EntityTypesClient implements BackgroundResource { private final EntityTypesSettings settings; private final EntityTypesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of EntityTypesClient with default settings. */ public static final EntityTypesClient create() throws IOException { @@ -284,11 +321,17 @@ public static final EntityTypesClient create(EntityTypesStub stub) { protected EntityTypesClient(EntityTypesSettings settings) throws IOException { this.settings = settings; this.stub = ((EntityTypesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected EntityTypesClient(EntityTypesStub stub) { this.settings = null; this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final EntityTypesSettings getSettings() { @@ -299,6 +342,23 @@ public EntityTypesStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves the specified entity type. @@ -956,6 +1016,195 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest return stub.listEntityTypesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ExportEntityTypesResponse response = entityTypesClient.exportEntityTypesAsync(request).get();
+   * }
+   * }
+ * + * @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 + exportEntityTypesAsync(ExportEntityTypesRequest request) { + return exportEntityTypesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   OperationFuture future =
+   *       entityTypesClient.exportEntityTypesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportEntityTypesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return stub.exportEntityTypesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.exportEntityTypesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportEntityTypesCallable() { + return stub.exportEntityTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ImportEntityTypesResponse response = entityTypesClient.importEntityTypesAsync(request).get();
+   * }
+   * }
+ * + * @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 + importEntityTypesAsync(ImportEntityTypesRequest request) { + return importEntityTypesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       entityTypesClient.importEntityTypesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportEntityTypesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return stub.importEntityTypesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.importEntityTypesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importEntityTypesCallable() { + return stub.importEntityTypesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java index 0b88b2d2a1a3..17c71f6e85cb 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -36,6 +37,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -107,6 +109,30 @@ public UnaryCallSettings deleteEntityTypeSetting return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); } + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings exportEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).exportEntityTypesSettings(); + } + + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return ((EntityTypesStubSettings) getStubSettings()).exportEntityTypesOperationSettings(); + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public UnaryCallSettings importEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).importEntityTypesSettings(); + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return ((EntityTypesStubSettings) getStubSettings()).importEntityTypesOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -261,6 +287,32 @@ public UnaryCallSettings.Builder deleteEntityTyp return getStubSettingsBuilder().listEntityTypesSettings(); } + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings.Builder + exportEntityTypesSettings() { + return getStubSettingsBuilder().exportEntityTypesSettings(); + } + + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return getStubSettingsBuilder().exportEntityTypesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public UnaryCallSettings.Builder + importEntityTypesSettings() { + return getStubSettingsBuilder().importEntityTypesSettings(); + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return getStubSettingsBuilder().importEntityTypesOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java index 633d1e94d663..5383bfdb9805 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsClient.java @@ -24,6 +24,7 @@ import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.stub.SessionsStub; import com.google.cloud.dialogflow.cx.v3.stub.SessionsStubSettings; @@ -93,6 +94,16 @@ * * * + *

ServerStreamingDetectIntent + *

Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) earlier in a single request. + * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • serverStreamingDetectIntentCallable() + *

+ * + * + * *

StreamingDetectIntent *

Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST). *

Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). @@ -354,6 +365,45 @@ public final UnaryCallable detectInte return stub.detectIntentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Processes a natural language query and returns structured, actionable data as a result through + * server-side streaming. Server-side streaming allows Dialogflow to send [partial + * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) + * earlier in a single request. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ServerStream stream =
+   *       sessionsClient.serverStreamingDetectIntentCallable().call(request);
+   *   for (DetectIntentResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return stub.serverStreamingDetectIntentCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Processes a natural language query in audio format in a streaming fashion and returns diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java index 94ab1c635a31..875f0f95c853 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -84,6 +85,12 @@ public UnaryCallSettings detectIntent return ((SessionsStubSettings) getStubSettings()).detectIntentSettings(); } + /** Returns the object with the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings + serverStreamingDetectIntentSettings() { + return ((SessionsStubSettings) getStubSettings()).serverStreamingDetectIntentSettings(); + } + /** Returns the object with the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings streamingDetectIntentSettings() { @@ -237,6 +244,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().detectIntentSettings(); } + /** Returns the builder for the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings() { + return getStubSettingsBuilder().serverStreamingDetectIntentSettings(); + } + /** Returns the builder for the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json index 476c9f54b51e..e9bdb3e3a0ab 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/gapic_metadata.json @@ -106,12 +106,18 @@ "DeleteEntityType": { "methods": ["deleteEntityType", "deleteEntityType", "deleteEntityType", "deleteEntityTypeCallable"] }, + "ExportEntityTypes": { + "methods": ["exportEntityTypesAsync", "exportEntityTypesOperationCallable", "exportEntityTypesCallable"] + }, "GetEntityType": { "methods": ["getEntityType", "getEntityType", "getEntityType", "getEntityTypeCallable"] }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "ImportEntityTypes": { + "methods": ["importEntityTypesAsync", "importEntityTypesOperationCallable", "importEntityTypesCallable"] + }, "ListEntityTypes": { "methods": ["listEntityTypes", "listEntityTypes", "listEntityTypes", "listEntityTypesPagedCallable", "listEntityTypesCallable"] }, @@ -394,6 +400,9 @@ "MatchIntent": { "methods": ["matchIntent", "matchIntentCallable"] }, + "ServerStreamingDetectIntent": { + "methods": ["serverStreamingDetectIntentCallable"] + }, "StreamingDetectIntent": { "methods": ["streamingDetectIntentCallable"] }, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java index 8d2c9e50aae5..e52bc18aced6 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStub.java @@ -20,11 +20,18 @@ import static com.google.cloud.dialogflow.cx.v3.EntityTypesClient.ListLocationsPagedResponse; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.EntityType; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; @@ -32,6 +39,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; import javax.annotation.Generated; @@ -44,6 +53,14 @@ @Generated("by gapic-generator-java") public abstract class EntityTypesStub implements BackgroundResource { + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + public UnaryCallable getEntityTypeCallable() { throw new UnsupportedOperationException("Not implemented: getEntityTypeCallable()"); } @@ -69,6 +86,28 @@ public UnaryCallable listEntity throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); } + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: exportEntityTypesOperationCallable()"); + } + + public UnaryCallable exportEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: exportEntityTypesCallable()"); + } + + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importEntityTypesOperationCallable()"); + } + + public UnaryCallable importEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: importEntityTypesCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java index cb8649cdd765..c773fae40cae 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/EntityTypesStubSettings.java @@ -28,13 +28,17 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; import com.google.api.gax.httpjson.GaxHttpJsonProperties; import com.google.api.gax.httpjson.HttpJsonTransportChannel; import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -47,7 +51,13 @@ import com.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.EntityType; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; @@ -59,6 +69,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -118,6 +129,14 @@ public class EntityTypesStubSettings extends StubSettings listEntityTypesSettings; + private final UnaryCallSettings exportEntityTypesSettings; + private final OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings; + private final UnaryCallSettings importEntityTypesSettings; + private final OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -259,6 +278,30 @@ public UnaryCallSettings deleteEntityTypeSetting return listEntityTypesSettings; } + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings exportEntityTypesSettings() { + return exportEntityTypesSettings; + } + + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return exportEntityTypesOperationSettings; + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public UnaryCallSettings importEntityTypesSettings() { + return importEntityTypesSettings; + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return importEntityTypesOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -396,6 +439,12 @@ protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { updateEntityTypeSettings = settingsBuilder.updateEntityTypeSettings().build(); deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build(); listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); + exportEntityTypesSettings = settingsBuilder.exportEntityTypesSettings().build(); + exportEntityTypesOperationSettings = + settingsBuilder.exportEntityTypesOperationSettings().build(); + importEntityTypesSettings = settingsBuilder.importEntityTypesSettings().build(); + importEntityTypesOperationSettings = + settingsBuilder.importEntityTypesOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -413,6 +462,16 @@ public static class Builder extends StubSettings.Builder listEntityTypesSettings; + private final UnaryCallSettings.Builder + exportEntityTypesSettings; + private final OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings; + private final UnaryCallSettings.Builder + importEntityTypesSettings; + private final OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -460,6 +519,10 @@ protected Builder(ClientContext clientContext) { updateEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); + exportEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportEntityTypesOperationSettings = OperationCallSettings.newBuilder(); + importEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importEntityTypesOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -470,6 +533,8 @@ protected Builder(ClientContext clientContext) { updateEntityTypeSettings, deleteEntityTypeSettings, listEntityTypesSettings, + exportEntityTypesSettings, + importEntityTypesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -483,6 +548,10 @@ protected Builder(EntityTypesStubSettings settings) { updateEntityTypeSettings = settings.updateEntityTypeSettings.toBuilder(); deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder(); listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); + exportEntityTypesSettings = settings.exportEntityTypesSettings.toBuilder(); + exportEntityTypesOperationSettings = settings.exportEntityTypesOperationSettings.toBuilder(); + importEntityTypesSettings = settings.importEntityTypesSettings.toBuilder(); + importEntityTypesOperationSettings = settings.importEntityTypesOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -493,6 +562,8 @@ protected Builder(EntityTypesStubSettings settings) { updateEntityTypeSettings, deleteEntityTypeSettings, listEntityTypesSettings, + exportEntityTypesSettings, + importEntityTypesSettings, listLocationsSettings, getLocationSettings); } @@ -547,6 +618,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .exportEntityTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importEntityTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -557,6 +638,58 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .exportEntityTypesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExportEntityTypesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportEntityTypesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importEntityTypesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportEntityTypesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ImportEntityTypesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -604,6 +737,36 @@ public UnaryCallSettings.Builder deleteEntityTyp return listEntityTypesSettings; } + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings.Builder + exportEntityTypesSettings() { + return exportEntityTypesSettings; + } + + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return exportEntityTypesOperationSettings; + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public UnaryCallSettings.Builder + importEntityTypesSettings() { + return importEntityTypesSettings; + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return importEntityTypesOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java index 1d3a7c50d510..cd65b888c2d7 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcEntityTypesStub.java @@ -24,12 +24,19 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.EntityType; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; @@ -37,6 +44,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; @@ -104,6 +112,26 @@ public class GrpcEntityTypesStub extends EntityTypesStub { ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + exportEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ExportEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ImportEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -131,6 +159,14 @@ public class GrpcEntityTypesStub extends EntityTypesStub { listEntityTypesCallable; private final UnaryCallable listEntityTypesPagedCallable; + private final UnaryCallable exportEntityTypesCallable; + private final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable; + private final UnaryCallable importEntityTypesCallable; + private final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -230,6 +266,26 @@ protected GrpcEntityTypesStub( return builder.build(); }) .build(); + GrpcCallSettings exportEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings importEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -269,6 +325,28 @@ protected GrpcEntityTypesStub( this.listEntityTypesPagedCallable = callableFactory.createPagedCallable( listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.exportEntityTypesCallable = + callableFactory.createUnaryCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesSettings(), + clientContext); + this.exportEntityTypesOperationCallable = + callableFactory.createOperationCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesOperationSettings(), + clientContext, + operationsStub); + this.importEntityTypesCallable = + callableFactory.createUnaryCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesSettings(), + clientContext); + this.importEntityTypesOperationCallable = + callableFactory.createOperationCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -318,6 +396,30 @@ public UnaryCallable listEntity return listEntityTypesPagedCallable; } + @Override + public UnaryCallable exportEntityTypesCallable() { + return exportEntityTypesCallable; + } + + @Override + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return exportEntityTypesOperationCallable; + } + + @Override + public UnaryCallable importEntityTypesCallable() { + return importEntityTypesCallable; + } + + @Override + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return importEntityTypesOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java index f83b85c1e810..da836ce9c07c 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcSessionsStub.java @@ -25,6 +25,7 @@ import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; @@ -65,6 +66,17 @@ public class GrpcSessionsStub extends SessionsStub { ProtoUtils.marshaller(DetectIntentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + serverStreamingDetectIntentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3.Sessions/ServerStreamingDetectIntent") + .setRequestMarshaller(ProtoUtils.marshaller(DetectIntentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DetectIntentResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor streamingDetectIntentMethodDescriptor = MethodDescriptor.newBuilder() @@ -127,6 +139,8 @@ public class GrpcSessionsStub extends SessionsStub { .build(); private final UnaryCallable detectIntentCallable; + private final ServerStreamingCallable + serverStreamingDetectIntentCallable; private final BidiStreamingCallable streamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; @@ -187,6 +201,17 @@ protected GrpcSessionsStub( return builder.build(); }) .build(); + GrpcCallSettings + serverStreamingDetectIntentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(serverStreamingDetectIntentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); GrpcCallSettings streamingDetectIntentTransportSettings = GrpcCallSettings @@ -250,6 +275,11 @@ protected GrpcSessionsStub( this.detectIntentCallable = callableFactory.createUnaryCallable( detectIntentTransportSettings, settings.detectIntentSettings(), clientContext); + this.serverStreamingDetectIntentCallable = + callableFactory.createServerStreamingCallable( + serverStreamingDetectIntentTransportSettings, + settings.serverStreamingDetectIntentSettings(), + clientContext); this.streamingDetectIntentCallable = callableFactory.createBidiStreamingCallable( streamingDetectIntentTransportSettings, @@ -289,6 +319,12 @@ public UnaryCallable detectIntentCall return detectIntentCallable; } + @Override + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return serverStreamingDetectIntentCallable; + } + @Override public BidiStreamingCallable streamingDetectIntentCallable() { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java index 0b65e120b0bd..69a385ac7623 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonEntityTypesStub.java @@ -19,23 +19,33 @@ import static com.google.cloud.dialogflow.cx.v3.EntityTypesClient.ListEntityTypesPagedResponse; import static com.google.cloud.dialogflow.cx.v3.EntityTypesClient.ListLocationsPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.httpjson.ApiMethodDescriptor; import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; import com.google.api.gax.httpjson.ProtoMessageResponseParser; import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3.EntityType; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3.UpdateEntityTypeRequest; @@ -43,6 +53,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; @@ -62,7 +74,13 @@ @Generated("by gapic-generator-java") @BetaApi public class HttpJsonEntityTypesStub extends EntityTypesStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportEntityTypesResponse.getDescriptor()) + .add(ExportEntityTypesResponse.getDescriptor()) + .add(ImportEntityTypesMetadata.getDescriptor()) + .add(ExportEntityTypesMetadata.getDescriptor()) + .build(); private static final ApiMethodDescriptor getEntityTypeMethodDescriptor = @@ -253,6 +271,86 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); + private static final ApiMethodDescriptor + exportEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ExportEntityTypes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:export", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportEntityTypesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + importEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3.EntityTypes/ImportEntityTypes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportEntityTypesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -329,12 +427,21 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { listEntityTypesCallable; private final UnaryCallable listEntityTypesPagedCallable; + private final UnaryCallable exportEntityTypesCallable; + private final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable; + private final UnaryCallable importEntityTypesCallable; + private final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonEntityTypesStub create(EntityTypesStubSettings settings) @@ -375,6 +482,40 @@ protected HttpJsonEntityTypesStub( HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v3/{name=projects/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost("/v3/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3/{name=projects/*/locations/*}/operations") + .build()) + .build()) + .build()); HttpJsonCallSettings getEntityTypeTransportSettings = HttpJsonCallSettings.newBuilder() @@ -433,6 +574,28 @@ protected HttpJsonEntityTypesStub( return builder.build(); }) .build(); + HttpJsonCallSettings exportEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -475,6 +638,28 @@ protected HttpJsonEntityTypesStub( this.listEntityTypesPagedCallable = callableFactory.createPagedCallable( listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.exportEntityTypesCallable = + callableFactory.createUnaryCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesSettings(), + clientContext); + this.exportEntityTypesOperationCallable = + callableFactory.createOperationCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.importEntityTypesCallable = + callableFactory.createUnaryCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesSettings(), + clientContext); + this.importEntityTypesOperationCallable = + callableFactory.createOperationCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -497,11 +682,17 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateEntityTypeMethodDescriptor); methodDescriptors.add(deleteEntityTypeMethodDescriptor); methodDescriptors.add(listEntityTypesMethodDescriptor); + methodDescriptors.add(exportEntityTypesMethodDescriptor); + methodDescriptors.add(importEntityTypesMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -533,6 +724,30 @@ public UnaryCallable listEntity return listEntityTypesPagedCallable; } + @Override + public UnaryCallable exportEntityTypesCallable() { + return exportEntityTypesCallable; + } + + @Override + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return exportEntityTypesOperationCallable; + } + + @Override + public UnaryCallable importEntityTypesCallable() { + return importEntityTypesCallable; + } + + @Override + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return importEntityTypesOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java index 892f5c86b3fe..aae285053f0e 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/HttpJsonSessionsStub.java @@ -31,6 +31,7 @@ import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; @@ -105,6 +106,46 @@ public class HttpJsonSessionsStub extends SessionsStub { .build()) .build(); + private static final ApiMethodDescriptor + serverStreamingDetectIntentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3.Sessions/ServerStreamingDetectIntent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3/{session=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "session", request.getSession()); + return fields; + }) + .setAdditionalPaths( + "/v3/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:serverStreamingDetectIntent") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSession().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DetectIntentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor matchIntentMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -292,6 +333,8 @@ public class HttpJsonSessionsStub extends SessionsStub { .build(); private final UnaryCallable detectIntentCallable; + private final ServerStreamingCallable + serverStreamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; private final UnaryCallable @@ -353,6 +396,18 @@ protected HttpJsonSessionsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + serverStreamingDetectIntentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(serverStreamingDetectIntentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); HttpJsonCallSettings matchIntentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(matchIntentMethodDescriptor) @@ -417,6 +472,11 @@ protected HttpJsonSessionsStub( this.detectIntentCallable = callableFactory.createUnaryCallable( detectIntentTransportSettings, settings.detectIntentSettings(), clientContext); + this.serverStreamingDetectIntentCallable = + callableFactory.createServerStreamingCallable( + serverStreamingDetectIntentTransportSettings, + settings.serverStreamingDetectIntentSettings(), + clientContext); this.matchIntentCallable = callableFactory.createUnaryCallable( matchIntentTransportSettings, settings.matchIntentSettings(), clientContext); @@ -446,6 +506,7 @@ protected HttpJsonSessionsStub( public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(detectIntentMethodDescriptor); + methodDescriptors.add(serverStreamingDetectIntentMethodDescriptor); methodDescriptors.add(matchIntentMethodDescriptor); methodDescriptors.add(fulfillIntentMethodDescriptor); methodDescriptors.add(submitAnswerFeedbackMethodDescriptor); @@ -459,6 +520,12 @@ public UnaryCallable detectIntentCall return detectIntentCallable; } + @Override + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return serverStreamingDetectIntentCallable; + } + @Override public UnaryCallable matchIntentCallable() { return matchIntentCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java index b3ef418d5c8e..e8228871a3e9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStub.java @@ -20,6 +20,7 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; @@ -50,6 +51,12 @@ public UnaryCallable detectIntentCall throw new UnsupportedOperationException("Not implemented: detectIntentCallable()"); } + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + throw new UnsupportedOperationException( + "Not implemented: serverStreamingDetectIntentCallable()"); + } + public BidiStreamingCallable streamingDetectIntentCallable() { throw new UnsupportedOperationException("Not implemented: streamingDetectIntentCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java index 83cd215fbd1d..fbd6ab9fab52 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/SessionsStubSettings.java @@ -38,6 +38,7 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.StubSettings; @@ -113,6 +114,8 @@ public class SessionsStubSettings extends StubSettings { .build(); private final UnaryCallSettings detectIntentSettings; + private final ServerStreamingCallSettings + serverStreamingDetectIntentSettings; private final StreamingCallSettings streamingDetectIntentSettings; private final UnaryCallSettings matchIntentSettings; @@ -183,6 +186,12 @@ public UnaryCallSettings detectIntent return detectIntentSettings; } + /** Returns the object with the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings + serverStreamingDetectIntentSettings() { + return serverStreamingDetectIntentSettings; + } + /** Returns the object with the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings streamingDetectIntentSettings() { @@ -336,6 +345,8 @@ protected SessionsStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); detectIntentSettings = settingsBuilder.detectIntentSettings().build(); + serverStreamingDetectIntentSettings = + settingsBuilder.serverStreamingDetectIntentSettings().build(); streamingDetectIntentSettings = settingsBuilder.streamingDetectIntentSettings().build(); matchIntentSettings = settingsBuilder.matchIntentSettings().build(); fulfillIntentSettings = settingsBuilder.fulfillIntentSettings().build(); @@ -349,6 +360,8 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders; private final UnaryCallSettings.Builder detectIntentSettings; + private final ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings; private final StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> streamingDetectIntentSettings; @@ -425,6 +438,7 @@ protected Builder(ClientContext clientContext) { super(clientContext); detectIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + serverStreamingDetectIntentSettings = ServerStreamingCallSettings.newBuilder(); streamingDetectIntentSettings = StreamingCallSettings.newBuilder(); matchIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); fulfillIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -447,6 +461,8 @@ protected Builder(SessionsStubSettings settings) { super(settings); detectIntentSettings = settings.detectIntentSettings.toBuilder(); + serverStreamingDetectIntentSettings = + settings.serverStreamingDetectIntentSettings.toBuilder(); streamingDetectIntentSettings = settings.streamingDetectIntentSettings.toBuilder(); matchIntentSettings = settings.matchIntentSettings.toBuilder(); fulfillIntentSettings = settings.fulfillIntentSettings.toBuilder(); @@ -494,6 +510,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + builder + .serverStreamingDetectIntentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + builder .matchIntentSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -543,6 +564,12 @@ public Builder applyToAllUnaryMethods( return detectIntentSettings; } + /** Returns the builder for the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings() { + return serverStreamingDetectIntentSettings; + } + /** Returns the builder for the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java index f48f9aa67548..96ecdd7615bd 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClient.java @@ -20,9 +20,12 @@ import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; import com.google.api.gax.paging.AbstractPage; import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.stub.EntityTypesStub; @@ -32,6 +35,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; import java.io.IOException; @@ -168,6 +172,36 @@ * * * + *

ExportEntityTypes + *

Exports the selected entity types. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • exportEntityTypesAsync(ExportEntityTypesRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • exportEntityTypesOperationCallable() + *

  • exportEntityTypesCallable() + *

+ * + * + * + *

ImportEntityTypes + *

Imports the specified entitytypes into the agent. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • importEntityTypesAsync(ImportEntityTypesRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • importEntityTypesOperationCallable() + *

  • importEntityTypesCallable() + *

+ * + * + * *

ListLocations *

Lists information about the supported locations for this service. * @@ -255,6 +289,8 @@ public class EntityTypesClient implements BackgroundResource { private final EntityTypesSettings settings; private final EntityTypesStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; /** Constructs an instance of EntityTypesClient with default settings. */ public static final EntityTypesClient create() throws IOException { @@ -285,11 +321,17 @@ public static final EntityTypesClient create(EntityTypesStub stub) { protected EntityTypesClient(EntityTypesSettings settings) throws IOException { this.settings = settings; this.stub = ((EntityTypesStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } protected EntityTypesClient(EntityTypesStub stub) { this.settings = null; this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); } public final EntityTypesSettings getSettings() { @@ -300,6 +342,23 @@ public EntityTypesStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieves the specified entity type. @@ -945,6 +1004,195 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest return stub.listEntityTypesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ExportEntityTypesResponse response = entityTypesClient.exportEntityTypesAsync(request).get();
+   * }
+   * }
+ * + * @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 + exportEntityTypesAsync(ExportEntityTypesRequest request) { + return exportEntityTypesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   OperationFuture future =
+   *       entityTypesClient.exportEntityTypesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportEntityTypesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return stub.exportEntityTypesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected entity types. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ExportEntityTypesRequest request =
+   *       ExportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllEntityTypes(new ArrayList())
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.exportEntityTypesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportEntityTypesCallable() { + return stub.exportEntityTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ImportEntityTypesResponse response = entityTypesClient.importEntityTypesAsync(request).get();
+   * }
+   * }
+ * + * @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 + importEntityTypesAsync(ImportEntityTypesRequest request) { + return importEntityTypesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   OperationFuture future =
+   *       entityTypesClient.importEntityTypesOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ImportEntityTypesResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return stub.importEntityTypesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Imports the specified entitytypes into the agent. + * + *

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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   ImportEntityTypesRequest request =
+   *       ImportEntityTypesRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTargetEntityType(
+   *               EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       entityTypesClient.importEntityTypesCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable importEntityTypesCallable() { + return stub.importEntityTypesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists information about the supported locations for this service. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java index 24d96d653cdd..6ac7cca78134 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -36,6 +37,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -108,6 +110,30 @@ public UnaryCallSettings deleteEntityTypeSetting return ((EntityTypesStubSettings) getStubSettings()).listEntityTypesSettings(); } + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings exportEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).exportEntityTypesSettings(); + } + + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return ((EntityTypesStubSettings) getStubSettings()).exportEntityTypesOperationSettings(); + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public UnaryCallSettings importEntityTypesSettings() { + return ((EntityTypesStubSettings) getStubSettings()).importEntityTypesSettings(); + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return ((EntityTypesStubSettings) getStubSettings()).importEntityTypesOperationSettings(); + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -262,6 +288,32 @@ public UnaryCallSettings.Builder deleteEntityTyp return getStubSettingsBuilder().listEntityTypesSettings(); } + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings.Builder + exportEntityTypesSettings() { + return getStubSettingsBuilder().exportEntityTypesSettings(); + } + + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return getStubSettingsBuilder().exportEntityTypesOperationSettings(); + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public UnaryCallSettings.Builder + importEntityTypesSettings() { + return getStubSettingsBuilder().importEntityTypesSettings(); + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return getStubSettingsBuilder().importEntityTypesOperationSettings(); + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClient.java new file mode 100644 index 000000000000..a591fe624b92 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClient.java @@ -0,0 +1,1255 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExamplesStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExamplesStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example]. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+ *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+ *   Example example = Example.newBuilder().build();
+ *   Example response = examplesClient.createExample(parent, example);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ExamplesClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateExample

Creates an example in the specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createExample(CreateExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createExample(PlaybookName parent, Example example) + *

  • createExample(String parent, Example example) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createExampleCallable() + *

+ *

DeleteExample

Deletes the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteExample(DeleteExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteExample(ExampleName name) + *

  • deleteExample(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.

+ *
    + *
  • deleteExampleCallable() + *

+ *

ListExamples

Returns a list of examples in the specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listExamples(ListExamplesRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listExamples(PlaybookName parent) + *

  • listExamples(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.

+ *
    + *
  • listExamplesPagedCallable() + *

  • listExamplesCallable() + *

+ *

GetExample

Retrieves the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getExample(GetExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getExample(ExampleName name) + *

  • getExample(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.

+ *
    + *
  • getExampleCallable() + *

+ *

UpdateExample

Update the specified example.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateExample(UpdateExampleRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateExample(Example example, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateExampleCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 ExamplesSettings 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
+ * ExamplesSettings examplesSettings =
+ *     ExamplesSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

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
+ * ExamplesSettings examplesSettings =
+ *     ExamplesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

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
+ * ExamplesSettings examplesSettings = ExamplesSettings.newHttpJsonBuilder().build();
+ * ExamplesClient examplesClient = ExamplesClient.create(examplesSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExamplesClient implements BackgroundResource { + private final ExamplesSettings settings; + private final ExamplesStub stub; + + /** Constructs an instance of ExamplesClient with default settings. */ + public static final ExamplesClient create() throws IOException { + return create(ExamplesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExamplesClient, 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 ExamplesClient create(ExamplesSettings settings) throws IOException { + return new ExamplesClient(settings); + } + + /** + * Constructs an instance of ExamplesClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExamplesSettings). + */ + public static final ExamplesClient create(ExamplesStub stub) { + return new ExamplesClient(stub); + } + + /** + * Constructs an instance of ExamplesClient, 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 ExamplesClient(ExamplesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExamplesStubSettings) settings.getStubSettings()).createStub(); + } + + protected ExamplesClient(ExamplesStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ExamplesSettings getSettings() { + return settings; + } + + public ExamplesStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   Example example = Example.newBuilder().build();
+   *   Example response = examplesClient.createExample(parent, example);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create an example for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @param example Required. The example to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example createExample(PlaybookName parent, Example example) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setExample(example) + .build(); + return createExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   Example example = Example.newBuilder().build();
+   *   Example response = examplesClient.createExample(parent, example);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create an example for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @param example Required. The example to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example createExample(String parent, Example example) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder().setParent(parent).setExample(example).build(); + return createExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   CreateExampleRequest request =
+   *       CreateExampleRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setExample(Example.newBuilder().build())
+   *           .build();
+   *   Example response = examplesClient.createExample(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 Example createExample(CreateExampleRequest request) { + return createExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an example in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   CreateExampleRequest request =
+   *       CreateExampleRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setExample(Example.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = examplesClient.createExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createExampleCallable() { + return stub.createExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ExampleName name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
+   *   examplesClient.deleteExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/examples/<Example ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExample(ExampleName name) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *           .toString();
+   *   examplesClient.deleteExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/examples/<Example ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteExample(String name) { + DeleteExampleRequest request = DeleteExampleRequest.newBuilder().setName(name).build(); + deleteExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   DeleteExampleRequest request =
+   *       DeleteExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   examplesClient.deleteExample(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 deleteExample(DeleteExampleRequest request) { + deleteExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   DeleteExampleRequest request =
+   *       DeleteExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = examplesClient.deleteExampleCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteExampleCallable() { + return stub.deleteExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   for (Example element : examplesClient.listExamples(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list the examples from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExamplesPagedResponse listExamples(PlaybookName parent) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listExamples(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   for (Example element : examplesClient.listExamples(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list the examples from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExamplesPagedResponse listExamples(String parent) { + ListExamplesRequest request = ListExamplesRequest.newBuilder().setParent(parent).build(); + return listExamples(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   for (Example element : examplesClient.listExamples(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 ListExamplesPagedResponse listExamples(ListExamplesRequest request) { + return listExamplesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   ApiFuture future = examplesClient.listExamplesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Example element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listExamplesPagedCallable() { + return stub.listExamplesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of examples in the specified playbook. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListExamplesRequest request =
+   *       ListExamplesRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setLanguageCode("languageCode-2092349083")
+   *           .build();
+   *   while (true) {
+   *     ListExamplesResponse response = examplesClient.listExamplesCallable().call(request);
+   *     for (Example element : response.getExamplesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listExamplesCallable() { + return stub.listExamplesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ExampleName name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]");
+   *   Example response = examplesClient.getExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/examples/<Example ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example getExample(ExampleName name) { + GetExampleRequest request = + GetExampleRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   String name =
+   *       ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *           .toString();
+   *   Example response = examplesClient.getExample(name);
+   * }
+   * }
+ * + * @param name Required. The name of the example. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/examples/<Example ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example getExample(String name) { + GetExampleRequest request = GetExampleRequest.newBuilder().setName(name).build(); + return getExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetExampleRequest request =
+   *       GetExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   Example response = examplesClient.getExample(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 Example getExample(GetExampleRequest request) { + return getExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetExampleRequest request =
+   *       GetExampleRequest.newBuilder()
+   *           .setName(
+   *               ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = examplesClient.getExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getExampleCallable() { + return stub.getExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   Example example = Example.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Example response = examplesClient.updateExample(example, updateMask);
+   * }
+   * }
+ * + * @param example Required. The example to update. + * @param updateMask Optional. The mask to control which fields get updated. If the mask is not + * present, all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example updateExample(Example example, FieldMask updateMask) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder().setExample(example).setUpdateMask(updateMask).build(); + return updateExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   UpdateExampleRequest request =
+   *       UpdateExampleRequest.newBuilder()
+   *           .setExample(Example.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Example response = examplesClient.updateExample(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 Example updateExample(UpdateExampleRequest request) { + return updateExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified example. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   UpdateExampleRequest request =
+   *       UpdateExampleRequest.newBuilder()
+   *           .setExample(Example.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = examplesClient.updateExampleCallable().futureCall(request);
+   *   // Do something.
+   *   Example response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateExampleCallable() { + return stub.updateExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : examplesClient.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. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = examplesClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = examplesClient.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 listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = examplesClient.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. + * + *

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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = examplesClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListExamplesPagedResponse + extends AbstractPagedListResponse< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExamplesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListExamplesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListExamplesPagedResponse(ListExamplesPage page) { + super(page, ListExamplesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExamplesPage + extends AbstractPage { + + private ListExamplesPage( + PageContext context, + ListExamplesResponse response) { + super(context, response); + } + + private static ListExamplesPage createEmptyPage() { + return new ListExamplesPage(null, null); + } + + @Override + protected ListExamplesPage createPage( + PageContext context, + ListExamplesResponse response) { + return new ListExamplesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExamplesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + private ListExamplesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExamplesFixedSizeCollection createEmptyCollection() { + return new ListExamplesFixedSizeCollection(null, 0); + } + + @Override + protected ListExamplesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExamplesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesSettings.java new file mode 100644 index 000000000000..d35700ab0769 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesSettings.java @@ -0,0 +1,279 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExamplesStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExamplesClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createExample to 30 seconds: + * + *

{@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
+ * ExamplesSettings.Builder examplesSettingsBuilder = ExamplesSettings.newBuilder();
+ * examplesSettingsBuilder
+ *     .createExampleSettings()
+ *     .setRetrySettings(
+ *         examplesSettingsBuilder
+ *             .createExampleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExamplesSettings examplesSettings = examplesSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExamplesSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createExample. */ + public UnaryCallSettings createExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).createExampleSettings(); + } + + /** Returns the object with the settings used for calls to deleteExample. */ + public UnaryCallSettings deleteExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).deleteExampleSettings(); + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return ((ExamplesStubSettings) getStubSettings()).listExamplesSettings(); + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).getExampleSettings(); + } + + /** Returns the object with the settings used for calls to updateExample. */ + public UnaryCallSettings updateExampleSettings() { + return ((ExamplesStubSettings) getStubSettings()).updateExampleSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ExamplesStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ExamplesStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ExamplesSettings create(ExamplesStubSettings stub) throws IOException { + return new ExamplesSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ExamplesStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ExamplesStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ExamplesStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ExamplesStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ExamplesStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ExamplesStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ExamplesStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExamplesStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExamplesSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ExamplesSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ExamplesStubSettings.newBuilder(clientContext)); + } + + protected Builder(ExamplesSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ExamplesStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ExamplesStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ExamplesStubSettings.newHttpJsonBuilder()); + } + + public ExamplesStubSettings.Builder getStubSettingsBuilder() { + return ((ExamplesStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createExample. */ + public UnaryCallSettings.Builder createExampleSettings() { + return getStubSettingsBuilder().createExampleSettings(); + } + + /** Returns the builder for the settings used for calls to deleteExample. */ + public UnaryCallSettings.Builder deleteExampleSettings() { + return getStubSettingsBuilder().deleteExampleSettings(); + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return getStubSettingsBuilder().listExamplesSettings(); + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getStubSettingsBuilder().getExampleSettings(); + } + + /** Returns the builder for the settings used for calls to updateExample. */ + public UnaryCallSettings.Builder updateExampleSettings() { + return getStubSettingsBuilder().updateExampleSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ExamplesSettings build() throws IOException { + return new ExamplesSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClient.java new file mode 100644 index 000000000000..721a8f40d729 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClient.java @@ -0,0 +1,1950 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.stub.PlaybooksStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.PlaybooksStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing + * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook]. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Playbook playbook = Playbook.newBuilder().build();
+ *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the PlaybooksClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreatePlaybook

Creates a playbook in a specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPlaybook(CreatePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createPlaybook(AgentName parent, Playbook playbook) + *

  • createPlaybook(String parent, Playbook playbook) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPlaybookCallable() + *

+ *

DeletePlaybook

Deletes a specified playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePlaybook(DeletePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deletePlaybook(PlaybookName name) + *

  • deletePlaybook(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.

+ *
    + *
  • deletePlaybookCallable() + *

+ *

ListPlaybooks

Returns a list of playbooks in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPlaybooks(ListPlaybooksRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPlaybooks(AgentName parent) + *

  • listPlaybooks(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.

+ *
    + *
  • listPlaybooksPagedCallable() + *

  • listPlaybooksCallable() + *

+ *

GetPlaybook

Retrieves the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPlaybook(GetPlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPlaybook(PlaybookName name) + *

  • getPlaybook(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.

+ *
    + *
  • getPlaybookCallable() + *

+ *

UpdatePlaybook

Updates the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updatePlaybook(UpdatePlaybookRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updatePlaybook(Playbook playbook, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updatePlaybookCallable() + *

+ *

CreatePlaybookVersion

Creates a version for the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createPlaybookVersion(CreatePlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createPlaybookVersion(PlaybookName parent, PlaybookVersion playbookVersion) + *

  • createPlaybookVersion(String parent, PlaybookVersion playbookVersion) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createPlaybookVersionCallable() + *

+ *

GetPlaybookVersion

Retrieves the specified version of the Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getPlaybookVersion(GetPlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getPlaybookVersion(PlaybookVersionName name) + *

  • getPlaybookVersion(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.

+ *
    + *
  • getPlaybookVersionCallable() + *

+ *

ListPlaybookVersions

Lists versions for the specified Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listPlaybookVersions(ListPlaybookVersionsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listPlaybookVersions(PlaybookName parent) + *

  • listPlaybookVersions(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.

+ *
    + *
  • listPlaybookVersionsPagedCallable() + *

  • listPlaybookVersionsCallable() + *

+ *

DeletePlaybookVersion

Deletes the specified version of the Playbook.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deletePlaybookVersion(DeletePlaybookVersionRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deletePlaybookVersion(PlaybookVersionName name) + *

  • deletePlaybookVersion(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.

+ *
    + *
  • deletePlaybookVersionCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 PlaybooksSettings 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
+ * PlaybooksSettings playbooksSettings =
+ *     PlaybooksSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

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
+ * PlaybooksSettings playbooksSettings =
+ *     PlaybooksSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

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
+ * PlaybooksSettings playbooksSettings = PlaybooksSettings.newHttpJsonBuilder().build();
+ * PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class PlaybooksClient implements BackgroundResource { + private final PlaybooksSettings settings; + private final PlaybooksStub stub; + + /** Constructs an instance of PlaybooksClient with default settings. */ + public static final PlaybooksClient create() throws IOException { + return create(PlaybooksSettings.newBuilder().build()); + } + + /** + * Constructs an instance of PlaybooksClient, 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 PlaybooksClient create(PlaybooksSettings settings) throws IOException { + return new PlaybooksClient(settings); + } + + /** + * Constructs an instance of PlaybooksClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(PlaybooksSettings). + */ + public static final PlaybooksClient create(PlaybooksStub stub) { + return new PlaybooksClient(stub); + } + + /** + * Constructs an instance of PlaybooksClient, 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 PlaybooksClient(PlaybooksSettings settings) throws IOException { + this.settings = settings; + this.stub = ((PlaybooksStubSettings) settings.getStubSettings()).createStub(); + } + + protected PlaybooksClient(PlaybooksStub stub) { + this.settings = null; + this.stub = stub; + } + + public final PlaybooksSettings getSettings() { + return settings; + } + + public PlaybooksStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a playbook for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param playbook Required. The playbook to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook createPlaybook(AgentName parent, Playbook playbook) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPlaybook(playbook) + .build(); + return createPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a playbook for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param playbook Required. The playbook to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook createPlaybook(String parent, Playbook playbook) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder().setParent(parent).setPlaybook(playbook).build(); + return createPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookRequest request =
+   *       CreatePlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .build();
+   *   Playbook response = playbooksClient.createPlaybook(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 Playbook createPlaybook(CreatePlaybookRequest request) { + return createPlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a playbook in a specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookRequest request =
+   *       CreatePlaybookRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = playbooksClient.createPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createPlaybookCallable() { + return stub.createPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   playbooksClient.deletePlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybook(PlaybookName name) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deletePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   playbooksClient.deletePlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybook(String name) { + DeletePlaybookRequest request = DeletePlaybookRequest.newBuilder().setName(name).build(); + deletePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookRequest request =
+   *       DeletePlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   playbooksClient.deletePlaybook(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 deletePlaybook(DeletePlaybookRequest request) { + deletePlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookRequest request =
+   *       DeletePlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.deletePlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePlaybookCallable() { + return stub.deletePlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list playbooks from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybooksPagedResponse listPlaybooks(AgentName parent) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPlaybooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list playbooks from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybooksPagedResponse listPlaybooks(String parent) { + ListPlaybooksRequest request = ListPlaybooksRequest.newBuilder().setParent(parent).build(); + return listPlaybooks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Playbook element : playbooksClient.listPlaybooks(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 ListPlaybooksPagedResponse listPlaybooks(ListPlaybooksRequest request) { + return listPlaybooksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = playbooksClient.listPlaybooksPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Playbook element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybooksPagedCallable() { + return stub.listPlaybooksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of playbooks in the specified agent. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybooksRequest request =
+   *       ListPlaybooksRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPlaybooksResponse response = playbooksClient.listPlaybooksCallable().call(request);
+   *     for (Playbook element : response.getPlaybooksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listPlaybooksCallable() { + return stub.listPlaybooksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   Playbook response = playbooksClient.getPlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook getPlaybook(PlaybookName name) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   Playbook response = playbooksClient.getPlaybook(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook getPlaybook(String name) { + GetPlaybookRequest request = GetPlaybookRequest.newBuilder().setName(name).build(); + return getPlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookRequest request =
+   *       GetPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   Playbook response = playbooksClient.getPlaybook(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 Playbook getPlaybook(GetPlaybookRequest request) { + return getPlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookRequest request =
+   *       GetPlaybookRequest.newBuilder()
+   *           .setName(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.getPlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPlaybookCallable() { + return stub.getPlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   Playbook playbook = Playbook.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Playbook response = playbooksClient.updatePlaybook(playbook, updateMask);
+   * }
+   * }
+ * + * @param playbook Required. The playbook to update. + * @param updateMask The mask to control which fields get updated. If the mask is not present, all + * fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Playbook updatePlaybook(Playbook playbook, FieldMask updateMask) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder().setPlaybook(playbook).setUpdateMask(updateMask).build(); + return updatePlaybook(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   UpdatePlaybookRequest request =
+   *       UpdatePlaybookRequest.newBuilder()
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Playbook response = playbooksClient.updatePlaybook(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 Playbook updatePlaybook(UpdatePlaybookRequest request) { + return updatePlaybookCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   UpdatePlaybookRequest request =
+   *       UpdatePlaybookRequest.newBuilder()
+   *           .setPlaybook(Playbook.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = playbooksClient.updatePlaybookCallable().futureCall(request);
+   *   // Do something.
+   *   Playbook response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePlaybookCallable() { + return stub.updatePlaybookCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create a version for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @param playbookVersion Required. The playbook version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion createPlaybookVersion( + PlaybookName parent, PlaybookVersion playbookVersion) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPlaybookVersion(playbookVersion) + .build(); + return createPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion);
+   * }
+   * }
+ * + * @param parent Required. The playbook to create a version for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @param playbookVersion Required. The playbook version to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion createPlaybookVersion( + String parent, PlaybookVersion playbookVersion) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent(parent) + .setPlaybookVersion(playbookVersion) + .build(); + return createPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookVersionRequest request =
+   *       CreatePlaybookVersionRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookVersion(PlaybookVersion.newBuilder().build())
+   *           .build();
+   *   PlaybookVersion response = playbooksClient.createPlaybookVersion(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 PlaybookVersion createPlaybookVersion(CreatePlaybookVersionRequest request) { + return createPlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a version for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   CreatePlaybookVersionRequest request =
+   *       CreatePlaybookVersionRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPlaybookVersion(PlaybookVersion.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.createPlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   PlaybookVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createPlaybookVersionCallable() { + return stub.createPlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookVersionName name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]");
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/versions/<Version ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion getPlaybookVersion(PlaybookVersionName name) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *           .toString();
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/versions/<Version ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final PlaybookVersion getPlaybookVersion(String name) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder().setName(name).build(); + return getPlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookVersionRequest request =
+   *       GetPlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   PlaybookVersion response = playbooksClient.getPlaybookVersion(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 PlaybookVersion getPlaybookVersion(GetPlaybookVersionRequest request) { + return getPlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetPlaybookVersionRequest request =
+   *       GetPlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.getPlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   PlaybookVersion response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getPlaybookVersionCallable() { + return stub.getPlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list versions for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybookVersionsPagedResponse listPlaybookVersions(PlaybookName parent) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listPlaybookVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String parent =
+   *       PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString();
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The playbook to list versions for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListPlaybookVersionsPagedResponse listPlaybookVersions(String parent) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder().setParent(parent).build(); + return listPlaybookVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (PlaybookVersion element : playbooksClient.listPlaybookVersions(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 ListPlaybookVersionsPagedResponse listPlaybookVersions( + ListPlaybookVersionsRequest request) { + return listPlaybookVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       playbooksClient.listPlaybookVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (PlaybookVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybookVersionsPagedCallable() { + return stub.listPlaybookVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists versions for the specified Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListPlaybookVersionsRequest request =
+   *       ListPlaybookVersionsRequest.newBuilder()
+   *           .setParent(
+   *               PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListPlaybookVersionsResponse response =
+   *         playbooksClient.listPlaybookVersionsCallable().call(request);
+   *     for (PlaybookVersion element : response.getPlaybookVersionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listPlaybookVersionsCallable() { + return stub.listPlaybookVersionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   PlaybookVersionName name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]");
+   *   playbooksClient.deletePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/versions/<Version ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybookVersion(PlaybookVersionName name) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deletePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   String name =
+   *       PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *           .toString();
+   *   playbooksClient.deletePlaybookVersion(name);
+   * }
+   * }
+ * + * @param name Required. The name of the playbook version to delete. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/playbooks/<Playbook + * ID>/versions/<Version ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deletePlaybookVersion(String name) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder().setName(name).build(); + deletePlaybookVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookVersionRequest request =
+   *       DeletePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   playbooksClient.deletePlaybookVersion(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 deletePlaybookVersion(DeletePlaybookVersionRequest request) { + deletePlaybookVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified version of the Playbook. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   DeletePlaybookVersionRequest request =
+   *       DeletePlaybookVersionRequest.newBuilder()
+   *           .setName(
+   *               PlaybookVersionName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future = playbooksClient.deletePlaybookVersionCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deletePlaybookVersionCallable() { + return stub.deletePlaybookVersionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : playbooksClient.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. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = playbooksClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = playbooksClient.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 listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = playbooksClient.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. + * + *

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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = playbooksClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListPlaybooksPagedResponse + extends AbstractPagedListResponse< + ListPlaybooksRequest, + ListPlaybooksResponse, + Playbook, + ListPlaybooksPage, + ListPlaybooksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPlaybooksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPlaybooksPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPlaybooksPagedResponse(ListPlaybooksPage page) { + super(page, ListPlaybooksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPlaybooksPage + extends AbstractPage< + ListPlaybooksRequest, ListPlaybooksResponse, Playbook, ListPlaybooksPage> { + + private ListPlaybooksPage( + PageContext context, + ListPlaybooksResponse response) { + super(context, response); + } + + private static ListPlaybooksPage createEmptyPage() { + return new ListPlaybooksPage(null, null); + } + + @Override + protected ListPlaybooksPage createPage( + PageContext context, + ListPlaybooksResponse response) { + return new ListPlaybooksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPlaybooksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPlaybooksRequest, + ListPlaybooksResponse, + Playbook, + ListPlaybooksPage, + ListPlaybooksFixedSizeCollection> { + + private ListPlaybooksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPlaybooksFixedSizeCollection createEmptyCollection() { + return new ListPlaybooksFixedSizeCollection(null, 0); + } + + @Override + protected ListPlaybooksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPlaybooksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPlaybookVersionsPagedResponse + extends AbstractPagedListResponse< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage, + ListPlaybookVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPlaybookVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListPlaybookVersionsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListPlaybookVersionsPagedResponse(ListPlaybookVersionsPage page) { + super(page, ListPlaybookVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPlaybookVersionsPage + extends AbstractPage< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage> { + + private ListPlaybookVersionsPage( + PageContext + context, + ListPlaybookVersionsResponse response) { + super(context, response); + } + + private static ListPlaybookVersionsPage createEmptyPage() { + return new ListPlaybookVersionsPage(null, null); + } + + @Override + protected ListPlaybookVersionsPage createPage( + PageContext + context, + ListPlaybookVersionsResponse response) { + return new ListPlaybookVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPlaybookVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + PlaybookVersion, + ListPlaybookVersionsPage, + ListPlaybookVersionsFixedSizeCollection> { + + private ListPlaybookVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPlaybookVersionsFixedSizeCollection createEmptyCollection() { + return new ListPlaybookVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListPlaybookVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPlaybookVersionsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksSettings.java new file mode 100644 index 000000000000..d06ca9d971ba --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksSettings.java @@ -0,0 +1,333 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3beta1.stub.PlaybooksStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlaybooksClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createPlaybook to 30 seconds: + * + *

{@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
+ * PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder();
+ * playbooksSettingsBuilder
+ *     .createPlaybookSettings()
+ *     .setRetrySettings(
+ *         playbooksSettingsBuilder
+ *             .createPlaybookSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PlaybooksSettings playbooksSettings = playbooksSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PlaybooksSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createPlaybook. */ + public UnaryCallSettings createPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).createPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to deletePlaybook. */ + public UnaryCallSettings deletePlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).deletePlaybookSettings(); + } + + /** Returns the object with the settings used for calls to listPlaybooks. */ + public PagedCallSettings + listPlaybooksSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listPlaybooksSettings(); + } + + /** Returns the object with the settings used for calls to getPlaybook. */ + public UnaryCallSettings getPlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getPlaybookSettings(); + } + + /** Returns the object with the settings used for calls to updatePlaybook. */ + public UnaryCallSettings updatePlaybookSettings() { + return ((PlaybooksStubSettings) getStubSettings()).updatePlaybookSettings(); + } + + /** Returns the object with the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings + createPlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).createPlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings + getPlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getPlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listPlaybookVersionsSettings(); + } + + /** Returns the object with the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings deletePlaybookVersionSettings() { + return ((PlaybooksStubSettings) getStubSettings()).deletePlaybookVersionSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((PlaybooksStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((PlaybooksStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final PlaybooksSettings create(PlaybooksStubSettings stub) throws IOException { + return new PlaybooksSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return PlaybooksStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return PlaybooksStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return PlaybooksStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return PlaybooksStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return PlaybooksStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return PlaybooksStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return PlaybooksStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlaybooksStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlaybooksSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for PlaybooksSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(PlaybooksStubSettings.newBuilder(clientContext)); + } + + protected Builder(PlaybooksSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(PlaybooksStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(PlaybooksStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(PlaybooksStubSettings.newHttpJsonBuilder()); + } + + public PlaybooksStubSettings.Builder getStubSettingsBuilder() { + return ((PlaybooksStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createPlaybook. */ + public UnaryCallSettings.Builder createPlaybookSettings() { + return getStubSettingsBuilder().createPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlaybook. */ + public UnaryCallSettings.Builder deletePlaybookSettings() { + return getStubSettingsBuilder().deletePlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to listPlaybooks. */ + public PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings() { + return getStubSettingsBuilder().listPlaybooksSettings(); + } + + /** Returns the builder for the settings used for calls to getPlaybook. */ + public UnaryCallSettings.Builder getPlaybookSettings() { + return getStubSettingsBuilder().getPlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to updatePlaybook. */ + public UnaryCallSettings.Builder updatePlaybookSettings() { + return getStubSettingsBuilder().updatePlaybookSettings(); + } + + /** Returns the builder for the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings.Builder + createPlaybookVersionSettings() { + return getStubSettingsBuilder().createPlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings.Builder + getPlaybookVersionSettings() { + return getStubSettingsBuilder().getPlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return getStubSettingsBuilder().listPlaybookVersionsSettings(); + } + + /** Returns the builder for the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings.Builder + deletePlaybookVersionSettings() { + return getStubSettingsBuilder().deletePlaybookVersionSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public PlaybooksSettings build() throws IOException { + return new PlaybooksSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java index b6239ef5ece0..ba908a55190f 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClient.java @@ -25,6 +25,7 @@ import com.google.api.gax.paging.AbstractPagedListResponse; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.stub.SessionsStub; import com.google.cloud.dialogflow.cx.v3beta1.stub.SessionsStubSettings; @@ -94,6 +95,16 @@ * * * + *

ServerStreamingDetectIntent + *

Processes a natural language query and returns structured, actionable data as a result through server-side streaming. Server-side streaming allows Dialogflow to send [partial responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) earlier in a single request. + * + *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • serverStreamingDetectIntentCallable() + *

+ * + * + * *

StreamingDetectIntent *

Processes a natural language query in audio format in a streaming fashion and returns structured, actionable data as a result. This method is only available via the gRPC API (not REST). *

Note: Always use agent versions for production traffic. See [Versions and environments](https://cloud.google.com/dialogflow/cx/docs/concept/version). @@ -356,6 +367,45 @@ public final UnaryCallable detectInte return stub.detectIntentCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Processes a natural language query and returns structured, actionable data as a result through + * server-side streaming. Server-side streaming allows Dialogflow to send [partial + * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) + * earlier in a single request. + * + *

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 (SessionsClient sessionsClient = SessionsClient.create()) {
+   *   DetectIntentRequest request =
+   *       DetectIntentRequest.newBuilder()
+   *           .setSession(
+   *               SessionName.ofProjectLocationAgentSessionName(
+   *                       "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]")
+   *                   .toString())
+   *           .setQueryParams(QueryParameters.newBuilder().build())
+   *           .setQueryInput(QueryInput.newBuilder().build())
+   *           .setOutputAudioConfig(OutputAudioConfig.newBuilder().build())
+   *           .build();
+   *   ServerStream stream =
+   *       sessionsClient.serverStreamingDetectIntentCallable().call(request);
+   *   for (DetectIntentResponse response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return stub.serverStreamingDetectIntentCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Processes a natural language query in audio format in a streaming fashion and returns diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java index 6efaf8224881..e57235799319 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsSettings.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; @@ -85,6 +86,12 @@ public UnaryCallSettings detectIntent return ((SessionsStubSettings) getStubSettings()).detectIntentSettings(); } + /** Returns the object with the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings + serverStreamingDetectIntentSettings() { + return ((SessionsStubSettings) getStubSettings()).serverStreamingDetectIntentSettings(); + } + /** Returns the object with the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings streamingDetectIntentSettings() { @@ -238,6 +245,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().detectIntentSettings(); } + /** Returns the builder for the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings() { + return getStubSettingsBuilder().serverStreamingDetectIntentSettings(); + } + /** Returns the builder for the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClient.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClient.java new file mode 100644 index 000000000000..e0ffd40cac37 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClient.java @@ -0,0 +1,1343 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ToolsStub; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ToolsStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Tool tool = Tool.newBuilder().build();
+ *   Tool response = toolsClient.createTool(parent, tool);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the ToolsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateTool

Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • createTool(CreateToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • createTool(AgentName parent, Tool tool) + *

  • createTool(String parent, Tool tool) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • createToolCallable() + *

+ *

ListTools

Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listTools(ListToolsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listTools(AgentName parent) + *

  • listTools(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.

+ *
    + *
  • listToolsPagedCallable() + *

  • listToolsCallable() + *

+ *

ExportTools

Exports the selected tools.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • exportToolsAsync(ExportToolsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • exportToolsOperationCallable() + *

  • exportToolsCallable() + *

+ *

GetTool

Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getTool(GetToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getTool(ToolName name) + *

  • getTool(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.

+ *
    + *
  • getToolCallable() + *

+ *

UpdateTool

Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • updateTool(UpdateToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • updateTool(Tool tool, FieldMask updateMask) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • updateToolCallable() + *

+ *

DeleteTool

Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteTool(DeleteToolRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteTool(ToolName name) + *

  • deleteTool(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.

+ *
    + *
  • deleteToolCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listLocations(ListLocationsRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getLocation(GetLocationRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getLocationCallable() + *

+ *
+ * + *

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 ToolsSettings 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
+ * ToolsSettings toolsSettings =
+ *     ToolsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

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
+ * ToolsSettings toolsSettings = ToolsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

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
+ * ToolsSettings toolsSettings = ToolsSettings.newHttpJsonBuilder().build();
+ * ToolsClient toolsClient = ToolsClient.create(toolsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class ToolsClient implements BackgroundResource { + private final ToolsSettings settings; + private final ToolsStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ToolsClient with default settings. */ + public static final ToolsClient create() throws IOException { + return create(ToolsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ToolsClient, 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 ToolsClient create(ToolsSettings settings) throws IOException { + return new ToolsClient(settings); + } + + /** + * Constructs an instance of ToolsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ToolsSettings). + */ + public static final ToolsClient create(ToolsStub stub) { + return new ToolsClient(stub); + } + + /** + * Constructs an instance of ToolsClient, 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 ToolsClient(ToolsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ToolsStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ToolsClient(ToolsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ToolsSettings getSettings() { + return settings; + } + + public ToolsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   Tool tool = Tool.newBuilder().build();
+   *   Tool response = toolsClient.createTool(parent, tool);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a Tool for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param tool Required. The Tool to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool createTool(AgentName parent, Tool tool) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTool(tool) + .build(); + return createTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   Tool tool = Tool.newBuilder().build();
+   *   Tool response = toolsClient.createTool(parent, tool);
+   * }
+   * }
+ * + * @param parent Required. The agent to create a Tool for. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @param tool Required. The Tool to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool createTool(String parent, Tool tool) { + CreateToolRequest request = + CreateToolRequest.newBuilder().setParent(parent).setTool(tool).build(); + return createTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolRequest request =
+   *       CreateToolRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTool(Tool.newBuilder().build())
+   *           .build();
+   *   Tool response = toolsClient.createTool(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 Tool createTool(CreateToolRequest request) { + return createToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   CreateToolRequest request =
+   *       CreateToolRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setTool(Tool.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = toolsClient.createToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createToolCallable() { + return stub.createToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+   *   for (Tool element : toolsClient.listTools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list the Tools from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolsPagedResponse listTools(AgentName parent) { + ListToolsRequest request = + ListToolsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listTools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString();
+   *   for (Tool element : toolsClient.listTools(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The agent to list the Tools from. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListToolsPagedResponse listTools(String parent) { + ListToolsRequest request = ListToolsRequest.newBuilder().setParent(parent).build(); + return listTools(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Tool element : toolsClient.listTools(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 ListToolsPagedResponse listTools(ListToolsRequest request) { + return listToolsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = toolsClient.listToolsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Tool element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listToolsPagedCallable() { + return stub.listToolsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified agent. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListToolsRequest request =
+   *       ListToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListToolsResponse response = toolsClient.listToolsCallable().call(request);
+   *     for (Tool element : response.getToolsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listToolsCallable() { + return stub.listToolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected tools. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ExportToolsRequest request =
+   *       ExportToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllTools(new ArrayList())
+   *           .build();
+   *   ExportToolsResponse response = toolsClient.exportToolsAsync(request).get();
+   * }
+   * }
+ * + * @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 exportToolsAsync( + ExportToolsRequest request) { + return exportToolsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected tools. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ExportToolsRequest request =
+   *       ExportToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllTools(new ArrayList())
+   *           .build();
+   *   OperationFuture future =
+   *       toolsClient.exportToolsOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ExportToolsResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + exportToolsOperationCallable() { + return stub.exportToolsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Exports the selected tools. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ExportToolsRequest request =
+   *       ExportToolsRequest.newBuilder()
+   *           .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString())
+   *           .addAllTools(new ArrayList())
+   *           .build();
+   *   ApiFuture future = toolsClient.exportToolsCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable exportToolsCallable() { + return stub.exportToolsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   Tool response = toolsClient.getTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool getTool(ToolName name) { + GetToolRequest request = + GetToolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   Tool response = toolsClient.getTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool getTool(String name) { + GetToolRequest request = GetToolRequest.newBuilder().setName(name).build(); + return getTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolRequest request =
+   *       GetToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .build();
+   *   Tool response = toolsClient.getTool(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 Tool getTool(GetToolRequest request) { + return getToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetToolRequest request =
+   *       GetToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .build();
+   *   ApiFuture future = toolsClient.getToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getToolCallable() { + return stub.getToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   Tool tool = Tool.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Tool response = toolsClient.updateTool(tool, updateMask);
+   * }
+   * }
+ * + * @param tool Required. The Tool to be updated. + * @param updateMask The mask to control which fields get updated. If the mask is not present, all + * fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Tool updateTool(Tool tool, FieldMask updateMask) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder().setTool(tool).setUpdateMask(updateMask).build(); + return updateTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   UpdateToolRequest request =
+   *       UpdateToolRequest.newBuilder()
+   *           .setTool(Tool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Tool response = toolsClient.updateTool(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 Tool updateTool(UpdateToolRequest request) { + return updateToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   UpdateToolRequest request =
+   *       UpdateToolRequest.newBuilder()
+   *           .setTool(Tool.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = toolsClient.updateToolCallable().futureCall(request);
+   *   // Do something.
+   *   Tool response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateToolCallable() { + return stub.updateToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]");
+   *   toolsClient.deleteTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool to be deleted. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTool(ToolName name) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString();
+   *   toolsClient.deleteTool(name);
+   * }
+   * }
+ * + * @param name Required. The name of the Tool to be deleted. Format: `projects/<Project + * ID>/locations/<Location ID>/agents/<Agent ID>/tools/<Tool ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTool(String name) { + DeleteToolRequest request = DeleteToolRequest.newBuilder().setName(name).build(); + deleteTool(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolRequest request =
+   *       DeleteToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   toolsClient.deleteTool(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 deleteTool(DeleteToolRequest request) { + deleteToolCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   DeleteToolRequest request =
+   *       DeleteToolRequest.newBuilder()
+   *           .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString())
+   *           .setForce(true)
+   *           .build();
+   *   ApiFuture future = toolsClient.deleteToolCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteToolCallable() { + return stub.deleteToolCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : toolsClient.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. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = toolsClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this 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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response = toolsClient.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 listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = toolsClient.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. + * + *

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 (ToolsClient toolsClient = ToolsClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = toolsClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListToolsPagedResponse + extends AbstractPagedListResponse< + ListToolsRequest, ListToolsResponse, Tool, ListToolsPage, ListToolsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListToolsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListToolsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListToolsPagedResponse(ListToolsPage page) { + super(page, ListToolsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListToolsPage + extends AbstractPage { + + private ListToolsPage( + PageContext context, + ListToolsResponse response) { + super(context, response); + } + + private static ListToolsPage createEmptyPage() { + return new ListToolsPage(null, null); + } + + @Override + protected ListToolsPage createPage( + PageContext context, + ListToolsResponse response) { + return new ListToolsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListToolsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListToolsRequest, ListToolsResponse, Tool, ListToolsPage, ListToolsFixedSizeCollection> { + + private ListToolsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListToolsFixedSizeCollection createEmptyCollection() { + return new ListToolsFixedSizeCollection(null, 0); + } + + @Override + protected ListToolsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListToolsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsSettings.java new file mode 100644 index 000000000000..54630aaddff2 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsSettings.java @@ -0,0 +1,303 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.cx.v3beta1.stub.ToolsStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ToolsClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createTool to 30 seconds: + * + *

{@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
+ * ToolsSettings.Builder toolsSettingsBuilder = ToolsSettings.newBuilder();
+ * toolsSettingsBuilder
+ *     .createToolSettings()
+ *     .setRetrySettings(
+ *         toolsSettingsBuilder
+ *             .createToolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ToolsSettings toolsSettings = toolsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ToolsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createTool. */ + public UnaryCallSettings createToolSettings() { + return ((ToolsStubSettings) getStubSettings()).createToolSettings(); + } + + /** Returns the object with the settings used for calls to listTools. */ + public PagedCallSettings + listToolsSettings() { + return ((ToolsStubSettings) getStubSettings()).listToolsSettings(); + } + + /** Returns the object with the settings used for calls to exportTools. */ + public UnaryCallSettings exportToolsSettings() { + return ((ToolsStubSettings) getStubSettings()).exportToolsSettings(); + } + + /** Returns the object with the settings used for calls to exportTools. */ + public OperationCallSettings + exportToolsOperationSettings() { + return ((ToolsStubSettings) getStubSettings()).exportToolsOperationSettings(); + } + + /** Returns the object with the settings used for calls to getTool. */ + public UnaryCallSettings getToolSettings() { + return ((ToolsStubSettings) getStubSettings()).getToolSettings(); + } + + /** Returns the object with the settings used for calls to updateTool. */ + public UnaryCallSettings updateToolSettings() { + return ((ToolsStubSettings) getStubSettings()).updateToolSettings(); + } + + /** Returns the object with the settings used for calls to deleteTool. */ + public UnaryCallSettings deleteToolSettings() { + return ((ToolsStubSettings) getStubSettings()).deleteToolSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((ToolsStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((ToolsStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final ToolsSettings create(ToolsStubSettings stub) throws IOException { + return new ToolsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ToolsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ToolsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ToolsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ToolsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ToolsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ToolsStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ToolsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ToolsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ToolsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ToolsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ToolsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ToolsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ToolsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ToolsStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ToolsStubSettings.newHttpJsonBuilder()); + } + + public ToolsStubSettings.Builder getStubSettingsBuilder() { + return ((ToolsStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createTool. */ + public UnaryCallSettings.Builder createToolSettings() { + return getStubSettingsBuilder().createToolSettings(); + } + + /** Returns the builder for the settings used for calls to listTools. */ + public PagedCallSettings.Builder + listToolsSettings() { + return getStubSettingsBuilder().listToolsSettings(); + } + + /** Returns the builder for the settings used for calls to exportTools. */ + public UnaryCallSettings.Builder exportToolsSettings() { + return getStubSettingsBuilder().exportToolsSettings(); + } + + /** Returns the builder for the settings used for calls to exportTools. */ + public OperationCallSettings.Builder< + ExportToolsRequest, ExportToolsResponse, ExportToolsMetadata> + exportToolsOperationSettings() { + return getStubSettingsBuilder().exportToolsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getTool. */ + public UnaryCallSettings.Builder getToolSettings() { + return getStubSettingsBuilder().getToolSettings(); + } + + /** Returns the builder for the settings used for calls to updateTool. */ + public UnaryCallSettings.Builder updateToolSettings() { + return getStubSettingsBuilder().updateToolSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTool. */ + public UnaryCallSettings.Builder deleteToolSettings() { + return getStubSettingsBuilder().deleteToolSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public ToolsSettings build() throws IOException { + return new ToolsSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json index 7c554bd00fd3..39ecb3f2d947 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/gapic_metadata.json @@ -106,12 +106,18 @@ "DeleteEntityType": { "methods": ["deleteEntityType", "deleteEntityType", "deleteEntityType", "deleteEntityTypeCallable"] }, + "ExportEntityTypes": { + "methods": ["exportEntityTypesAsync", "exportEntityTypesOperationCallable", "exportEntityTypesCallable"] + }, "GetEntityType": { "methods": ["getEntityType", "getEntityType", "getEntityType", "getEntityTypeCallable"] }, "GetLocation": { "methods": ["getLocation", "getLocationCallable"] }, + "ImportEntityTypes": { + "methods": ["importEntityTypesAsync", "importEntityTypesOperationCallable", "importEntityTypesCallable"] + }, "ListEntityTypes": { "methods": ["listEntityTypes", "listEntityTypes", "listEntityTypes", "listEntityTypesPagedCallable", "listEntityTypesCallable"] }, @@ -167,6 +173,36 @@ } } }, + "Examples": { + "clients": { + "grpc": { + "libraryClient": "ExamplesClient", + "rpcs": { + "CreateExample": { + "methods": ["createExample", "createExample", "createExample", "createExampleCallable"] + }, + "DeleteExample": { + "methods": ["deleteExample", "deleteExample", "deleteExample", "deleteExampleCallable"] + }, + "GetExample": { + "methods": ["getExample", "getExample", "getExample", "getExampleCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListExamples": { + "methods": ["listExamples", "listExamples", "listExamples", "listExamplesPagedCallable", "listExamplesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateExample": { + "methods": ["updateExample", "updateExample", "updateExampleCallable"] + } + } + } + } + }, "Experiments": { "clients": { "grpc": { @@ -344,6 +380,48 @@ } } }, + "Playbooks": { + "clients": { + "grpc": { + "libraryClient": "PlaybooksClient", + "rpcs": { + "CreatePlaybook": { + "methods": ["createPlaybook", "createPlaybook", "createPlaybook", "createPlaybookCallable"] + }, + "CreatePlaybookVersion": { + "methods": ["createPlaybookVersion", "createPlaybookVersion", "createPlaybookVersion", "createPlaybookVersionCallable"] + }, + "DeletePlaybook": { + "methods": ["deletePlaybook", "deletePlaybook", "deletePlaybook", "deletePlaybookCallable"] + }, + "DeletePlaybookVersion": { + "methods": ["deletePlaybookVersion", "deletePlaybookVersion", "deletePlaybookVersion", "deletePlaybookVersionCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetPlaybook": { + "methods": ["getPlaybook", "getPlaybook", "getPlaybook", "getPlaybookCallable"] + }, + "GetPlaybookVersion": { + "methods": ["getPlaybookVersion", "getPlaybookVersion", "getPlaybookVersion", "getPlaybookVersionCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListPlaybookVersions": { + "methods": ["listPlaybookVersions", "listPlaybookVersions", "listPlaybookVersions", "listPlaybookVersionsPagedCallable", "listPlaybookVersionsCallable"] + }, + "ListPlaybooks": { + "methods": ["listPlaybooks", "listPlaybooks", "listPlaybooks", "listPlaybooksPagedCallable", "listPlaybooksCallable"] + }, + "UpdatePlaybook": { + "methods": ["updatePlaybook", "updatePlaybook", "updatePlaybookCallable"] + } + } + } + } + }, "SecuritySettingsService": { "clients": { "grpc": { @@ -394,6 +472,9 @@ "MatchIntent": { "methods": ["matchIntent", "matchIntentCallable"] }, + "ServerStreamingDetectIntent": { + "methods": ["serverStreamingDetectIntentCallable"] + }, "StreamingDetectIntent": { "methods": ["streamingDetectIntentCallable"] }, @@ -485,6 +566,39 @@ } } }, + "Tools": { + "clients": { + "grpc": { + "libraryClient": "ToolsClient", + "rpcs": { + "CreateTool": { + "methods": ["createTool", "createTool", "createTool", "createToolCallable"] + }, + "DeleteTool": { + "methods": ["deleteTool", "deleteTool", "deleteTool", "deleteToolCallable"] + }, + "ExportTools": { + "methods": ["exportToolsAsync", "exportToolsOperationCallable", "exportToolsCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "GetTool": { + "methods": ["getTool", "getTool", "getTool", "getToolCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "ListTools": { + "methods": ["listTools", "listTools", "listTools", "listToolsPagedCallable", "listToolsCallable"] + }, + "UpdateTool": { + "methods": ["updateTool", "updateTool", "updateToolCallable"] + } + } + } + } + }, "TransitionRouteGroups": { "clients": { "grpc": { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java index cf53d5ca68b7..37b04c12fa97 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/package-info.java @@ -116,6 +116,26 @@ * } * } * + *

======================= ExamplesClient ======================= + * + *

Service Description: Service for managing + * [Examples][google.cloud.dialogflow.cx.v3beta1.Example]. + * + *

Sample for ExamplesClient: + * + *

{@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 (ExamplesClient examplesClient = ExamplesClient.create()) {
+ *   PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]");
+ *   Example example = Example.newBuilder().build();
+ *   Example response = examplesClient.createExample(parent, example);
+ * }
+ * }
+ * *

======================= ExperimentsClient ======================= * *

Service Description: Service for managing @@ -211,6 +231,26 @@ * } * } * + *

======================= PlaybooksClient ======================= + * + *

Service Description: Service for managing + * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook]. + * + *

Sample for PlaybooksClient: + * + *

{@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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Playbook playbook = Playbook.newBuilder().build();
+ *   Playbook response = playbooksClient.createPlaybook(parent, playbook);
+ * }
+ * }
+ * *

======================= SecuritySettingsServiceClient ======================= * *

Service Description: Service for managing security settings for Dialogflow. @@ -302,6 +342,25 @@ * } * } * + *

======================= ToolsClient ======================= + * + *

Service Description: Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool]. + * + *

Sample for ToolsClient: + * + *

{@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 (ToolsClient toolsClient = ToolsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ *   Tool tool = Tool.newBuilder().build();
+ *   Tool response = toolsClient.createTool(parent, tool);
+ * }
+ * }
+ * *

======================= TransitionRouteGroupsClient ======================= * *

Service Description: Service for managing diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java index fa98e4db89cc..7ffdc84df2ae 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStub.java @@ -21,11 +21,18 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.EntityType; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; @@ -33,6 +40,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; import javax.annotation.Generated; @@ -46,6 +55,14 @@ @Generated("by gapic-generator-java") public abstract class EntityTypesStub implements BackgroundResource { + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + public UnaryCallable getEntityTypeCallable() { throw new UnsupportedOperationException("Not implemented: getEntityTypeCallable()"); } @@ -71,6 +88,28 @@ public UnaryCallable listEntity throw new UnsupportedOperationException("Not implemented: listEntityTypesCallable()"); } + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: exportEntityTypesOperationCallable()"); + } + + public UnaryCallable exportEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: exportEntityTypesCallable()"); + } + + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: importEntityTypesOperationCallable()"); + } + + public UnaryCallable importEntityTypesCallable() { + throw new UnsupportedOperationException("Not implemented: importEntityTypesCallable()"); + } + public UnaryCallable listLocationsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java index 4faf7bb29110..b0808c7b5382 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/EntityTypesStubSettings.java @@ -28,13 +28,17 @@ import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.GrpcTransportChannel; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; import com.google.api.gax.httpjson.GaxHttpJsonProperties; import com.google.api.gax.httpjson.HttpJsonTransportChannel; import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; @@ -47,7 +51,13 @@ import com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.EntityType; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; @@ -59,6 +69,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import java.io.IOException; import java.util.List; @@ -119,6 +130,14 @@ public class EntityTypesStubSettings extends StubSettings listEntityTypesSettings; + private final UnaryCallSettings exportEntityTypesSettings; + private final OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings; + private final UnaryCallSettings importEntityTypesSettings; + private final OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings; private final PagedCallSettings< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -260,6 +279,30 @@ public UnaryCallSettings deleteEntityTypeSetting return listEntityTypesSettings; } + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings exportEntityTypesSettings() { + return exportEntityTypesSettings; + } + + /** Returns the object with the settings used for calls to exportEntityTypes. */ + public OperationCallSettings< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return exportEntityTypesOperationSettings; + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public UnaryCallSettings importEntityTypesSettings() { + return importEntityTypesSettings; + } + + /** Returns the object with the settings used for calls to importEntityTypes. */ + public OperationCallSettings< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return importEntityTypesOperationSettings; + } + /** Returns the object with the settings used for calls to listLocations. */ public PagedCallSettings listLocationsSettings() { @@ -397,6 +440,12 @@ protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException { updateEntityTypeSettings = settingsBuilder.updateEntityTypeSettings().build(); deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build(); listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build(); + exportEntityTypesSettings = settingsBuilder.exportEntityTypesSettings().build(); + exportEntityTypesOperationSettings = + settingsBuilder.exportEntityTypesOperationSettings().build(); + importEntityTypesSettings = settingsBuilder.importEntityTypesSettings().build(); + importEntityTypesOperationSettings = + settingsBuilder.importEntityTypesOperationSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); } @@ -414,6 +463,16 @@ public static class Builder extends StubSettings.Builder listEntityTypesSettings; + private final UnaryCallSettings.Builder + exportEntityTypesSettings; + private final OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings; + private final UnaryCallSettings.Builder + importEntityTypesSettings; + private final OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings; private final PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> listLocationsSettings; @@ -461,6 +520,10 @@ protected Builder(ClientContext clientContext) { updateEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT); + exportEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportEntityTypesOperationSettings = OperationCallSettings.newBuilder(); + importEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + importEntityTypesOperationSettings = OperationCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -471,6 +534,8 @@ protected Builder(ClientContext clientContext) { updateEntityTypeSettings, deleteEntityTypeSettings, listEntityTypesSettings, + exportEntityTypesSettings, + importEntityTypesSettings, listLocationsSettings, getLocationSettings); initDefaults(this); @@ -484,6 +549,10 @@ protected Builder(EntityTypesStubSettings settings) { updateEntityTypeSettings = settings.updateEntityTypeSettings.toBuilder(); deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder(); listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder(); + exportEntityTypesSettings = settings.exportEntityTypesSettings.toBuilder(); + exportEntityTypesOperationSettings = settings.exportEntityTypesOperationSettings.toBuilder(); + importEntityTypesSettings = settings.importEntityTypesSettings.toBuilder(); + importEntityTypesOperationSettings = settings.importEntityTypesOperationSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -494,6 +563,8 @@ protected Builder(EntityTypesStubSettings settings) { updateEntityTypeSettings, deleteEntityTypeSettings, listEntityTypesSettings, + exportEntityTypesSettings, + importEntityTypesSettings, listLocationsSettings, getLocationSettings); } @@ -548,6 +619,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .exportEntityTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .importEntityTypesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listLocationsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -558,6 +639,58 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .exportEntityTypesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExportEntityTypesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportEntityTypesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .importEntityTypesOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportEntityTypesResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ImportEntityTypesMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -605,6 +738,36 @@ public UnaryCallSettings.Builder deleteEntityTyp return listEntityTypesSettings; } + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + public UnaryCallSettings.Builder + exportEntityTypesSettings() { + return exportEntityTypesSettings; + } + + /** Returns the builder for the settings used for calls to exportEntityTypes. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationSettings() { + return exportEntityTypesOperationSettings; + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + public UnaryCallSettings.Builder + importEntityTypesSettings() { + return importEntityTypesSettings; + } + + /** Returns the builder for the settings used for calls to importEntityTypes. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationSettings() { + return importEntityTypesOperationSettings; + } + /** Returns the builder for the settings used for calls to listLocations. */ public PagedCallSettings.Builder< ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStub.java new file mode 100644 index 000000000000..d2ca81399ff6 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStub.java @@ -0,0 +1,88 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ExamplesStub implements BackgroundResource { + + public UnaryCallable createExampleCallable() { + throw new UnsupportedOperationException("Not implemented: createExampleCallable()"); + } + + public UnaryCallable deleteExampleCallable() { + throw new UnsupportedOperationException("Not implemented: deleteExampleCallable()"); + } + + public UnaryCallable listExamplesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesPagedCallable()"); + } + + public UnaryCallable listExamplesCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesCallable()"); + } + + public UnaryCallable getExampleCallable() { + throw new UnsupportedOperationException("Not implemented: getExampleCallable()"); + } + + public UnaryCallable updateExampleCallable() { + throw new UnsupportedOperationException("Not implemented: updateExampleCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java new file mode 100644 index 000000000000..7fa01ba5529c --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ExamplesStubSettings.java @@ -0,0 +1,622 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ExamplesStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createExample to 30 seconds: + * + *

{@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
+ * ExamplesStubSettings.Builder examplesSettingsBuilder = ExamplesStubSettings.newBuilder();
+ * examplesSettingsBuilder
+ *     .createExampleSettings()
+ *     .setRetrySettings(
+ *         examplesSettingsBuilder
+ *             .createExampleSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ExamplesStubSettings examplesSettings = examplesSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ExamplesStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createExampleSettings; + private final UnaryCallSettings deleteExampleSettings; + private final PagedCallSettings< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings getExampleSettings; + private final UnaryCallSettings updateExampleSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_EXAMPLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExamplesRequest injectToken(ListExamplesRequest payload, String token) { + return ListExamplesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExamplesRequest injectPageSize(ListExamplesRequest payload, int pageSize) { + return ListExamplesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExamplesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExamplesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExamplesResponse payload) { + return payload.getExamplesList() == null + ? ImmutableList.of() + : payload.getExamplesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + LIST_EXAMPLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExamplesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXAMPLES_PAGE_STR_DESC, request, context); + return ListExamplesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createExample. */ + public UnaryCallSettings createExampleSettings() { + return createExampleSettings; + } + + /** Returns the object with the settings used for calls to deleteExample. */ + public UnaryCallSettings deleteExampleSettings() { + return deleteExampleSettings; + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return getExampleSettings; + } + + /** Returns the object with the settings used for calls to updateExample. */ + public UnaryCallSettings updateExampleSettings() { + return updateExampleSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ExamplesStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcExamplesStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonExamplesStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ExamplesStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ExamplesStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ExamplesStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ExamplesStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createExampleSettings = settingsBuilder.createExampleSettings().build(); + deleteExampleSettings = settingsBuilder.deleteExampleSettings().build(); + listExamplesSettings = settingsBuilder.listExamplesSettings().build(); + getExampleSettings = settingsBuilder.getExampleSettings().build(); + updateExampleSettings = settingsBuilder.updateExampleSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ExamplesStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createExampleSettings; + private final UnaryCallSettings.Builder deleteExampleSettings; + private final PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings.Builder getExampleSettings; + private final UnaryCallSettings.Builder updateExampleSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listExamplesSettings = PagedCallSettings.newBuilder(LIST_EXAMPLES_PAGE_STR_FACT); + getExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createExampleSettings, + deleteExampleSettings, + listExamplesSettings, + getExampleSettings, + updateExampleSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ExamplesStubSettings settings) { + super(settings); + + createExampleSettings = settings.createExampleSettings.toBuilder(); + deleteExampleSettings = settings.deleteExampleSettings.toBuilder(); + listExamplesSettings = settings.listExamplesSettings.toBuilder(); + getExampleSettings = settings.getExampleSettings.toBuilder(); + updateExampleSettings = settings.updateExampleSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createExampleSettings, + deleteExampleSettings, + listExamplesSettings, + getExampleSettings, + updateExampleSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listExamplesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createExample. */ + public UnaryCallSettings.Builder createExampleSettings() { + return createExampleSettings; + } + + /** Returns the builder for the settings used for calls to deleteExample. */ + public UnaryCallSettings.Builder deleteExampleSettings() { + return deleteExampleSettings; + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getExampleSettings; + } + + /** Returns the builder for the settings used for calls to updateExample. */ + public UnaryCallSettings.Builder updateExampleSettings() { + return updateExampleSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public ExamplesStubSettings build() throws IOException { + return new ExamplesStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java index 1c26a846be42..7fd8f5251cde 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcEntityTypesStub.java @@ -25,12 +25,19 @@ import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcStubCallableFactory; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.EntityType; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; @@ -38,6 +45,7 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; import io.grpc.MethodDescriptor; @@ -106,6 +114,26 @@ public class GrpcEntityTypesStub extends EntityTypesStub { ProtoUtils.marshaller(ListEntityTypesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + exportEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ExportEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + importEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ImportEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(ImportEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor listLocationsMethodDescriptor = MethodDescriptor.newBuilder() @@ -133,6 +161,14 @@ public class GrpcEntityTypesStub extends EntityTypesStub { listEntityTypesCallable; private final UnaryCallable listEntityTypesPagedCallable; + private final UnaryCallable exportEntityTypesCallable; + private final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable; + private final UnaryCallable importEntityTypesCallable; + private final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; @@ -232,6 +268,26 @@ protected GrpcEntityTypesStub( return builder.build(); }) .build(); + GrpcCallSettings exportEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings importEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importEntityTypesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings listLocationsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listLocationsMethodDescriptor) @@ -271,6 +327,28 @@ protected GrpcEntityTypesStub( this.listEntityTypesPagedCallable = callableFactory.createPagedCallable( listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.exportEntityTypesCallable = + callableFactory.createUnaryCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesSettings(), + clientContext); + this.exportEntityTypesOperationCallable = + callableFactory.createOperationCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesOperationSettings(), + clientContext, + operationsStub); + this.importEntityTypesCallable = + callableFactory.createUnaryCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesSettings(), + clientContext); + this.importEntityTypesOperationCallable = + callableFactory.createOperationCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesOperationSettings(), + clientContext, + operationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -320,6 +398,30 @@ public UnaryCallable listEntity return listEntityTypesPagedCallable; } + @Override + public UnaryCallable exportEntityTypesCallable() { + return exportEntityTypesCallable; + } + + @Override + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return exportEntityTypesOperationCallable; + } + + @Override + public UnaryCallable importEntityTypesCallable() { + return importEntityTypesCallable; + } + + @Override + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return importEntityTypesOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesCallableFactory.java new file mode 100644 index 000000000000..3edc6097efb4 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Examples service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcExamplesCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesStub.java new file mode 100644 index 000000000000..a0ca4771461d --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcExamplesStub.java @@ -0,0 +1,362 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcExamplesStub extends ExamplesStub { + private static final MethodDescriptor + createExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/CreateExample") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/DeleteExample") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listExamplesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/ListExamples") + .setRequestMarshaller(ProtoUtils.marshaller(ListExamplesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExamplesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/GetExample") + .setRequestMarshaller(ProtoUtils.marshaller(GetExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/UpdateExample") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable createExampleCallable; + private final UnaryCallable deleteExampleCallable; + private final UnaryCallable listExamplesCallable; + private final UnaryCallable + listExamplesPagedCallable; + private final UnaryCallable getExampleCallable; + private final UnaryCallable updateExampleCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcExamplesStub create(ExamplesStubSettings settings) throws IOException { + return new GrpcExamplesStub(settings, ClientContext.create(settings)); + } + + public static final GrpcExamplesStub create(ClientContext clientContext) throws IOException { + return new GrpcExamplesStub(ExamplesStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcExamplesStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcExamplesStub( + ExamplesStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcExamplesStub, 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 GrpcExamplesStub(ExamplesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcExamplesCallableFactory()); + } + + /** + * Constructs an instance of GrpcExamplesStub, 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 GrpcExamplesStub( + ExamplesStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listExamplesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExamplesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateExampleMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("example.name", String.valueOf(request.getExample().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createExampleCallable = + callableFactory.createUnaryCallable( + createExampleTransportSettings, settings.createExampleSettings(), clientContext); + this.deleteExampleCallable = + callableFactory.createUnaryCallable( + deleteExampleTransportSettings, settings.deleteExampleSettings(), clientContext); + this.listExamplesCallable = + callableFactory.createUnaryCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.listExamplesPagedCallable = + callableFactory.createPagedCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.getExampleCallable = + callableFactory.createUnaryCallable( + getExampleTransportSettings, settings.getExampleSettings(), clientContext); + this.updateExampleCallable = + callableFactory.createUnaryCallable( + updateExampleTransportSettings, settings.updateExampleSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createExampleCallable() { + return createExampleCallable; + } + + @Override + public UnaryCallable deleteExampleCallable() { + return deleteExampleCallable; + } + + @Override + public UnaryCallable listExamplesCallable() { + return listExamplesCallable; + } + + @Override + public UnaryCallable listExamplesPagedCallable() { + return listExamplesPagedCallable; + } + + @Override + public UnaryCallable getExampleCallable() { + return getExampleCallable; + } + + @Override + public UnaryCallable updateExampleCallable() { + return updateExampleCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksCallableFactory.java new file mode 100644 index 000000000000..c4d0fe0d7df5 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Playbooks service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPlaybooksCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksStub.java new file mode 100644 index 000000000000..42b72f5fe0d3 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcPlaybooksStub.java @@ -0,0 +1,524 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcPlaybooksStub extends PlaybooksStub { + private static final MethodDescriptor + createPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPlaybooksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybooks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPlaybooksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPlaybooksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getPlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybook") + .setRequestMarshaller(ProtoUtils.marshaller(GetPlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePlaybookMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/UpdatePlaybook") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdatePlaybookRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Playbook.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createPlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(CreatePlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PlaybookVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getPlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(GetPlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(PlaybookVersion.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPlaybookVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybookVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPlaybookVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPlaybookVersionsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deletePlaybookVersionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybookVersion") + .setRequestMarshaller( + ProtoUtils.marshaller(DeletePlaybookVersionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable createPlaybookCallable; + private final UnaryCallable deletePlaybookCallable; + private final UnaryCallable listPlaybooksCallable; + private final UnaryCallable + listPlaybooksPagedCallable; + private final UnaryCallable getPlaybookCallable; + private final UnaryCallable updatePlaybookCallable; + private final UnaryCallable + createPlaybookVersionCallable; + private final UnaryCallable + getPlaybookVersionCallable; + private final UnaryCallable + listPlaybookVersionsCallable; + private final UnaryCallable + listPlaybookVersionsPagedCallable; + private final UnaryCallable deletePlaybookVersionCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcPlaybooksStub create(PlaybooksStubSettings settings) throws IOException { + return new GrpcPlaybooksStub(settings, ClientContext.create(settings)); + } + + public static final GrpcPlaybooksStub create(ClientContext clientContext) throws IOException { + return new GrpcPlaybooksStub(PlaybooksStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcPlaybooksStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcPlaybooksStub( + PlaybooksStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcPlaybooksStub, 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 GrpcPlaybooksStub(PlaybooksStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcPlaybooksCallableFactory()); + } + + /** + * Constructs an instance of GrpcPlaybooksStub, 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 GrpcPlaybooksStub( + PlaybooksStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listPlaybooksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPlaybooksMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getPlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updatePlaybookTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePlaybookMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("playbook.name", String.valueOf(request.getPlaybook().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createPlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getPlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listPlaybookVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPlaybookVersionsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deletePlaybookVersionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookVersionMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createPlaybookCallable = + callableFactory.createUnaryCallable( + createPlaybookTransportSettings, settings.createPlaybookSettings(), clientContext); + this.deletePlaybookCallable = + callableFactory.createUnaryCallable( + deletePlaybookTransportSettings, settings.deletePlaybookSettings(), clientContext); + this.listPlaybooksCallable = + callableFactory.createUnaryCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.listPlaybooksPagedCallable = + callableFactory.createPagedCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.getPlaybookCallable = + callableFactory.createUnaryCallable( + getPlaybookTransportSettings, settings.getPlaybookSettings(), clientContext); + this.updatePlaybookCallable = + callableFactory.createUnaryCallable( + updatePlaybookTransportSettings, settings.updatePlaybookSettings(), clientContext); + this.createPlaybookVersionCallable = + callableFactory.createUnaryCallable( + createPlaybookVersionTransportSettings, + settings.createPlaybookVersionSettings(), + clientContext); + this.getPlaybookVersionCallable = + callableFactory.createUnaryCallable( + getPlaybookVersionTransportSettings, + settings.getPlaybookVersionSettings(), + clientContext); + this.listPlaybookVersionsCallable = + callableFactory.createUnaryCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.listPlaybookVersionsPagedCallable = + callableFactory.createPagedCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.deletePlaybookVersionCallable = + callableFactory.createUnaryCallable( + deletePlaybookVersionTransportSettings, + settings.deletePlaybookVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createPlaybookCallable() { + return createPlaybookCallable; + } + + @Override + public UnaryCallable deletePlaybookCallable() { + return deletePlaybookCallable; + } + + @Override + public UnaryCallable listPlaybooksCallable() { + return listPlaybooksCallable; + } + + @Override + public UnaryCallable + listPlaybooksPagedCallable() { + return listPlaybooksPagedCallable; + } + + @Override + public UnaryCallable getPlaybookCallable() { + return getPlaybookCallable; + } + + @Override + public UnaryCallable updatePlaybookCallable() { + return updatePlaybookCallable; + } + + @Override + public UnaryCallable + createPlaybookVersionCallable() { + return createPlaybookVersionCallable; + } + + @Override + public UnaryCallable getPlaybookVersionCallable() { + return getPlaybookVersionCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsCallable() { + return listPlaybookVersionsCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsPagedCallable() { + return listPlaybookVersionsPagedCallable; + } + + @Override + public UnaryCallable deletePlaybookVersionCallable() { + return deletePlaybookVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java index c423601c1b1e..3875d771a976 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcSessionsStub.java @@ -26,6 +26,7 @@ import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; @@ -67,6 +68,17 @@ public class GrpcSessionsStub extends SessionsStub { ProtoUtils.marshaller(DetectIntentResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + serverStreamingDetectIntentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Sessions/ServerStreamingDetectIntent") + .setRequestMarshaller(ProtoUtils.marshaller(DetectIntentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DetectIntentResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor streamingDetectIntentMethodDescriptor = MethodDescriptor.newBuilder() @@ -130,6 +142,8 @@ public class GrpcSessionsStub extends SessionsStub { .build(); private final UnaryCallable detectIntentCallable; + private final ServerStreamingCallable + serverStreamingDetectIntentCallable; private final BidiStreamingCallable streamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; @@ -190,6 +204,17 @@ protected GrpcSessionsStub( return builder.build(); }) .build(); + GrpcCallSettings + serverStreamingDetectIntentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(serverStreamingDetectIntentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); GrpcCallSettings streamingDetectIntentTransportSettings = GrpcCallSettings @@ -253,6 +278,11 @@ protected GrpcSessionsStub( this.detectIntentCallable = callableFactory.createUnaryCallable( detectIntentTransportSettings, settings.detectIntentSettings(), clientContext); + this.serverStreamingDetectIntentCallable = + callableFactory.createServerStreamingCallable( + serverStreamingDetectIntentTransportSettings, + settings.serverStreamingDetectIntentSettings(), + clientContext); this.streamingDetectIntentCallable = callableFactory.createBidiStreamingCallable( streamingDetectIntentTransportSettings, @@ -292,6 +322,12 @@ public UnaryCallable detectIntentCall return detectIntentCallable; } + @Override + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return serverStreamingDetectIntentCallable; + } + @Override public BidiStreamingCallable streamingDetectIntentCallable() { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsCallableFactory.java new file mode 100644 index 000000000000..8ef3adbd4e1a --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Tools service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcToolsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsStub.java new file mode 100644 index 000000000000..f1bceafa6881 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcToolsStub.java @@ -0,0 +1,402 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcToolsStub extends ToolsStub { + private static final MethodDescriptor createToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/CreateTool") + .setRequestMarshaller(ProtoUtils.marshaller(CreateToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listToolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/ListTools") + .setRequestMarshaller(ProtoUtils.marshaller(ListToolsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListToolsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor exportToolsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/ExportTools") + .setRequestMarshaller(ProtoUtils.marshaller(ExportToolsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/GetTool") + .setRequestMarshaller(ProtoUtils.marshaller(GetToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/UpdateTool") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Tool.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteToolMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/DeleteTool") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteToolRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable createToolCallable; + private final UnaryCallable listToolsCallable; + private final UnaryCallable listToolsPagedCallable; + private final UnaryCallable exportToolsCallable; + private final OperationCallable + exportToolsOperationCallable; + private final UnaryCallable getToolCallable; + private final UnaryCallable updateToolCallable; + private final UnaryCallable deleteToolCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcToolsStub create(ToolsStubSettings settings) throws IOException { + return new GrpcToolsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcToolsStub create(ClientContext clientContext) throws IOException { + return new GrpcToolsStub(ToolsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcToolsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcToolsStub( + ToolsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcToolsStub, 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 GrpcToolsStub(ToolsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcToolsCallableFactory()); + } + + /** + * Constructs an instance of GrpcToolsStub, 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 GrpcToolsStub( + ToolsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings listToolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listToolsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings exportToolsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportToolsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("tool.name", String.valueOf(request.getTool().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteToolTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteToolMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createToolCallable = + callableFactory.createUnaryCallable( + createToolTransportSettings, settings.createToolSettings(), clientContext); + this.listToolsCallable = + callableFactory.createUnaryCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.listToolsPagedCallable = + callableFactory.createPagedCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.exportToolsCallable = + callableFactory.createUnaryCallable( + exportToolsTransportSettings, settings.exportToolsSettings(), clientContext); + this.exportToolsOperationCallable = + callableFactory.createOperationCallable( + exportToolsTransportSettings, + settings.exportToolsOperationSettings(), + clientContext, + operationsStub); + this.getToolCallable = + callableFactory.createUnaryCallable( + getToolTransportSettings, settings.getToolSettings(), clientContext); + this.updateToolCallable = + callableFactory.createUnaryCallable( + updateToolTransportSettings, settings.updateToolSettings(), clientContext); + this.deleteToolCallable = + callableFactory.createUnaryCallable( + deleteToolTransportSettings, settings.deleteToolSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createToolCallable() { + return createToolCallable; + } + + @Override + public UnaryCallable listToolsCallable() { + return listToolsCallable; + } + + @Override + public UnaryCallable listToolsPagedCallable() { + return listToolsPagedCallable; + } + + @Override + public UnaryCallable exportToolsCallable() { + return exportToolsCallable; + } + + @Override + public OperationCallable + exportToolsOperationCallable() { + return exportToolsOperationCallable; + } + + @Override + public UnaryCallable getToolCallable() { + return getToolCallable; + } + + @Override + public UnaryCallable updateToolCallable() { + return updateToolCallable; + } + + @Override + public UnaryCallable deleteToolCallable() { + return deleteToolCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java index b0c7fcbba552..22d4fb4d95e4 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonEntityTypesStub.java @@ -19,23 +19,33 @@ import static com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient.ListEntityTypesPagedResponse; import static com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient.ListLocationsPagedResponse; +import com.google.api.HttpRule; import com.google.api.core.BetaApi; import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.core.BackgroundResourceAggregation; import com.google.api.gax.httpjson.ApiMethodDescriptor; import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; import com.google.api.gax.httpjson.ProtoMessageResponseParser; import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsBuilder; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.CreateEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.DeleteEntityTypeRequest; import com.google.cloud.dialogflow.cx.v3beta1.EntityType; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.GetEntityTypeRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest; import com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse; import com.google.cloud.dialogflow.cx.v3beta1.UpdateEntityTypeRequest; @@ -43,6 +53,8 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; import com.google.protobuf.Empty; import com.google.protobuf.TypeRegistry; import java.io.IOException; @@ -62,7 +74,13 @@ @BetaApi @Generated("by gapic-generator-java") public class HttpJsonEntityTypesStub extends EntityTypesStub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ImportEntityTypesMetadata.getDescriptor()) + .add(ExportEntityTypesMetadata.getDescriptor()) + .add(ImportEntityTypesResponse.getDescriptor()) + .add(ExportEntityTypesResponse.getDescriptor()) + .build(); private static final ApiMethodDescriptor getEntityTypeMethodDescriptor = @@ -253,6 +271,86 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { .build()) .build(); + private static final ApiMethodDescriptor + exportEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ExportEntityTypes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes:export", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportEntityTypesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + importEntityTypesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.EntityTypes/ImportEntityTypes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/entityTypes:import", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ImportEntityTypesRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + private static final ApiMethodDescriptor listLocationsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -329,12 +427,21 @@ public class HttpJsonEntityTypesStub extends EntityTypesStub { listEntityTypesCallable; private final UnaryCallable listEntityTypesPagedCallable; + private final UnaryCallable exportEntityTypesCallable; + private final OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable; + private final UnaryCallable importEntityTypesCallable; + private final OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable; private final UnaryCallable listLocationsCallable; private final UnaryCallable listLocationsPagedCallable; private final UnaryCallable getLocationCallable; private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; private final HttpJsonStubCallableFactory callableFactory; public static final HttpJsonEntityTypesStub create(EntityTypesStubSettings settings) @@ -375,6 +482,41 @@ protected HttpJsonEntityTypesStub( HttpJsonStubCallableFactory callableFactory) throws IOException { this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v3beta1/{name=projects/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v3beta1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*}/operations") + .build()) + .build()) + .build()); HttpJsonCallSettings getEntityTypeTransportSettings = HttpJsonCallSettings.newBuilder() @@ -433,6 +575,28 @@ protected HttpJsonEntityTypesStub( return builder.build(); }) .build(); + HttpJsonCallSettings exportEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings importEntityTypesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(importEntityTypesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings listLocationsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -475,6 +639,28 @@ protected HttpJsonEntityTypesStub( this.listEntityTypesPagedCallable = callableFactory.createPagedCallable( listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); + this.exportEntityTypesCallable = + callableFactory.createUnaryCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesSettings(), + clientContext); + this.exportEntityTypesOperationCallable = + callableFactory.createOperationCallable( + exportEntityTypesTransportSettings, + settings.exportEntityTypesOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.importEntityTypesCallable = + callableFactory.createUnaryCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesSettings(), + clientContext); + this.importEntityTypesOperationCallable = + callableFactory.createOperationCallable( + importEntityTypesTransportSettings, + settings.importEntityTypesOperationSettings(), + clientContext, + httpJsonOperationsStub); this.listLocationsCallable = callableFactory.createUnaryCallable( listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); @@ -497,11 +683,17 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateEntityTypeMethodDescriptor); methodDescriptors.add(deleteEntityTypeMethodDescriptor); methodDescriptors.add(listEntityTypesMethodDescriptor); + methodDescriptors.add(exportEntityTypesMethodDescriptor); + methodDescriptors.add(importEntityTypesMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); return methodDescriptors; } + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + @Override public UnaryCallable getEntityTypeCallable() { return getEntityTypeCallable; @@ -533,6 +725,30 @@ public UnaryCallable listEntity return listEntityTypesPagedCallable; } + @Override + public UnaryCallable exportEntityTypesCallable() { + return exportEntityTypesCallable; + } + + @Override + public OperationCallable< + ExportEntityTypesRequest, ExportEntityTypesResponse, ExportEntityTypesMetadata> + exportEntityTypesOperationCallable() { + return exportEntityTypesOperationCallable; + } + + @Override + public UnaryCallable importEntityTypesCallable() { + return importEntityTypesCallable; + } + + @Override + public OperationCallable< + ImportEntityTypesRequest, ImportEntityTypesResponse, ImportEntityTypesMetadata> + importEntityTypesOperationCallable() { + return importEntityTypesOperationCallable; + } + @Override public UnaryCallable listLocationsCallable() { return listLocationsCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesCallableFactory.java new file mode 100644 index 000000000000..109aa78c945c --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Examples service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonExamplesCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesStub.java new file mode 100644 index 000000000000..eeedf5ec3f6b --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonExamplesStub.java @@ -0,0 +1,574 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Examples service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonExamplesStub extends ExamplesStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/CreateExample") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("example", request.getExample(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/DeleteExample") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listExamplesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/ListExamples") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam( + fields, "languageCode", request.getLanguageCode()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListExamplesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor getExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/GetExample") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateExampleMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Examples/UpdateExample") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "example.name", request.getExample().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("example", request.getExample(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Example.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createExampleCallable; + private final UnaryCallable deleteExampleCallable; + private final UnaryCallable listExamplesCallable; + private final UnaryCallable + listExamplesPagedCallable; + private final UnaryCallable getExampleCallable; + private final UnaryCallable updateExampleCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonExamplesStub create(ExamplesStubSettings settings) + throws IOException { + return new HttpJsonExamplesStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonExamplesStub create(ClientContext clientContext) throws IOException { + return new HttpJsonExamplesStub( + ExamplesStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonExamplesStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonExamplesStub( + ExamplesStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonExamplesStub, 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 HttpJsonExamplesStub(ExamplesStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonExamplesCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonExamplesStub, 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 HttpJsonExamplesStub( + ExamplesStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listExamplesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listExamplesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateExampleTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateExampleMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("example.name", String.valueOf(request.getExample().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createExampleCallable = + callableFactory.createUnaryCallable( + createExampleTransportSettings, settings.createExampleSettings(), clientContext); + this.deleteExampleCallable = + callableFactory.createUnaryCallable( + deleteExampleTransportSettings, settings.deleteExampleSettings(), clientContext); + this.listExamplesCallable = + callableFactory.createUnaryCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.listExamplesPagedCallable = + callableFactory.createPagedCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.getExampleCallable = + callableFactory.createUnaryCallable( + getExampleTransportSettings, settings.getExampleSettings(), clientContext); + this.updateExampleCallable = + callableFactory.createUnaryCallable( + updateExampleTransportSettings, settings.updateExampleSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createExampleMethodDescriptor); + methodDescriptors.add(deleteExampleMethodDescriptor); + methodDescriptors.add(listExamplesMethodDescriptor); + methodDescriptors.add(getExampleMethodDescriptor); + methodDescriptors.add(updateExampleMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createExampleCallable() { + return createExampleCallable; + } + + @Override + public UnaryCallable deleteExampleCallable() { + return deleteExampleCallable; + } + + @Override + public UnaryCallable listExamplesCallable() { + return listExamplesCallable; + } + + @Override + public UnaryCallable listExamplesPagedCallable() { + return listExamplesPagedCallable; + } + + @Override + public UnaryCallable getExampleCallable() { + return getExampleCallable; + } + + @Override + public UnaryCallable updateExampleCallable() { + return updateExampleCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksCallableFactory.java new file mode 100644 index 000000000000..b03b3629cf91 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Playbooks service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPlaybooksCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksStub.java new file mode 100644 index 000000000000..16eace7b99a2 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonPlaybooksStub.java @@ -0,0 +1,843 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonPlaybooksStub extends PlaybooksStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + createPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybook") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/playbooks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("playbook", request.getPlaybook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybook") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listPlaybooksMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybooks") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/playbooks", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPlaybooksResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybook") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePlaybookMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/UpdatePlaybook") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{playbook.name=projects/*/locations/*/agents/*/playbooks/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "playbook.name", request.getPlaybook().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("playbook", request.getPlaybook(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Playbook.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createPlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/CreatePlaybookVersion") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("playbookVersion", request.getPlaybookVersion(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PlaybookVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getPlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Playbooks/GetPlaybookVersion") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(PlaybookVersion.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse> + listPlaybookVersionsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/ListPlaybookVersions") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/versions", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListPlaybookVersionsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deletePlaybookVersionMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Playbooks/DeletePlaybookVersion") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/versions/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createPlaybookCallable; + private final UnaryCallable deletePlaybookCallable; + private final UnaryCallable listPlaybooksCallable; + private final UnaryCallable + listPlaybooksPagedCallable; + private final UnaryCallable getPlaybookCallable; + private final UnaryCallable updatePlaybookCallable; + private final UnaryCallable + createPlaybookVersionCallable; + private final UnaryCallable + getPlaybookVersionCallable; + private final UnaryCallable + listPlaybookVersionsCallable; + private final UnaryCallable + listPlaybookVersionsPagedCallable; + private final UnaryCallable deletePlaybookVersionCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonPlaybooksStub create(PlaybooksStubSettings settings) + throws IOException { + return new HttpJsonPlaybooksStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonPlaybooksStub create(ClientContext clientContext) throws IOException { + return new HttpJsonPlaybooksStub( + PlaybooksStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonPlaybooksStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonPlaybooksStub( + PlaybooksStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonPlaybooksStub, 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 HttpJsonPlaybooksStub(PlaybooksStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonPlaybooksCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonPlaybooksStub, 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 HttpJsonPlaybooksStub( + PlaybooksStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings createPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deletePlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPlaybooksTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listPlaybooksMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getPlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updatePlaybookTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePlaybookMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("playbook.name", String.valueOf(request.getPlaybook().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createPlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createPlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getPlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listPlaybookVersionsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listPlaybookVersionsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deletePlaybookVersionTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deletePlaybookVersionMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createPlaybookCallable = + callableFactory.createUnaryCallable( + createPlaybookTransportSettings, settings.createPlaybookSettings(), clientContext); + this.deletePlaybookCallable = + callableFactory.createUnaryCallable( + deletePlaybookTransportSettings, settings.deletePlaybookSettings(), clientContext); + this.listPlaybooksCallable = + callableFactory.createUnaryCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.listPlaybooksPagedCallable = + callableFactory.createPagedCallable( + listPlaybooksTransportSettings, settings.listPlaybooksSettings(), clientContext); + this.getPlaybookCallable = + callableFactory.createUnaryCallable( + getPlaybookTransportSettings, settings.getPlaybookSettings(), clientContext); + this.updatePlaybookCallable = + callableFactory.createUnaryCallable( + updatePlaybookTransportSettings, settings.updatePlaybookSettings(), clientContext); + this.createPlaybookVersionCallable = + callableFactory.createUnaryCallable( + createPlaybookVersionTransportSettings, + settings.createPlaybookVersionSettings(), + clientContext); + this.getPlaybookVersionCallable = + callableFactory.createUnaryCallable( + getPlaybookVersionTransportSettings, + settings.getPlaybookVersionSettings(), + clientContext); + this.listPlaybookVersionsCallable = + callableFactory.createUnaryCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.listPlaybookVersionsPagedCallable = + callableFactory.createPagedCallable( + listPlaybookVersionsTransportSettings, + settings.listPlaybookVersionsSettings(), + clientContext); + this.deletePlaybookVersionCallable = + callableFactory.createUnaryCallable( + deletePlaybookVersionTransportSettings, + settings.deletePlaybookVersionSettings(), + clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createPlaybookMethodDescriptor); + methodDescriptors.add(deletePlaybookMethodDescriptor); + methodDescriptors.add(listPlaybooksMethodDescriptor); + methodDescriptors.add(getPlaybookMethodDescriptor); + methodDescriptors.add(updatePlaybookMethodDescriptor); + methodDescriptors.add(createPlaybookVersionMethodDescriptor); + methodDescriptors.add(getPlaybookVersionMethodDescriptor); + methodDescriptors.add(listPlaybookVersionsMethodDescriptor); + methodDescriptors.add(deletePlaybookVersionMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable createPlaybookCallable() { + return createPlaybookCallable; + } + + @Override + public UnaryCallable deletePlaybookCallable() { + return deletePlaybookCallable; + } + + @Override + public UnaryCallable listPlaybooksCallable() { + return listPlaybooksCallable; + } + + @Override + public UnaryCallable + listPlaybooksPagedCallable() { + return listPlaybooksPagedCallable; + } + + @Override + public UnaryCallable getPlaybookCallable() { + return getPlaybookCallable; + } + + @Override + public UnaryCallable updatePlaybookCallable() { + return updatePlaybookCallable; + } + + @Override + public UnaryCallable + createPlaybookVersionCallable() { + return createPlaybookVersionCallable; + } + + @Override + public UnaryCallable getPlaybookVersionCallable() { + return getPlaybookVersionCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsCallable() { + return listPlaybookVersionsCallable; + } + + @Override + public UnaryCallable + listPlaybookVersionsPagedCallable() { + return listPlaybookVersionsPagedCallable; + } + + @Override + public UnaryCallable deletePlaybookVersionCallable() { + return deletePlaybookVersionCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java index 784e514bd9dd..95b389d28100 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonSessionsStub.java @@ -31,6 +31,7 @@ import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; @@ -105,6 +106,46 @@ public class HttpJsonSessionsStub extends SessionsStub { .build()) .build(); + private static final ApiMethodDescriptor + serverStreamingDetectIntentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dialogflow.cx.v3beta1.Sessions/ServerStreamingDetectIntent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "session", request.getSession()); + return fields; + }) + .setAdditionalPaths( + "/v3beta1/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:serverStreamingDetectIntent") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearSession().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(DetectIntentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor matchIntentMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -292,6 +333,8 @@ public class HttpJsonSessionsStub extends SessionsStub { .build(); private final UnaryCallable detectIntentCallable; + private final ServerStreamingCallable + serverStreamingDetectIntentCallable; private final UnaryCallable matchIntentCallable; private final UnaryCallable fulfillIntentCallable; private final UnaryCallable @@ -353,6 +396,18 @@ protected HttpJsonSessionsStub( return builder.build(); }) .build(); + HttpJsonCallSettings + serverStreamingDetectIntentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(serverStreamingDetectIntentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("session", String.valueOf(request.getSession())); + return builder.build(); + }) + .build(); HttpJsonCallSettings matchIntentTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(matchIntentMethodDescriptor) @@ -417,6 +472,11 @@ protected HttpJsonSessionsStub( this.detectIntentCallable = callableFactory.createUnaryCallable( detectIntentTransportSettings, settings.detectIntentSettings(), clientContext); + this.serverStreamingDetectIntentCallable = + callableFactory.createServerStreamingCallable( + serverStreamingDetectIntentTransportSettings, + settings.serverStreamingDetectIntentSettings(), + clientContext); this.matchIntentCallable = callableFactory.createUnaryCallable( matchIntentTransportSettings, settings.matchIntentSettings(), clientContext); @@ -446,6 +506,7 @@ protected HttpJsonSessionsStub( public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(detectIntentMethodDescriptor); + methodDescriptors.add(serverStreamingDetectIntentMethodDescriptor); methodDescriptors.add(matchIntentMethodDescriptor); methodDescriptors.add(fulfillIntentMethodDescriptor); methodDescriptors.add(submitAnswerFeedbackMethodDescriptor); @@ -459,6 +520,12 @@ public UnaryCallable detectIntentCall return detectIntentCallable; } + @Override + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + return serverStreamingDetectIntentCallable; + } + @Override public UnaryCallable matchIntentCallable() { return matchIntentCallable; diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsCallableFactory.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsCallableFactory.java new file mode 100644 index 000000000000..419381ec0018 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the Tools service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonToolsCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsStub.java new file mode 100644 index 000000000000..b602226e43c1 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/HttpJsonToolsStub.java @@ -0,0 +1,692 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.HttpRule; +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonToolsStub extends ToolsStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(ExportToolsResponse.getDescriptor()) + .add(ExportToolsMetadata.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor createToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/CreateTool") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("tool", request.getTool(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listToolsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/ListTools") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListToolsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + exportToolsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/ExportTools") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools:export", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearParent().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (ExportToolsRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor getToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/GetTool") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/UpdateTool") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{tool.name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "tool.name", request.getTool().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("tool", request.getTool(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Tool.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteToolMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Tools/DeleteTool") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*/agents/*/tools/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "force", request.getForce()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*}/locations", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v3beta1/{name=projects/*/locations/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createToolCallable; + private final UnaryCallable listToolsCallable; + private final UnaryCallable listToolsPagedCallable; + private final UnaryCallable exportToolsCallable; + private final OperationCallable + exportToolsOperationCallable; + private final UnaryCallable getToolCallable; + private final UnaryCallable updateToolCallable; + private final UnaryCallable deleteToolCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonToolsStub create(ToolsStubSettings settings) throws IOException { + return new HttpJsonToolsStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonToolsStub create(ClientContext clientContext) throws IOException { + return new HttpJsonToolsStub(ToolsStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonToolsStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonToolsStub( + ToolsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonToolsStub, 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 HttpJsonToolsStub(ToolsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonToolsCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonToolsStub, 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 HttpJsonToolsStub( + ToolsStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v3beta1/{name=projects/*/operations/*}:cancel") + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v3beta1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/operations/*}") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*/operations/*}") + .build()) + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*}/operations") + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v3beta1/{name=projects/*/locations/*}/operations") + .build()) + .build()) + .build()); + + HttpJsonCallSettings createToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings listToolsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listToolsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings exportToolsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(exportToolsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("tool.name", String.valueOf(request.getTool().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteToolTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteToolMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createToolCallable = + callableFactory.createUnaryCallable( + createToolTransportSettings, settings.createToolSettings(), clientContext); + this.listToolsCallable = + callableFactory.createUnaryCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.listToolsPagedCallable = + callableFactory.createPagedCallable( + listToolsTransportSettings, settings.listToolsSettings(), clientContext); + this.exportToolsCallable = + callableFactory.createUnaryCallable( + exportToolsTransportSettings, settings.exportToolsSettings(), clientContext); + this.exportToolsOperationCallable = + callableFactory.createOperationCallable( + exportToolsTransportSettings, + settings.exportToolsOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.getToolCallable = + callableFactory.createUnaryCallable( + getToolTransportSettings, settings.getToolSettings(), clientContext); + this.updateToolCallable = + callableFactory.createUnaryCallable( + updateToolTransportSettings, settings.updateToolSettings(), clientContext); + this.deleteToolCallable = + callableFactory.createUnaryCallable( + deleteToolTransportSettings, settings.deleteToolSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createToolMethodDescriptor); + methodDescriptors.add(listToolsMethodDescriptor); + methodDescriptors.add(exportToolsMethodDescriptor); + methodDescriptors.add(getToolMethodDescriptor); + methodDescriptors.add(updateToolMethodDescriptor); + methodDescriptors.add(deleteToolMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createToolCallable() { + return createToolCallable; + } + + @Override + public UnaryCallable listToolsCallable() { + return listToolsCallable; + } + + @Override + public UnaryCallable listToolsPagedCallable() { + return listToolsPagedCallable; + } + + @Override + public UnaryCallable exportToolsCallable() { + return exportToolsCallable; + } + + @Override + public OperationCallable + exportToolsOperationCallable() { + return exportToolsOperationCallable; + } + + @Override + public UnaryCallable getToolCallable() { + return getToolCallable; + } + + @Override + public UnaryCallable updateToolCallable() { + return updateToolCallable; + } + + @Override + public UnaryCallable deleteToolCallable() { + return deleteToolCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStub.java new file mode 100644 index 000000000000..7fa5fc9f3a34 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStub.java @@ -0,0 +1,119 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Playbooks service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class PlaybooksStub implements BackgroundResource { + + public UnaryCallable createPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: createPlaybookCallable()"); + } + + public UnaryCallable deletePlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: deletePlaybookCallable()"); + } + + public UnaryCallable + listPlaybooksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybooksPagedCallable()"); + } + + public UnaryCallable listPlaybooksCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybooksCallable()"); + } + + public UnaryCallable getPlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: getPlaybookCallable()"); + } + + public UnaryCallable updatePlaybookCallable() { + throw new UnsupportedOperationException("Not implemented: updatePlaybookCallable()"); + } + + public UnaryCallable + createPlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: createPlaybookVersionCallable()"); + } + + public UnaryCallable getPlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: getPlaybookVersionCallable()"); + } + + public UnaryCallable + listPlaybookVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybookVersionsPagedCallable()"); + } + + public UnaryCallable + listPlaybookVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listPlaybookVersionsCallable()"); + } + + public UnaryCallable deletePlaybookVersionCallable() { + throw new UnsupportedOperationException("Not implemented: deletePlaybookVersionCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java new file mode 100644 index 000000000000..b322d61c62e0 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/PlaybooksStubSettings.java @@ -0,0 +1,810 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link PlaybooksStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createPlaybook to 30 seconds: + * + *

{@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
+ * PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder();
+ * playbooksSettingsBuilder
+ *     .createPlaybookSettings()
+ *     .setRetrySettings(
+ *         playbooksSettingsBuilder
+ *             .createPlaybookSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * PlaybooksStubSettings playbooksSettings = playbooksSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class PlaybooksStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createPlaybookSettings; + private final UnaryCallSettings deletePlaybookSettings; + private final PagedCallSettings< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings; + private final UnaryCallSettings getPlaybookSettings; + private final UnaryCallSettings updatePlaybookSettings; + private final UnaryCallSettings + createPlaybookVersionSettings; + private final UnaryCallSettings + getPlaybookVersionSettings; + private final PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings; + private final UnaryCallSettings + deletePlaybookVersionSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_PLAYBOOKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPlaybooksRequest injectToken(ListPlaybooksRequest payload, String token) { + return ListPlaybooksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPlaybooksRequest injectPageSize(ListPlaybooksRequest payload, int pageSize) { + return ListPlaybooksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPlaybooksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPlaybooksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPlaybooksResponse payload) { + return payload.getPlaybooksList() == null + ? ImmutableList.of() + : payload.getPlaybooksList(); + } + }; + + private static final PagedListDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion> + LIST_PLAYBOOK_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPlaybookVersionsRequest injectToken( + ListPlaybookVersionsRequest payload, String token) { + return ListPlaybookVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPlaybookVersionsRequest injectPageSize( + ListPlaybookVersionsRequest payload, int pageSize) { + return ListPlaybookVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPlaybookVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPlaybookVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPlaybookVersionsResponse payload) { + return payload.getPlaybookVersionsList() == null + ? ImmutableList.of() + : payload.getPlaybookVersionsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + LIST_PLAYBOOKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPlaybooksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PLAYBOOKS_PAGE_STR_DESC, request, context); + return ListPlaybooksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + LIST_PLAYBOOK_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPlaybookVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPlaybookVersionsRequest, ListPlaybookVersionsResponse, PlaybookVersion> + pageContext = + PageContext.create( + callable, LIST_PLAYBOOK_VERSIONS_PAGE_STR_DESC, request, context); + return ListPlaybookVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createPlaybook. */ + public UnaryCallSettings createPlaybookSettings() { + return createPlaybookSettings; + } + + /** Returns the object with the settings used for calls to deletePlaybook. */ + public UnaryCallSettings deletePlaybookSettings() { + return deletePlaybookSettings; + } + + /** Returns the object with the settings used for calls to listPlaybooks. */ + public PagedCallSettings + listPlaybooksSettings() { + return listPlaybooksSettings; + } + + /** Returns the object with the settings used for calls to getPlaybook. */ + public UnaryCallSettings getPlaybookSettings() { + return getPlaybookSettings; + } + + /** Returns the object with the settings used for calls to updatePlaybook. */ + public UnaryCallSettings updatePlaybookSettings() { + return updatePlaybookSettings; + } + + /** Returns the object with the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings + createPlaybookVersionSettings() { + return createPlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings + getPlaybookVersionSettings() { + return getPlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return listPlaybookVersionsSettings; + } + + /** Returns the object with the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings deletePlaybookVersionSettings() { + return deletePlaybookVersionSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public PlaybooksStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcPlaybooksStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonPlaybooksStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlaybooksStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(PlaybooksStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return PlaybooksStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected PlaybooksStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createPlaybookSettings = settingsBuilder.createPlaybookSettings().build(); + deletePlaybookSettings = settingsBuilder.deletePlaybookSettings().build(); + listPlaybooksSettings = settingsBuilder.listPlaybooksSettings().build(); + getPlaybookSettings = settingsBuilder.getPlaybookSettings().build(); + updatePlaybookSettings = settingsBuilder.updatePlaybookSettings().build(); + createPlaybookVersionSettings = settingsBuilder.createPlaybookVersionSettings().build(); + getPlaybookVersionSettings = settingsBuilder.getPlaybookVersionSettings().build(); + listPlaybookVersionsSettings = settingsBuilder.listPlaybookVersionsSettings().build(); + deletePlaybookVersionSettings = settingsBuilder.deletePlaybookVersionSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for PlaybooksStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createPlaybookSettings; + private final UnaryCallSettings.Builder deletePlaybookSettings; + private final PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings; + private final UnaryCallSettings.Builder getPlaybookSettings; + private final UnaryCallSettings.Builder updatePlaybookSettings; + private final UnaryCallSettings.Builder + createPlaybookVersionSettings; + private final UnaryCallSettings.Builder + getPlaybookVersionSettings; + private final PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings; + private final UnaryCallSettings.Builder + deletePlaybookVersionSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deletePlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPlaybooksSettings = PagedCallSettings.newBuilder(LIST_PLAYBOOKS_PAGE_STR_FACT); + getPlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePlaybookSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createPlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getPlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listPlaybookVersionsSettings = + PagedCallSettings.newBuilder(LIST_PLAYBOOK_VERSIONS_PAGE_STR_FACT); + deletePlaybookVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPlaybookSettings, + deletePlaybookSettings, + listPlaybooksSettings, + getPlaybookSettings, + updatePlaybookSettings, + createPlaybookVersionSettings, + getPlaybookVersionSettings, + listPlaybookVersionsSettings, + deletePlaybookVersionSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(PlaybooksStubSettings settings) { + super(settings); + + createPlaybookSettings = settings.createPlaybookSettings.toBuilder(); + deletePlaybookSettings = settings.deletePlaybookSettings.toBuilder(); + listPlaybooksSettings = settings.listPlaybooksSettings.toBuilder(); + getPlaybookSettings = settings.getPlaybookSettings.toBuilder(); + updatePlaybookSettings = settings.updatePlaybookSettings.toBuilder(); + createPlaybookVersionSettings = settings.createPlaybookVersionSettings.toBuilder(); + getPlaybookVersionSettings = settings.getPlaybookVersionSettings.toBuilder(); + listPlaybookVersionsSettings = settings.listPlaybookVersionsSettings.toBuilder(); + deletePlaybookVersionSettings = settings.deletePlaybookVersionSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createPlaybookSettings, + deletePlaybookSettings, + listPlaybooksSettings, + getPlaybookSettings, + updatePlaybookSettings, + createPlaybookVersionSettings, + getPlaybookVersionSettings, + listPlaybookVersionsSettings, + deletePlaybookVersionSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPlaybooksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePlaybookSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createPlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getPlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPlaybookVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deletePlaybookVersionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createPlaybook. */ + public UnaryCallSettings.Builder createPlaybookSettings() { + return createPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to deletePlaybook. */ + public UnaryCallSettings.Builder deletePlaybookSettings() { + return deletePlaybookSettings; + } + + /** Returns the builder for the settings used for calls to listPlaybooks. */ + public PagedCallSettings.Builder< + ListPlaybooksRequest, ListPlaybooksResponse, ListPlaybooksPagedResponse> + listPlaybooksSettings() { + return listPlaybooksSettings; + } + + /** Returns the builder for the settings used for calls to getPlaybook. */ + public UnaryCallSettings.Builder getPlaybookSettings() { + return getPlaybookSettings; + } + + /** Returns the builder for the settings used for calls to updatePlaybook. */ + public UnaryCallSettings.Builder updatePlaybookSettings() { + return updatePlaybookSettings; + } + + /** Returns the builder for the settings used for calls to createPlaybookVersion. */ + public UnaryCallSettings.Builder + createPlaybookVersionSettings() { + return createPlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to getPlaybookVersion. */ + public UnaryCallSettings.Builder + getPlaybookVersionSettings() { + return getPlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to listPlaybookVersions. */ + public PagedCallSettings.Builder< + ListPlaybookVersionsRequest, + ListPlaybookVersionsResponse, + ListPlaybookVersionsPagedResponse> + listPlaybookVersionsSettings() { + return listPlaybookVersionsSettings; + } + + /** Returns the builder for the settings used for calls to deletePlaybookVersion. */ + public UnaryCallSettings.Builder + deletePlaybookVersionSettings() { + return deletePlaybookVersionSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public PlaybooksStubSettings build() throws IOException { + return new PlaybooksStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java index 9e6951bcd53c..d1303f982cc6 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStub.java @@ -21,6 +21,7 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.dialogflow.cx.v3beta1.AnswerFeedback; import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; @@ -52,6 +53,12 @@ public UnaryCallable detectIntentCall throw new UnsupportedOperationException("Not implemented: detectIntentCallable()"); } + public ServerStreamingCallable + serverStreamingDetectIntentCallable() { + throw new UnsupportedOperationException( + "Not implemented: serverStreamingDetectIntentCallable()"); + } + public BidiStreamingCallable streamingDetectIntentCallable() { throw new UnsupportedOperationException("Not implemented: streamingDetectIntentCallable()"); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java index e3553e9405b9..77b1bff0858a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/SessionsStubSettings.java @@ -38,6 +38,7 @@ import com.google.api.gax.rpc.PagedCallSettings; import com.google.api.gax.rpc.PagedListDescriptor; import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.ServerStreamingCallSettings; import com.google.api.gax.rpc.StatusCode; import com.google.api.gax.rpc.StreamingCallSettings; import com.google.api.gax.rpc.StubSettings; @@ -114,6 +115,8 @@ public class SessionsStubSettings extends StubSettings { .build(); private final UnaryCallSettings detectIntentSettings; + private final ServerStreamingCallSettings + serverStreamingDetectIntentSettings; private final StreamingCallSettings streamingDetectIntentSettings; private final UnaryCallSettings matchIntentSettings; @@ -184,6 +187,12 @@ public UnaryCallSettings detectIntent return detectIntentSettings; } + /** Returns the object with the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings + serverStreamingDetectIntentSettings() { + return serverStreamingDetectIntentSettings; + } + /** Returns the object with the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings streamingDetectIntentSettings() { @@ -337,6 +346,8 @@ protected SessionsStubSettings(Builder settingsBuilder) throws IOException { super(settingsBuilder); detectIntentSettings = settingsBuilder.detectIntentSettings().build(); + serverStreamingDetectIntentSettings = + settingsBuilder.serverStreamingDetectIntentSettings().build(); streamingDetectIntentSettings = settingsBuilder.streamingDetectIntentSettings().build(); matchIntentSettings = settingsBuilder.matchIntentSettings().build(); fulfillIntentSettings = settingsBuilder.fulfillIntentSettings().build(); @@ -350,6 +361,8 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders; private final UnaryCallSettings.Builder detectIntentSettings; + private final ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings; private final StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> streamingDetectIntentSettings; @@ -426,6 +439,7 @@ protected Builder(ClientContext clientContext) { super(clientContext); detectIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + serverStreamingDetectIntentSettings = ServerStreamingCallSettings.newBuilder(); streamingDetectIntentSettings = StreamingCallSettings.newBuilder(); matchIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); fulfillIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -448,6 +462,8 @@ protected Builder(SessionsStubSettings settings) { super(settings); detectIntentSettings = settings.detectIntentSettings.toBuilder(); + serverStreamingDetectIntentSettings = + settings.serverStreamingDetectIntentSettings.toBuilder(); streamingDetectIntentSettings = settings.streamingDetectIntentSettings.toBuilder(); matchIntentSettings = settings.matchIntentSettings.toBuilder(); fulfillIntentSettings = settings.fulfillIntentSettings.toBuilder(); @@ -495,6 +511,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + builder + .serverStreamingDetectIntentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_3_params")); + builder .matchIntentSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -544,6 +565,12 @@ public Builder applyToAllUnaryMethods( return detectIntentSettings; } + /** Returns the builder for the settings used for calls to serverStreamingDetectIntent. */ + public ServerStreamingCallSettings.Builder + serverStreamingDetectIntentSettings() { + return serverStreamingDetectIntentSettings; + } + /** Returns the builder for the settings used for calls to streamingDetectIntent. */ public StreamingCallSettings.Builder< StreamingDetectIntentRequest, StreamingDetectIntentResponse> diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStub.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStub.java new file mode 100644 index 000000000000..006dfc748dbf --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStub.java @@ -0,0 +1,111 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Tools service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ToolsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public UnaryCallable createToolCallable() { + throw new UnsupportedOperationException("Not implemented: createToolCallable()"); + } + + public UnaryCallable listToolsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listToolsPagedCallable()"); + } + + public UnaryCallable listToolsCallable() { + throw new UnsupportedOperationException("Not implemented: listToolsCallable()"); + } + + public OperationCallable + exportToolsOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportToolsOperationCallable()"); + } + + public UnaryCallable exportToolsCallable() { + throw new UnsupportedOperationException("Not implemented: exportToolsCallable()"); + } + + public UnaryCallable getToolCallable() { + throw new UnsupportedOperationException("Not implemented: getToolCallable()"); + } + + public UnaryCallable updateToolCallable() { + throw new UnsupportedOperationException("Not implemented: updateToolCallable()"); + } + + public UnaryCallable deleteToolCallable() { + throw new UnsupportedOperationException("Not implemented: deleteToolCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java new file mode 100644 index 000000000000..45d9019e3c17 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ToolsStubSettings.java @@ -0,0 +1,696 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ToolsStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (dialogflow.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 total timeout of createTool to 30 seconds: + * + *

{@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
+ * ToolsStubSettings.Builder toolsSettingsBuilder = ToolsStubSettings.newBuilder();
+ * toolsSettingsBuilder
+ *     .createToolSettings()
+ *     .setRetrySettings(
+ *         toolsSettingsBuilder
+ *             .createToolSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ToolsStubSettings toolsSettings = toolsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ToolsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/dialogflow") + .build(); + + private final UnaryCallSettings createToolSettings; + private final PagedCallSettings + listToolsSettings; + private final UnaryCallSettings exportToolsSettings; + private final OperationCallSettings + exportToolsOperationSettings; + private final UnaryCallSettings getToolSettings; + private final UnaryCallSettings updateToolSettings; + private final UnaryCallSettings deleteToolSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor + LIST_TOOLS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListToolsRequest injectToken(ListToolsRequest payload, String token) { + return ListToolsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListToolsRequest injectPageSize(ListToolsRequest payload, int pageSize) { + return ListToolsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListToolsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListToolsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListToolsResponse payload) { + return payload.getToolsList() == null + ? ImmutableList.of() + : payload.getToolsList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse> + LIST_TOOLS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListToolsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TOOLS_PAGE_STR_DESC, request, context); + return ListToolsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createTool. */ + public UnaryCallSettings createToolSettings() { + return createToolSettings; + } + + /** Returns the object with the settings used for calls to listTools. */ + public PagedCallSettings + listToolsSettings() { + return listToolsSettings; + } + + /** Returns the object with the settings used for calls to exportTools. */ + public UnaryCallSettings exportToolsSettings() { + return exportToolsSettings; + } + + /** Returns the object with the settings used for calls to exportTools. */ + public OperationCallSettings + exportToolsOperationSettings() { + return exportToolsOperationSettings; + } + + /** Returns the object with the settings used for calls to getTool. */ + public UnaryCallSettings getToolSettings() { + return getToolSettings; + } + + /** Returns the object with the settings used for calls to updateTool. */ + public UnaryCallSettings updateToolSettings() { + return updateToolSettings; + } + + /** Returns the object with the settings used for calls to deleteTool. */ + public UnaryCallSettings deleteToolSettings() { + return deleteToolSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public ToolsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcToolsStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonToolsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "dialogflow"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "dialogflow.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dialogflow.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ToolsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(ToolsStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ToolsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ToolsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createToolSettings = settingsBuilder.createToolSettings().build(); + listToolsSettings = settingsBuilder.listToolsSettings().build(); + exportToolsSettings = settingsBuilder.exportToolsSettings().build(); + exportToolsOperationSettings = settingsBuilder.exportToolsOperationSettings().build(); + getToolSettings = settingsBuilder.getToolSettings().build(); + updateToolSettings = settingsBuilder.updateToolSettings().build(); + deleteToolSettings = settingsBuilder.deleteToolSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for ToolsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createToolSettings; + private final PagedCallSettings.Builder< + ListToolsRequest, ListToolsResponse, ListToolsPagedResponse> + listToolsSettings; + private final UnaryCallSettings.Builder exportToolsSettings; + private final OperationCallSettings.Builder< + ExportToolsRequest, ExportToolsResponse, ExportToolsMetadata> + exportToolsOperationSettings; + private final UnaryCallSettings.Builder getToolSettings; + private final UnaryCallSettings.Builder updateToolSettings; + private final UnaryCallSettings.Builder deleteToolSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listToolsSettings = PagedCallSettings.newBuilder(LIST_TOOLS_PAGE_STR_FACT); + exportToolsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + exportToolsOperationSettings = OperationCallSettings.newBuilder(); + getToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteToolSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createToolSettings, + listToolsSettings, + exportToolsSettings, + getToolSettings, + updateToolSettings, + deleteToolSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(ToolsStubSettings settings) { + super(settings); + + createToolSettings = settings.createToolSettings.toBuilder(); + listToolsSettings = settings.listToolsSettings.toBuilder(); + exportToolsSettings = settings.exportToolsSettings.toBuilder(); + exportToolsOperationSettings = settings.exportToolsOperationSettings.toBuilder(); + getToolSettings = settings.getToolSettings.toBuilder(); + updateToolSettings = settings.updateToolSettings.toBuilder(); + deleteToolSettings = settings.deleteToolSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createToolSettings, + listToolsSettings, + exportToolsSettings, + getToolSettings, + updateToolSettings, + deleteToolSettings, + listLocationsSettings, + getLocationSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listToolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportToolsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteToolSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .exportToolsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ExportToolsResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(ExportToolsMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createTool. */ + public UnaryCallSettings.Builder createToolSettings() { + return createToolSettings; + } + + /** Returns the builder for the settings used for calls to listTools. */ + public PagedCallSettings.Builder + listToolsSettings() { + return listToolsSettings; + } + + /** Returns the builder for the settings used for calls to exportTools. */ + public UnaryCallSettings.Builder exportToolsSettings() { + return exportToolsSettings; + } + + /** Returns the builder for the settings used for calls to exportTools. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportToolsRequest, ExportToolsResponse, ExportToolsMetadata> + exportToolsOperationSettings() { + return exportToolsOperationSettings; + } + + /** Returns the builder for the settings used for calls to getTool. */ + public UnaryCallSettings.Builder getToolSettings() { + return getToolSettings; + } + + /** Returns the builder for the settings used for calls to updateTool. */ + public UnaryCallSettings.Builder updateToolSettings() { + return updateToolSettings; + } + + /** Returns the builder for the settings used for calls to deleteTool. */ + public UnaryCallSettings.Builder deleteToolSettings() { + return deleteToolSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + @Override + public ToolsStubSettings build() throws IOException { + return new ToolsStubSettings(this); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json index 34dd0157dba9..a9c8e624df8a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3/reflect-config.json @@ -2024,6 +2024,69 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest$DataFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ExportFlowRequest", "queryAllDeclaredConstructors": true, @@ -2924,6 +2987,87 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest$MergeOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse$ConflictingResources$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3.ImportFlowRequest", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json index 2e3e530bc26c..005b71b970ca 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/main/resources/META-INF/native-image/com.google.cloud.dialogflow.cx.v3beta1/reflect-config.json @@ -377,6 +377,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Action", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Action$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ActionParameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ActionParameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings", "queryAllDeclaredConstructors": true, @@ -521,6 +557,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.AgentValidationResult", "queryAllDeclaredConstructors": true, @@ -1007,6 +1061,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateExperimentRequest", "queryAllDeclaredConstructors": true, @@ -1097,6 +1169,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -1151,6 +1259,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.CreateTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -1304,6 +1430,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentRequest", "queryAllDeclaredConstructors": true, @@ -1394,6 +1538,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -1430,6 +1610,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.DeleteTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -1826,6 +2024,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Example", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Example$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.Experiment", "queryAllDeclaredConstructors": true, @@ -2025,7 +2241,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2034,7 +2250,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2043,7 +2259,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2052,7 +2268,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2061,7 +2277,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2070,7 +2286,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2079,7 +2295,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2088,7 +2304,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2097,7 +2313,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$DataFormat", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2106,7 +2322,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2115,7 +2331,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2124,7 +2340,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2133,7 +2349,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2142,7 +2358,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2151,7 +2367,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2160,7 +2376,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest$DataFormat", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2169,7 +2385,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2178,7 +2394,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2187,7 +2403,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2196,7 +2412,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2205,7 +2421,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Flow", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2214,7 +2430,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Flow$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2223,7 +2439,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2232,7 +2448,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2241,7 +2457,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2250,7 +2466,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2259,7 +2475,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2268,7 +2484,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2277,7 +2493,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2286,7 +2502,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest$DataFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2295,7 +2511,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$FillBehavior", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2304,7 +2520,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$FillBehavior$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2313,7 +2529,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2322,7 +2538,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FilterSpecs$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2331,7 +2547,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Flow", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2340,7 +2556,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Flow$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2349,7 +2565,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2358,7 +2574,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowImportStrategy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2367,7 +2583,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$ConditionalCases", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2376,7 +2592,151 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$ConditionalCases$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FlowValidationResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$FillBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Form$Parameter$FillBehavior$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.FulfillIntentResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$ConditionalCases", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment$ConditionalCases$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2456,6 +2816,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettings", "queryAllDeclaredConstructors": true, @@ -2672,6 +3050,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GetExperimentRequest", "queryAllDeclaredConstructors": true, @@ -2798,6 +3194,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GetSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -2870,6 +3302,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.GetTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -2925,7 +3375,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2934,7 +3384,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2943,7 +3393,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest$ImportOption", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2952,7 +3402,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2961,7 +3411,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest$MergeOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2970,7 +3420,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2979,7 +3429,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2988,7 +3438,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse$ConflictingResources", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2997,7 +3447,691 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse$ConflictingResources$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowRequest$ImportOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$MergeOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Parameter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Parameter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Part", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Part$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Intent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Intent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentInput", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentInput$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentView", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3006,7 +4140,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsRequest$MergeOption", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3015,7 +4149,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3024,7 +4158,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3033,7 +4167,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3042,7 +4176,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse$ConflictingResources$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3051,7 +4185,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportStrategy", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3060,7 +4194,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3069,7 +4203,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3078,7 +4212,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3087,7 +4221,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3096,7 +4230,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3105,7 +4239,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3114,7 +4248,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3123,7 +4257,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineDestination$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3132,7 +4266,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3141,7 +4275,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InlineSource$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3150,7 +4284,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3159,7 +4293,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3168,7 +4302,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3177,7 +4311,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3186,7 +4320,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Parameter", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3195,7 +4329,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$Parameter$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3204,7 +4338,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3213,7 +4347,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3222,7 +4356,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Part", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3231,7 +4365,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Intent$TrainingPhrase$Part$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3240,7 +4374,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3249,7 +4383,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3258,7 +4392,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Intent", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3267,7 +4401,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentCoverage$Intent$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3276,7 +4410,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentInput", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3285,7 +4419,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3294,7 +4428,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.IntentView", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3303,7 +4437,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3312,7 +4446,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3321,7 +4455,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3330,7 +4464,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3339,7 +4473,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3348,7 +4482,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListAgentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest$TestCaseView", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3357,7 +4491,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3366,7 +4500,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3375,7 +4509,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3384,7 +4518,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3393,7 +4527,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3402,7 +4536,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3411,7 +4545,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3420,7 +4554,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListContinuousTestResultsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3429,7 +4563,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3438,7 +4572,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3447,7 +4581,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3456,7 +4590,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListDeploymentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3465,7 +4599,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3474,7 +4608,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3483,7 +4617,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3492,7 +4626,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3501,7 +4635,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3510,7 +4644,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3519,7 +4653,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3528,7 +4662,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListEnvironmentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3537,7 +4671,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3546,7 +4680,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3555,7 +4689,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3564,7 +4698,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListExperimentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3573,7 +4707,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3582,7 +4716,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3591,7 +4725,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Match", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3600,7 +4734,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListFlowsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Match$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3609,7 +4743,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Match$MatchType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3618,7 +4752,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3627,7 +4761,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3636,7 +4770,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListGeneratorsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3645,7 +4779,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3654,7 +4788,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3663,7 +4797,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3672,7 +4806,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListIntentsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$ModelTrainingMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3681,7 +4815,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$ModelType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3690,7 +4824,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3699,7 +4833,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3708,7 +4842,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListPagesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3717,7 +4851,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3726,7 +4860,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Page", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3735,7 +4869,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Page$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3744,7 +4878,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSecuritySettingsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3753,7 +4887,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3762,7 +4896,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3771,7 +4905,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3780,7 +4914,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListSessionEntityTypesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3789,7 +4923,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3798,7 +4932,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo$ParameterState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3807,7 +4941,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3816,7 +4950,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCaseResultsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3825,7 +4959,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition$ParameterType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3834,7 +4968,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Phrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3843,7 +4977,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesRequest$TestCaseView", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Phrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3852,7 +4986,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3861,7 +4995,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTestCasesResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3870,7 +5004,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Step", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3879,7 +5013,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Playbook$Step$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3888,7 +5022,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3897,7 +5031,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListTransitionRouteGroupsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3906,7 +5040,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3915,7 +5049,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3924,7 +5058,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3933,7 +5067,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListVersionsResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3942,7 +5076,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3951,7 +5085,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3960,7 +5094,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3969,7 +5103,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ListWebhooksResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3978,7 +5112,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryParameters", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3987,7 +5121,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LoadVersionRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryParameters$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -3996,7 +5130,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4005,7 +5139,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4014,7 +5148,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResourceName", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4023,7 +5157,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.LookupEnvironmentHistoryResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResourceName$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4032,7 +5166,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Match", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4041,7 +5175,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Match$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4050,7 +5184,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Match$MatchType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$ConversationSuccess", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4059,7 +5193,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$ConversationSuccess$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4068,7 +5202,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$EndInteraction", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4077,7 +5211,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$EndInteraction$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4086,7 +5220,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.MatchIntentResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4095,7 +5229,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4104,7 +5238,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$LiveAgentHandoff", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4113,7 +5247,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$ModelTrainingMode", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$LiveAgentHandoff$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4122,7 +5256,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.NluSettings$ModelType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4131,7 +5265,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4140,7 +5274,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Segment", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4149,7 +5283,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.OutputAudioEncoding", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Segment$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4158,7 +5292,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Page", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$OutputAudioText", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4167,7 +5301,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Page$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$OutputAudioText$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4176,7 +5310,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$PlayAudio", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4185,7 +5319,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$PlayAudio$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4194,7 +5328,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$TelephonyTransferCall", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4203,7 +5337,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$TelephonyTransferCall$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4212,7 +5346,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Text", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4221,7 +5355,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Text$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4230,7 +5364,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.PageInfo$FormInfo$ParameterInfo$ParameterState", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4239,7 +5373,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Phrase", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4248,7 +5382,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.Phrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$GitSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4257,7 +5391,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryInput", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$GitSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4266,7 +5400,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$RestoreOption", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4275,7 +5409,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryParameters", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4284,7 +5418,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryParameters$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4293,7 +5427,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$RolloutStep", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4302,7 +5436,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.QueryResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$RolloutStep$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4311,7 +5445,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResourceName", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutState", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4320,7 +5454,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResourceName$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutState$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4329,7 +5463,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4338,7 +5472,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4347,7 +5481,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$ConversationSuccess", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4356,7 +5490,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$ConversationSuccess$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4365,7 +5499,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$EndInteraction", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4374,7 +5508,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$EndInteraction$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4383,7 +5517,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4392,7 +5526,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$KnowledgeInfoCard$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4401,7 +5535,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$LiveAgentHandoff", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4410,7 +5544,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$LiveAgentHandoff$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4419,7 +5553,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4428,7 +5562,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4437,7 +5571,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Segment", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4446,7 +5580,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$MixedAudio$Segment$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4455,7 +5589,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$OutputAudioText", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4464,7 +5598,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$OutputAudioText$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4473,7 +5607,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$PlayAudio", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4482,7 +5616,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$PlayAudio$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4491,7 +5625,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$TelephonyTransferCall", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4500,7 +5634,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$TelephonyTransferCall$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4509,7 +5643,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Text", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings$AudioFormat", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4518,7 +5652,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage$Text$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4527,7 +5661,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4536,7 +5670,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$InsightsExportSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4545,7 +5679,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$GitSource", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$InsightsExportSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4554,7 +5688,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$GitSource$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$PurgeDataType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4563,7 +5697,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RestoreAgentRequest$RestoreOption", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RedactionScope", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4572,7 +5706,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RedactionStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4581,7 +5715,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RetentionStrategy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4590,7 +5724,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$RolloutStep", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4599,7 +5733,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutConfig$RolloutStep$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4608,7 +5742,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutState", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4617,7 +5751,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RolloutState$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4626,7 +5760,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType$EntityOverrideMode", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4635,7 +5769,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4644,7 +5778,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4653,7 +5787,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4662,7 +5796,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4671,7 +5805,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunContinuousTestResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4680,7 +5814,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4689,7 +5823,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseMetadata$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4698,7 +5832,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4707,7 +5841,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4716,7 +5850,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4725,7 +5859,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.RunTestCaseResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4734,7 +5868,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4743,7 +5877,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4752,7 +5886,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4761,7 +5895,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SafetySettings$Phrase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4770,7 +5904,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4779,7 +5913,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SearchConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4788,7 +5922,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4797,7 +5931,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult$MessageType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4806,7 +5940,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings$AudioFormat", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4815,7 +5949,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$AudioExportSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4824,7 +5958,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4833,7 +5967,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$InsightsExportSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4842,7 +5976,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$InsightsExportSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCase", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4851,7 +5985,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$PurgeDataType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCase$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4860,7 +5994,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RedactionScope", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseError", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4869,7 +6003,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RedactionStrategy", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseError$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4878,7 +6012,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SecuritySettings$RetentionStrategy", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4887,7 +6021,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4896,7 +6030,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4905,7 +6039,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4914,7 +6048,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestError", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4923,7 +6057,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionEntityType$EntityOverrideMode", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestError$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4932,7 +6066,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionInfo", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4941,7 +6075,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SessionInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4950,7 +6084,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechModelVariant", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4959,7 +6093,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference$DiffType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4968,7 +6102,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TextInput", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4977,7 +6111,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TextInput$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4986,7 +6120,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SpeechWordInfo$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -4995,7 +6129,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SsmlVoiceGender", + "name": "com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5004,7 +6138,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5013,7 +6147,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StartExperimentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5022,7 +6156,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$ApiKeyConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5031,7 +6165,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StopExperimentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$ApiKeyConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5040,7 +6174,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5049,7 +6183,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$OAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5058,7 +6192,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$OAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5067,7 +6201,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$OAuthConfig$OauthGrantType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5076,7 +6210,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$RequestLocation", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5085,7 +6219,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$ServiceAgentAuthConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5094,7 +6228,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.StreamingRecognitionResult$MessageType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Authentication$ServiceAgentAuthConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5103,7 +6237,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5112,7 +6246,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SubmitAnswerFeedbackRequest$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$DataStoreTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5121,7 +6255,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$DataStoreTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5130,7 +6264,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.SynthesizeSpeechConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$DataStoreTool$FallbackPrompt", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5139,7 +6273,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCase", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$DataStoreTool$FallbackPrompt$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5148,7 +6282,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCase$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$ExtensionTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5157,7 +6291,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseError", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$ExtensionTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5166,7 +6300,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseError$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$FunctionTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5175,7 +6309,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$FunctionTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5184,7 +6318,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestCaseResult$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$OpenApiTool", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5193,7 +6327,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestConfig", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$OpenApiTool$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5202,7 +6336,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestConfig$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$TLSConfig", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5211,7 +6345,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestError", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$TLSConfig$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5220,7 +6354,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestError$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$TLSConfig$CACert", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5229,7 +6363,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestResult", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$TLSConfig$CACert$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5238,7 +6372,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference", + "name": "com.google.cloud.dialogflow.cx.v3beta1.Tool$ToolType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5247,7 +6381,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5256,7 +6390,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TestRunDifference$DiffType", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5265,7 +6399,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TextInput", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult$Error", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5274,7 +6408,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TextInput$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult$Error$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5283,7 +6417,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolUse", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5292,7 +6426,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings$Builder", + "name": "com.google.cloud.dialogflow.cx.v3beta1.ToolUse$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -5516,6 +6650,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateExperimentRequest", "queryAllDeclaredConstructors": true, @@ -5624,6 +6776,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateSecuritySettingsRequest", "queryAllDeclaredConstructors": true, @@ -5678,6 +6848,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.UpdateTransitionRouteGroupRequest", "queryAllDeclaredConstructors": true, @@ -5732,6 +6920,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UserUtterance", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dialogflow.cx.v3beta1.UserUtterance$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dialogflow.cx.v3beta1.ValidateAgentRequest", "queryAllDeclaredConstructors": true, diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientHttpJsonTest.java index b74f660b63af..3e8ae41099c8 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientHttpJsonTest.java @@ -194,6 +194,7 @@ public void getChangelogTest() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockService.addResponse(expectedResponse); @@ -245,6 +246,7 @@ public void getChangelogTest2() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockService.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java index 1ee297b6ef52..35af34a21122 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java @@ -189,6 +189,7 @@ public void getChangelogTest() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockChangelogs.addResponse(expectedResponse); @@ -234,6 +235,7 @@ public void getChangelogTest2() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockChangelogs.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java index 4009db913e41..4e38f790953e 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientHttpJsonTest.java @@ -34,6 +34,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -42,6 +43,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -546,6 +548,124 @@ public void listEntityTypesExceptionTest2() throws Exception { } } + @Test + public void exportEntityTypesTest() throws Exception { + ExportEntityTypesResponse expectedResponse = ExportEntityTypesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + + ExportEntityTypesResponse actualResponse = client.exportEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.exportEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importEntityTypesTest() throws Exception { + ImportEntityTypesResponse expectedResponse = + ImportEntityTypesResponse.newBuilder() + .addAllEntityTypes(new ArrayList()) + .setConflictingResources( + ImportEntityTypesResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString()) + .build(); + + ImportEntityTypesResponse actualResponse = client.importEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + client.importEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java index e7e0f508880b..f0c5f4fcd1f8 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java @@ -26,11 +26,13 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.Empty; @@ -42,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -478,6 +481,128 @@ public void listEntityTypesExceptionTest2() throws Exception { } } + @Test + public void exportEntityTypesTest() throws Exception { + ExportEntityTypesResponse expectedResponse = ExportEntityTypesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + + ExportEntityTypesResponse actualResponse = client.exportEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportEntityTypesRequest actualRequest = ((ExportEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntityTypesList(), actualRequest.getEntityTypesList()); + Assert.assertEquals(request.getEntityTypesUri(), actualRequest.getEntityTypesUri()); + Assert.assertEquals( + request.getEntityTypesContentInline(), actualRequest.getEntityTypesContentInline()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.exportEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importEntityTypesTest() throws Exception { + ImportEntityTypesResponse expectedResponse = + ImportEntityTypesResponse.newBuilder() + .addAllEntityTypes(new ArrayList()) + .setConflictingResources( + ImportEntityTypesResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString()) + .build(); + + ImportEntityTypesResponse actualResponse = client.importEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportEntityTypesRequest actualRequest = ((ImportEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntityTypesUri(), actualRequest.getEntityTypesUri()); + Assert.assertEquals(request.getEntityTypesContent(), actualRequest.getEntityTypesContent()); + Assert.assertEquals(request.getMergeOption(), actualRequest.getMergeOption()); + Assert.assertEquals(request.getTargetEntityType(), actualRequest.getTargetEntityType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + client.importEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java index 133d35d05ddb..d01b6cfe1f86 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockEntityTypesImpl.java @@ -18,6 +18,7 @@ import com.google.api.core.BetaApi; import com.google.cloud.dialogflow.cx.v3.EntityTypesGrpc.EntityTypesImplBase; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -163,4 +164,46 @@ public void listEntityTypes( Exception.class.getName()))); } } + + @Override + public void exportEntityTypes( + ExportEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importEntityTypes( + ImportEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java index 80136b76012f..6fe7c497d5f9 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockSessionsImpl.java @@ -79,6 +79,27 @@ public void detectIntent( } } + @Override + public void serverStreamingDetectIntent( + DetectIntentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DetectIntentResponse) { + requests.add(request); + responseObserver.onNext(((DetectIntentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ServerStreamingDetectIntent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DetectIntentResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public StreamObserver streamingDetectIntent( final StreamObserver responseObserver) { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java index aa884f8695d9..de5eee87c311 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientHttpJsonTest.java @@ -193,6 +193,7 @@ public void getPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -246,6 +247,7 @@ public void getPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -301,6 +303,7 @@ public void createPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -356,6 +359,7 @@ public void createPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -413,6 +417,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -428,6 +433,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -469,6 +475,7 @@ public void updatePageExceptionTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java index 8b8060022f38..ceb0ed5b4efc 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java @@ -185,6 +185,7 @@ public void getPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -232,6 +233,7 @@ public void getPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -279,6 +281,7 @@ public void createPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -329,6 +332,7 @@ public void createPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -379,6 +383,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java index 173f4cae4afc..8f5289082832 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientHttpJsonTest.java @@ -149,6 +149,17 @@ public void detectIntentExceptionTest() throws Exception { } } + @Test + public void serverStreamingDetectIntentTest() throws Exception {} + + @Test + public void serverStreamingDetectIntentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void streamingDetectIntentUnsupportedMethodTest() throws Exception { // The streamingDetectIntent() method is not supported in REST transport. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java index ec66012aca19..55909c00aa00 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ApiStreamObserver; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -158,6 +159,70 @@ public void detectIntentExceptionTest() throws Exception { } } + @Test + public void serverStreamingDetectIntentTest() throws Exception { + DetectIntentResponse expectedResponse = + DetectIntentResponse.newBuilder() + .setResponseId("responseId-633138884") + .setQueryResult(QueryResult.newBuilder().build()) + .setOutputAudio(ByteString.EMPTY) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setAllowCancellation(true) + .build(); + mockSessions.addResponse(expectedResponse); + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.serverStreamingDetectIntentCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void serverStreamingDetectIntentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSessions.addException(exception); + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.serverStreamingDetectIntentCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void streamingDetectIntentTest() throws Exception { StreamingDetectIntentResponse expectedResponse = diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java index e10eec981ae4..49247f97619b 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientHttpJsonTest.java @@ -199,6 +199,8 @@ public void getAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -262,6 +264,8 @@ public void getAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -325,6 +329,8 @@ public void createAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -390,6 +396,8 @@ public void createAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -455,6 +463,8 @@ public void updateAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -480,6 +490,8 @@ public void updateAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -531,6 +543,8 @@ public void updateAgentExceptionTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -904,6 +918,7 @@ public void getGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -958,6 +973,7 @@ public void getGenerativeSettingsTest2() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1012,6 +1028,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -1024,6 +1041,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -1063,6 +1081,7 @@ public void updateGenerativeSettingsExceptionTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateGenerativeSettings(generativeSettings, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index 3a439d427e50..0cb62f785518 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -195,6 +195,8 @@ public void getAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -252,6 +254,8 @@ public void getAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -309,6 +313,8 @@ public void createAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -369,6 +375,8 @@ public void createAgentTest2() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -429,6 +437,8 @@ public void updateAgentTest() throws Exception { .setAvatarUri("avatarUri-428646061") .setSpeechToTextSettings(SpeechToTextSettings.newBuilder().build()) .setStartFlow(FlowName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]").toString()) + .setStartPlaybook( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) .setSecuritySettings( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) @@ -805,6 +815,7 @@ public void getGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -855,6 +866,7 @@ public void getGenerativeSettingsTest2() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); @@ -903,6 +915,7 @@ public void updateGenerativeSettingsTest() throws Exception { .setKnowledgeConnectorSettings( GenerativeSettings.KnowledgeConnectorSettings.newBuilder().build()) .setLanguageCode("languageCode-2092349083") + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockAgents.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientHttpJsonTest.java index 745c592508c0..ce60e658fcc2 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientHttpJsonTest.java @@ -194,6 +194,7 @@ public void getChangelogTest() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockService.addResponse(expectedResponse); @@ -245,6 +246,7 @@ public void getChangelogTest2() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockService.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java index 8e15eaf20f40..e735bcb71395 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java @@ -189,6 +189,7 @@ public void getChangelogTest() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockChangelogs.addResponse(expectedResponse); @@ -234,6 +235,7 @@ public void getChangelogTest2() throws Exception { .setType("type3575610") .setResource("resource-341064690") .setCreateTime(Timestamp.newBuilder().build()) + .setLanguageCode("languageCode-2092349083") .build(); mockChangelogs.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java index 17668d96b242..924926265739 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientHttpJsonTest.java @@ -34,6 +34,7 @@ import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.Any; import com.google.protobuf.Empty; import com.google.protobuf.FieldMask; @@ -42,6 +43,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -546,6 +548,124 @@ public void listEntityTypesExceptionTest2() throws Exception { } } + @Test + public void exportEntityTypesTest() throws Exception { + ExportEntityTypesResponse expectedResponse = ExportEntityTypesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + + ExportEntityTypesResponse actualResponse = client.exportEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.exportEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void importEntityTypesTest() throws Exception { + ImportEntityTypesResponse expectedResponse = + ImportEntityTypesResponse.newBuilder() + .addAllEntityTypes(new ArrayList()) + .setConflictingResources( + ImportEntityTypesResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString()) + .build(); + + ImportEntityTypesResponse actualResponse = client.importEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void importEntityTypesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + client.importEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java index 8879932838e8..912baddc4fc6 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java @@ -26,11 +26,13 @@ import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; import com.google.common.collect.Lists; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; import com.google.protobuf.Empty; @@ -42,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.UUID; +import java.util.concurrent.ExecutionException; import javax.annotation.Generated; import org.junit.After; import org.junit.AfterClass; @@ -478,6 +481,128 @@ public void listEntityTypesExceptionTest2() throws Exception { } } + @Test + public void exportEntityTypesTest() throws Exception { + ExportEntityTypesResponse expectedResponse = ExportEntityTypesResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + + ExportEntityTypesResponse actualResponse = client.exportEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportEntityTypesRequest actualRequest = ((ExportEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntityTypesList(), actualRequest.getEntityTypesList()); + Assert.assertEquals(request.getEntityTypesUri(), actualRequest.getEntityTypesUri()); + Assert.assertEquals( + request.getEntityTypesContentInline(), actualRequest.getEntityTypesContentInline()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + client.exportEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void importEntityTypesTest() throws Exception { + ImportEntityTypesResponse expectedResponse = + ImportEntityTypesResponse.newBuilder() + .addAllEntityTypes(new ArrayList()) + .setConflictingResources( + ImportEntityTypesResponse.ConflictingResources.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]").toString()) + .build(); + + ImportEntityTypesResponse actualResponse = client.importEntityTypesAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportEntityTypesRequest actualRequest = ((ImportEntityTypesRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntityTypesUri(), actualRequest.getEntityTypesUri()); + Assert.assertEquals(request.getEntityTypesContent(), actualRequest.getEntityTypesContent()); + Assert.assertEquals(request.getMergeOption(), actualRequest.getMergeOption()); + Assert.assertEquals(request.getTargetEntityType(), actualRequest.getTargetEntityType()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void importEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + client.importEntityTypesAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void listLocationsTest() throws Exception { Location responsesElement = Location.newBuilder().build(); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientHttpJsonTest.java new file mode 100644 index 000000000000..132702263b5d --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientHttpJsonTest.java @@ -0,0 +1,711 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3beta1.stub.HttpJsonExamplesStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExamplesClientHttpJsonTest { + private static MockHttpService mockService; + private static ExamplesClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonExamplesStub.getMethodDescriptors(), ExamplesSettings.getDefaultEndpoint()); + ExamplesSettings settings = + ExamplesSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ExamplesSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExamplesClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + client.deleteExample(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + + client.deleteExample(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listExamplesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest2() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listExamplesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getExampleExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7619/locations/location-7619/agents/agent-7619/playbooks/playbook-7619/examples/example-7619"; + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockService.addResponse(expectedResponse); + + Example example = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Example actualResponse = client.updateExample(example, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateExampleExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Example example = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExample(example, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientTest.java new file mode 100644 index 000000000000..18628d116b49 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesClientTest.java @@ -0,0 +1,614 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListExamplesPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient.ListLocationsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ExamplesClientTest { + private static MockExamples mockExamples; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ExamplesClient client; + + @BeforeClass + public static void startStaticServer() { + mockExamples = new MockExamples(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockExamples, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ExamplesSettings settings = + ExamplesSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ExamplesClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExampleRequest actualRequest = ((CreateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Example example = Example.newBuilder().build(); + + Example actualResponse = client.createExample(parent, example); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateExampleRequest actualRequest = ((CreateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String parent = "parent-995424086"; + Example example = Example.newBuilder().build(); + client.createExample(parent, example); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExamples.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + client.deleteExample(name); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExampleRequest actualRequest = ((DeleteExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteExampleTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockExamples.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteExample(name); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteExampleRequest actualRequest = ((DeleteExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String name = "name3373707"; + client.deleteExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockExamples.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExamplesRequest actualRequest = ((ListExamplesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExamplesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listExamplesTest2() throws Exception { + Example responsesElement = Example.newBuilder().build(); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken("") + .addAllExamples(Arrays.asList(responsesElement)) + .build(); + mockExamples.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListExamplesPagedResponse pagedListResponse = client.listExamples(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExamplesRequest actualRequest = ((ListExamplesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listExamplesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String parent = "parent-995424086"; + client.listExamples(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExampleRequest actualRequest = ((GetExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getExampleTest2() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + String name = "name3373707"; + + Example actualResponse = client.getExample(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExampleRequest actualRequest = ((GetExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getExampleExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + String name = "name3373707"; + client.getExample(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateExampleTest() throws Exception { + Example expectedResponse = + Example.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .setPlaybookInput(PlaybookInput.newBuilder().build()) + .setPlaybookOutput(PlaybookOutput.newBuilder().build()) + .addAllActions(new ArrayList()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setConversationState(OutputState.forNumber(0)) + .setLanguageCode("languageCode-2092349083") + .build(); + mockExamples.addResponse(expectedResponse); + + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Example actualResponse = client.updateExample(example, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockExamples.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateExampleRequest actualRequest = ((UpdateExampleRequest) actualRequests.get(0)); + + Assert.assertEquals(example, actualRequest.getExample()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockExamples.addException(exception); + + try { + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateExample(example, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientHttpJsonTest.java index f817dd31b5b1..488ffe37c24a 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientHttpJsonTest.java @@ -193,6 +193,7 @@ public void getGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -241,6 +242,7 @@ public void getGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -291,6 +293,7 @@ public void createGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -341,6 +344,7 @@ public void createGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -391,6 +395,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -401,6 +406,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); @@ -437,6 +443,7 @@ public void updateGeneratorExceptionTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); FieldMask updateMask = FieldMask.newBuilder().build(); client.updateGenerator(generator, updateMask); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientTest.java index 1a2bfd346382..38d081e6442d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorsClientTest.java @@ -188,6 +188,7 @@ public void getGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -230,6 +231,7 @@ public void getGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -272,6 +274,7 @@ public void createGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -317,6 +320,7 @@ public void createGeneratorTest2() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); @@ -362,6 +366,7 @@ public void updateGeneratorTest() throws Exception { .setDisplayName("displayName1714148973") .setPromptText(Phrase.newBuilder().build()) .addAllPlaceholders(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) .build(); mockGenerators.addResponse(expectedResponse); diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java index 6a4e591b4879..a9deb23b37da 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockEntityTypesImpl.java @@ -18,6 +18,7 @@ import com.google.api.core.BetaApi; import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesGrpc.EntityTypesImplBase; +import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; import io.grpc.stub.StreamObserver; @@ -163,4 +164,46 @@ public void listEntityTypes( Exception.class.getName()))); } } + + @Override + public void exportEntityTypes( + ExportEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void importEntityTypes( + ImportEntityTypesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ImportEntityTypes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamples.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamples.java new file mode 100644 index 000000000000..2525be4cd0a2 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamples.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExamples implements MockGrpcService { + private final MockExamplesImpl serviceImpl; + + public MockExamples() { + serviceImpl = new MockExamplesImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamplesImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamplesImpl.java new file mode 100644 index 000000000000..e067b968fd87 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockExamplesImpl.java @@ -0,0 +1,164 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesGrpc.ExamplesImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockExamplesImpl extends ExamplesImplBase { + private List requests; + private Queue responses; + + public MockExamplesImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createExample( + CreateExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteExample(DeleteExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listExamples( + ListExamplesRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListExamplesResponse) { + requests.add(request); + responseObserver.onNext(((ListExamplesResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListExamples, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListExamplesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getExample(GetExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateExample( + UpdateExampleRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext(((Example) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateExample, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Example.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooks.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooks.java new file mode 100644 index 000000000000..4210ca008985 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooks.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlaybooks implements MockGrpcService { + private final MockPlaybooksImpl serviceImpl; + + public MockPlaybooks() { + serviceImpl = new MockPlaybooksImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooksImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooksImpl.java new file mode 100644 index 000000000000..01a1d4c4cec8 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockPlaybooksImpl.java @@ -0,0 +1,250 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksGrpc.PlaybooksImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockPlaybooksImpl extends PlaybooksImplBase { + private List requests; + private Queue responses; + + public MockPlaybooksImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createPlaybook( + CreatePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePlaybook( + DeletePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPlaybooks( + ListPlaybooksRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPlaybooksResponse) { + requests.add(request); + responseObserver.onNext(((ListPlaybooksResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPlaybooks, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPlaybooksResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPlaybook(GetPlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePlaybook( + UpdatePlaybookRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Playbook) { + requests.add(request); + responseObserver.onNext(((Playbook) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdatePlaybook, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Playbook.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createPlaybookVersion( + CreatePlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PlaybookVersion) { + requests.add(request); + responseObserver.onNext(((PlaybookVersion) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreatePlaybookVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PlaybookVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getPlaybookVersion( + GetPlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof PlaybookVersion) { + requests.add(request); + responseObserver.onNext(((PlaybookVersion) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetPlaybookVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + PlaybookVersion.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listPlaybookVersions( + ListPlaybookVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListPlaybookVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListPlaybookVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListPlaybookVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListPlaybookVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deletePlaybookVersion( + DeletePlaybookVersionRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeletePlaybookVersion, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java index 0d9fcbe825f1..a9b572d41e98 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockSessionsImpl.java @@ -79,6 +79,27 @@ public void detectIntent( } } + @Override + public void serverStreamingDetectIntent( + DetectIntentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DetectIntentResponse) { + requests.add(request); + responseObserver.onNext(((DetectIntentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ServerStreamingDetectIntent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DetectIntentResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public StreamObserver streamingDetectIntent( final StreamObserver responseObserver) { diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTools.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTools.java new file mode 100644 index 000000000000..25ab40663e79 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockTools.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockTools implements MockGrpcService { + private final MockToolsImpl serviceImpl; + + public MockTools() { + serviceImpl = new MockToolsImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockToolsImpl.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockToolsImpl.java new file mode 100644 index 000000000000..9b00419145db --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockToolsImpl.java @@ -0,0 +1,183 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsGrpc.ToolsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockToolsImpl extends ToolsImplBase { + private List requests; + private Queue responses; + + public MockToolsImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createTool(CreateToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTools( + ListToolsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListToolsResponse) { + requests.add(request); + responseObserver.onNext(((ListToolsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListToolsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void exportTools(ExportToolsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ExportTools, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTool(GetToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTool(UpdateToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Tool) { + requests.add(request); + responseObserver.onNext(((Tool) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Tool.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteTool(DeleteToolRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTool, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java index e3e6c7f5fc20..44c2bf6f09a7 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientHttpJsonTest.java @@ -193,6 +193,7 @@ public void getPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -246,6 +247,7 @@ public void getPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -301,6 +303,7 @@ public void createPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -356,6 +359,7 @@ public void createPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -413,6 +417,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -428,6 +433,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -469,6 +475,7 @@ public void updatePageExceptionTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java index a8c771281ae0..099e1001d1f6 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java @@ -185,6 +185,7 @@ public void getPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -232,6 +233,7 @@ public void getPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -279,6 +281,7 @@ public void createPageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -329,6 +332,7 @@ public void createPageTest2() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) @@ -379,6 +383,7 @@ public void updatePageTest() throws Exception { .setName( PageName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[FLOW]", "[PAGE]").toString()) .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") .setEntryFulfillment(Fulfillment.newBuilder().build()) .setForm(Form.newBuilder().build()) .addAllTransitionRouteGroups(new ArrayList()) diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java new file mode 100644 index 000000000000..47daf3b57ca5 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientHttpJsonTest.java @@ -0,0 +1,1105 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3beta1.stub.HttpJsonPlaybooksStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlaybooksClientHttpJsonTest { + private static MockHttpService mockService; + private static PlaybooksClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonPlaybooksStub.getMethodDescriptors(), PlaybooksSettings.getDefaultEndpoint()); + PlaybooksSettings settings = + PlaybooksSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + PlaybooksSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlaybooksClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + client.deletePlaybook(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + + client.deletePlaybook(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPlaybooksExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest2() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPlaybooksExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPlaybookExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-8144/locations/location-8144/agents/agent-8144/playbooks/playbook-8144"; + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Playbook playbook = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Playbook actualResponse = client.updatePlaybook(playbook, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePlaybookExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Playbook playbook = + Playbook.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePlaybook(playbook, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createPlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPlaybookVersionsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest2() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listPlaybookVersionsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-897/locations/location-897/agents/agent-897/playbooks/playbook-897"; + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + client.deletePlaybookVersion(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePlaybookVersionExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + + client.deletePlaybookVersion(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deletePlaybookVersionExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5797/locations/location-5797/agents/agent-5797/playbooks/playbook-5797/versions/version-5797"; + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java new file mode 100644 index 000000000000..5ac4cbaeafea --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksClientTest.java @@ -0,0 +1,963 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybookVersionsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient.ListPlaybooksPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class PlaybooksClientTest { + private static MockLocations mockLocations; + private static MockPlaybooks mockPlaybooks; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private PlaybooksClient client; + + @BeforeClass + public static void startStaticServer() { + mockPlaybooks = new MockPlaybooks(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockPlaybooks, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + PlaybooksSettings settings = + PlaybooksSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = PlaybooksClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookRequest actualRequest = ((CreatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Playbook playbook = Playbook.newBuilder().build(); + + Playbook actualResponse = client.createPlaybook(parent, playbook); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookRequest actualRequest = ((CreatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + Playbook playbook = Playbook.newBuilder().build(); + client.createPlaybook(parent, playbook); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + client.deletePlaybook(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookRequest actualRequest = ((DeletePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deletePlaybook(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookRequest actualRequest = ((DeletePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.deletePlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybooksRequest actualRequest = ((ListPlaybooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybooksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybooksTest2() throws Exception { + Playbook responsesElement = Playbook.newBuilder().build(); + ListPlaybooksResponse expectedResponse = + ListPlaybooksResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybooks(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPlaybooksPagedResponse pagedListResponse = client.listPlaybooks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybooksList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybooksRequest actualRequest = ((ListPlaybooksRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybooksExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPlaybooks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookRequest actualRequest = ((GetPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookTest2() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + Playbook actualResponse = client.getPlaybook(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookRequest actualRequest = ((GetPlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.getPlaybook(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePlaybookTest() throws Exception { + Playbook expectedResponse = + Playbook.newBuilder() + .setName(PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setDisplayName("displayName1714148973") + .setGoal("goal3178259") + .addAllInputParameterDefinitions(new ArrayList()) + .addAllOutputParameterDefinitions(new ArrayList()) + .addAllSteps(new ArrayList()) + .setTokenCount(-1164226743) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .addAllReferencedPlaybooks(new ArrayList()) + .addAllReferencedFlows(new ArrayList()) + .addAllReferencedTools(new ArrayList()) + .setLlmModelSettings(LlmModelSettings.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Playbook actualResponse = client.updatePlaybook(playbook, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdatePlaybookRequest actualRequest = ((UpdatePlaybookRequest) actualRequests.get(0)); + + Assert.assertEquals(playbook, actualRequest.getPlaybook()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePlaybookExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updatePlaybook(playbook, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookVersionRequest actualRequest = + ((CreatePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(playbookVersion, actualRequest.getPlaybookVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + + PlaybookVersion actualResponse = client.createPlaybookVersion(parent, playbookVersion); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreatePlaybookVersionRequest actualRequest = + ((CreatePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(playbookVersion, actualRequest.getPlaybookVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createPlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + client.createPlaybookVersion(parent, playbookVersion); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookVersionRequest actualRequest = ((GetPlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPlaybookVersionTest2() throws Exception { + PlaybookVersion expectedResponse = + PlaybookVersion.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .setDescription("description-1724546052") + .setPlaybook(Playbook.newBuilder().build()) + .addAllExamples(new ArrayList()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + PlaybookVersion actualResponse = client.getPlaybookVersion(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetPlaybookVersionRequest actualRequest = ((GetPlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.getPlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybookVersionsRequest actualRequest = + ((ListPlaybookVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybookVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPlaybookVersionsTest2() throws Exception { + PlaybookVersion responsesElement = PlaybookVersion.newBuilder().build(); + ListPlaybookVersionsResponse expectedResponse = + ListPlaybookVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllPlaybookVersions(Arrays.asList(responsesElement)) + .build(); + mockPlaybooks.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListPlaybookVersionsPagedResponse pagedListResponse = client.listPlaybookVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPlaybookVersionsList().get(0), resources.get(0)); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPlaybookVersionsRequest actualRequest = + ((ListPlaybookVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPlaybookVersionsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String parent = "parent-995424086"; + client.listPlaybookVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + + client.deletePlaybookVersion(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookVersionRequest actualRequest = + ((DeletePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookVersionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deletePlaybookVersionTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockPlaybooks.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deletePlaybookVersion(name); + + List actualRequests = mockPlaybooks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeletePlaybookVersionRequest actualRequest = + ((DeletePlaybookVersionRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deletePlaybookVersionExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPlaybooks.addException(exception); + + try { + String name = "name3373707"; + client.deletePlaybookVersion(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java index 1dba2a786528..9a0d5b3a710f 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientHttpJsonTest.java @@ -149,6 +149,17 @@ public void detectIntentExceptionTest() throws Exception { } } + @Test + public void serverStreamingDetectIntentTest() throws Exception {} + + @Test + public void serverStreamingDetectIntentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void streamingDetectIntentUnsupportedMethodTest() throws Exception { // The streamingDetectIntent() method is not supported in REST transport. diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java index 6136c8711609..0d511eb9069d 100644 --- a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.ApiStreamObserver; import com.google.api.gax.rpc.BidiStreamingCallable; import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.ServerStreamingCallable; import com.google.api.gax.rpc.StatusCode; import com.google.cloud.location.GetLocationRequest; import com.google.cloud.location.ListLocationsRequest; @@ -158,6 +159,70 @@ public void detectIntentExceptionTest() throws Exception { } } + @Test + public void serverStreamingDetectIntentTest() throws Exception { + DetectIntentResponse expectedResponse = + DetectIntentResponse.newBuilder() + .setResponseId("responseId-633138884") + .setQueryResult(QueryResult.newBuilder().build()) + .setOutputAudio(ByteString.EMPTY) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .setAllowCancellation(true) + .build(); + mockSessions.addResponse(expectedResponse); + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.serverStreamingDetectIntentCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void serverStreamingDetectIntentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSessions.addException(exception); + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.serverStreamingDetectIntentCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void streamingDetectIntentTest() throws Exception { StreamingDetectIntentResponse expectedResponse = diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java new file mode 100644 index 000000000000..a2314379d391 --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientHttpJsonTest.java @@ -0,0 +1,700 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.dialogflow.cx.v3beta1.stub.HttpJsonToolsStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ToolsClientHttpJsonTest { + private static MockHttpService mockService; + private static ToolsClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonToolsStub.getMethodDescriptors(), ToolsSettings.getDefaultEndpoint()); + ToolsSettings settings = + ToolsSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ToolsSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ToolsClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listToolsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest2() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listToolsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-1167/locations/location-1167/agents/agent-1167"; + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportToolsTest() throws Exception { + ExportToolsResponse expectedResponse = ExportToolsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportToolsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + + ExportToolsResponse actualResponse = client.exportToolsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void exportToolsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + client.exportToolsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void getToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + Tool tool = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Tool actualResponse = client.updateTool(tool, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Tool tool = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTool(tool, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + client.deleteTool(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteToolExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + + client.deleteTool(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteToolExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-5365/locations/location-5365/agents/agent-5365/tools/tool-5365"; + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java new file mode 100644 index 000000000000..15afe474197a --- /dev/null +++ b/java-dialogflow-cx/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsClientTest.java @@ -0,0 +1,626 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListLocationsPagedResponse; +import static com.google.cloud.dialogflow.cx.v3beta1.ToolsClient.ListToolsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ToolsClientTest { + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private static MockTools mockTools; + private LocalChannelProvider channelProvider; + private ToolsClient client; + + @BeforeClass + public static void startStaticServer() { + mockTools = new MockTools(); + mockLocations = new MockLocations(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockTools, mockLocations)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ToolsSettings settings = + ToolsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ToolsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockTools.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolRequest actualRequest = ((CreateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + Tool tool = Tool.newBuilder().build(); + + Tool actualResponse = client.createTool(parent, tool); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateToolRequest actualRequest = ((CreateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + Tool tool = Tool.newBuilder().build(); + client.createTool(parent, tool); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolsRequest actualRequest = ((ListToolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listToolsTest2() throws Exception { + Tool responsesElement = Tool.newBuilder().build(); + ListToolsResponse expectedResponse = + ListToolsResponse.newBuilder() + .setNextPageToken("") + .addAllTools(Arrays.asList(responsesElement)) + .build(); + mockTools.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListToolsPagedResponse pagedListResponse = client.listTools(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getToolsList().get(0), resources.get(0)); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListToolsRequest actualRequest = ((ListToolsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listToolsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String parent = "parent-995424086"; + client.listTools(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void exportToolsTest() throws Exception { + ExportToolsResponse expectedResponse = ExportToolsResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportToolsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockTools.addResponse(resultOperation); + + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + + ExportToolsResponse actualResponse = client.exportToolsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportToolsRequest actualRequest = ((ExportToolsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getToolsList(), actualRequest.getToolsList()); + Assert.assertEquals(request.getToolsUri(), actualRequest.getToolsUri()); + Assert.assertEquals(request.getToolsContentInline(), actualRequest.getToolsContentInline()); + Assert.assertEquals(request.getDataFormat(), actualRequest.getDataFormat()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void exportToolsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + client.exportToolsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockTools.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolRequest actualRequest = ((GetToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getToolTest2() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + Tool actualResponse = client.getTool(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetToolRequest actualRequest = ((GetToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.getTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateToolTest() throws Exception { + Tool expectedResponse = + Tool.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setDisplayName("displayName1714148973") + .setDescription("description-1724546052") + .addAllActions(new ArrayList()) + .addAllSchemas(new ArrayList()) + .build(); + mockTools.addResponse(expectedResponse); + + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Tool actualResponse = client.updateTool(tool, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateToolRequest actualRequest = ((UpdateToolRequest) actualRequests.get(0)); + + Assert.assertEquals(tool, actualRequest.getTool()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateTool(tool, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + + client.deleteTool(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolRequest actualRequest = ((DeleteToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteToolTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockTools.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteTool(name); + + List actualRequests = mockTools.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteToolRequest actualRequest = ((DeleteToolRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteToolExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockTools.addException(exception); + + try { + String name = "name3373707"; + client.deleteTool(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java index bb0054a0f73e..1e3f8037dcf5 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypesGrpc.java @@ -262,6 +262,98 @@ private EntityTypesGrpc() {} return getListEntityTypesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod; + if ((getExportEntityTypesMethod = EntityTypesGrpc.getExportEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getExportEntityTypesMethod = EntityTypesGrpc.getExportEntityTypesMethod) == null) { + EntityTypesGrpc.getExportEntityTypesMethod = + getExportEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ExportEntityTypes")) + .build(); + } + } + } + return getExportEntityTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod; + if ((getImportEntityTypesMethod = EntityTypesGrpc.getImportEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getImportEntityTypesMethod = EntityTypesGrpc.getImportEntityTypesMethod) == null) { + EntityTypesGrpc.getImportEntityTypesMethod = + getImportEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ImportEntityTypes")) + .build(); + } + } + } + return getImportEntityTypesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EntityTypesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -393,6 +485,34 @@ default void listEntityTypes( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListEntityTypesMethod(), responseObserver); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + default void exportEntityTypes( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportEntityTypesMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + default void importEntityTypes( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportEntityTypesMethod(), responseObserver); + } } /** @@ -521,6 +641,38 @@ public void listEntityTypes( request, responseObserver); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public void exportEntityTypes( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public void importEntityTypes( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -615,6 +767,32 @@ public com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse listEntityTypes return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListEntityTypesMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public com.google.longrunning.Operation exportEntityTypes( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportEntityTypesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public com.google.longrunning.Operation importEntityTypes( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportEntityTypesMethod(), getCallOptions(), request); + } } /** @@ -713,6 +891,32 @@ protected EntityTypesFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportEntityTypes(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportEntityTypesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importEntityTypes(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportEntityTypesMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_ENTITY_TYPE = 0; @@ -720,6 +924,8 @@ protected EntityTypesFutureStub build( private static final int METHODID_UPDATE_ENTITY_TYPE = 2; private static final int METHODID_DELETE_ENTITY_TYPE = 3; private static final int METHODID_LIST_ENTITY_TYPES = 4; + private static final int METHODID_EXPORT_ENTITY_TYPES = 5; + private static final int METHODID_IMPORT_ENTITY_TYPES = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -768,6 +974,16 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>) responseObserver); break; + case METHODID_EXPORT_ENTITY_TYPES: + serviceImpl.exportEntityTypes( + (com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_ENTITY_TYPES: + serviceImpl.importEntityTypes( + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -820,6 +1036,18 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3.ListEntityTypesRequest, com.google.cloud.dialogflow.cx.v3.ListEntityTypesResponse>( service, METHODID_LIST_ENTITY_TYPES))) + .addMethod( + getExportEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest, + com.google.longrunning.Operation>(service, METHODID_EXPORT_ENTITY_TYPES))) + .addMethod( + getImportEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_ENTITY_TYPES))) .build(); } @@ -876,6 +1104,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateEntityTypeMethod()) .addMethod(getDeleteEntityTypeMethod()) .addMethod(getListEntityTypesMethod()) + .addMethod(getExportEntityTypesMethod()) + .addMethod(getImportEntityTypesMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java index 7ed419c563eb..465c6f391c35 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionsGrpc.java @@ -84,6 +84,57 @@ private SessionsGrpc() {} return getDetectIntentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3.DetectIntentResponse> + getServerStreamingDetectIntentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ServerStreamingDetectIntent", + requestType = com.google.cloud.dialogflow.cx.v3.DetectIntentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3.DetectIntentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3.DetectIntentResponse> + getServerStreamingDetectIntentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3.DetectIntentResponse> + getServerStreamingDetectIntentMethod; + if ((getServerStreamingDetectIntentMethod = SessionsGrpc.getServerStreamingDetectIntentMethod) + == null) { + synchronized (SessionsGrpc.class) { + if ((getServerStreamingDetectIntentMethod = + SessionsGrpc.getServerStreamingDetectIntentMethod) + == null) { + SessionsGrpc.getServerStreamingDetectIntentMethod = + getServerStreamingDetectIntentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ServerStreamingDetectIntent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3.DetectIntentResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SessionsMethodDescriptorSupplier("ServerStreamingDetectIntent")) + .build(); + } + } + } + return getServerStreamingDetectIntentMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest, com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse> @@ -346,6 +397,25 @@ default void detectIntent( getDetectIntentMethod(), responseObserver); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + default void serverStreamingDetectIntent( + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getServerStreamingDetectIntentMethod(), responseObserver); + } + /** * * @@ -483,6 +553,27 @@ public void detectIntent( responseObserver); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + public void serverStreamingDetectIntent( + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getServerStreamingDetectIntentMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -606,6 +697,23 @@ public com.google.cloud.dialogflow.cx.v3.DetectIntentResponse detectIntent( getChannel(), getDetectIntentMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + public java.util.Iterator + serverStreamingDetectIntent(com.google.cloud.dialogflow.cx.v3.DetectIntentRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getServerStreamingDetectIntentMethod(), getCallOptions(), request); + } + /** * * @@ -748,10 +856,11 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions } private static final int METHODID_DETECT_INTENT = 0; - private static final int METHODID_MATCH_INTENT = 1; - private static final int METHODID_FULFILL_INTENT = 2; - private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 3; - private static final int METHODID_STREAMING_DETECT_INTENT = 4; + private static final int METHODID_SERVER_STREAMING_DETECT_INTENT = 1; + private static final int METHODID_MATCH_INTENT = 2; + private static final int METHODID_FULFILL_INTENT = 3; + private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 4; + private static final int METHODID_STREAMING_DETECT_INTENT = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -776,6 +885,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_SERVER_STREAMING_DETECT_INTENT: + serviceImpl.serverStreamingDetectIntent( + (com.google.cloud.dialogflow.cx.v3.DetectIntentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_MATCH_INTENT: serviceImpl.matchIntent( (com.google.cloud.dialogflow.cx.v3.MatchIntentRequest) request, @@ -825,6 +940,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3.DetectIntentRequest, com.google.cloud.dialogflow.cx.v3.DetectIntentResponse>( service, METHODID_DETECT_INTENT))) + .addMethod( + getServerStreamingDetectIntentMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3.DetectIntentResponse>( + service, METHODID_SERVER_STREAMING_DETECT_INTENT))) .addMethod( getStreamingDetectIntentMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( @@ -903,6 +1025,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SessionsFileDescriptorSupplier()) .addMethod(getDetectIntentMethod()) + .addMethod(getServerStreamingDetectIntentMethod()) .addMethod(getStreamingDetectIntentMethod()) .addMethod(getMatchIntentMethod()) .addMethod(getFulfillIntentMethod()) diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java index 311b258cbba5..2b44c195b226 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesGrpc.java @@ -268,6 +268,98 @@ private EntityTypesGrpc() {} return getListEntityTypesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest, + com.google.longrunning.Operation> + getExportEntityTypesMethod; + if ((getExportEntityTypesMethod = EntityTypesGrpc.getExportEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getExportEntityTypesMethod = EntityTypesGrpc.getExportEntityTypesMethod) == null) { + EntityTypesGrpc.getExportEntityTypesMethod = + getExportEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ExportEntityTypes")) + .build(); + } + } + } + return getExportEntityTypesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ImportEntityTypes", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest, + com.google.longrunning.Operation> + getImportEntityTypesMethod; + if ((getImportEntityTypesMethod = EntityTypesGrpc.getImportEntityTypesMethod) == null) { + synchronized (EntityTypesGrpc.class) { + if ((getImportEntityTypesMethod = EntityTypesGrpc.getImportEntityTypesMethod) == null) { + EntityTypesGrpc.getImportEntityTypesMethod = + getImportEntityTypesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportEntityTypes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EntityTypesMethodDescriptorSupplier("ImportEntityTypes")) + .build(); + } + } + } + return getImportEntityTypesMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static EntityTypesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -397,6 +489,34 @@ default void listEntityTypes( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getListEntityTypesMethod(), responseObserver); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + default void exportEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportEntityTypesMethod(), responseObserver); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + default void importEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getImportEntityTypesMethod(), responseObserver); + } } /** @@ -524,6 +644,38 @@ public void listEntityTypes( request, responseObserver); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public void exportEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public void importEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getImportEntityTypesMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -616,6 +768,32 @@ public com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse listEntity return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListEntityTypesMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public com.google.longrunning.Operation exportEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportEntityTypesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public com.google.longrunning.Operation importEntityTypes( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getImportEntityTypesMethod(), getCallOptions(), request); + } } /** @@ -712,6 +890,32 @@ protected EntityTypesFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListEntityTypesMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Exports the selected entity types.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportEntityTypes(com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportEntityTypesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports the specified entitytypes into the agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importEntityTypes(com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getImportEntityTypesMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_ENTITY_TYPE = 0; @@ -719,6 +923,8 @@ protected EntityTypesFutureStub build( private static final int METHODID_UPDATE_ENTITY_TYPE = 2; private static final int METHODID_DELETE_ENTITY_TYPE = 3; private static final int METHODID_LIST_ENTITY_TYPES = 4; + private static final int METHODID_EXPORT_ENTITY_TYPES = 5; + private static final int METHODID_IMPORT_ENTITY_TYPES = 6; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -767,6 +973,16 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>) responseObserver); break; + case METHODID_EXPORT_ENTITY_TYPES: + serviceImpl.exportEntityTypes( + (com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_ENTITY_TYPES: + serviceImpl.importEntityTypes( + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -819,6 +1035,18 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesRequest, com.google.cloud.dialogflow.cx.v3beta1.ListEntityTypesResponse>( service, METHODID_LIST_ENTITY_TYPES))) + .addMethod( + getExportEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest, + com.google.longrunning.Operation>(service, METHODID_EXPORT_ENTITY_TYPES))) + .addMethod( + getImportEntityTypesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest, + com.google.longrunning.Operation>(service, METHODID_IMPORT_ENTITY_TYPES))) .build(); } @@ -875,6 +1103,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateEntityTypeMethod()) .addMethod(getDeleteEntityTypeMethod()) .addMethod(getListEntityTypesMethod()) + .addMethod(getExportEntityTypesMethod()) + .addMethod(getImportEntityTypesMethod()) .build(); } } diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesGrpc.java new file mode 100644 index 000000000000..a6dd0d40e7a0 --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExamplesGrpc.java @@ -0,0 +1,835 @@ +/* + * Copyright 2024 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.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/example.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ExamplesGrpc { + + private ExamplesGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Examples"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getCreateExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateExample", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getCreateExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getCreateExampleMethod; + if ((getCreateExampleMethod = ExamplesGrpc.getCreateExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getCreateExampleMethod = ExamplesGrpc.getCreateExampleMethod) == null) { + ExamplesGrpc.getCreateExampleMethod = + getCreateExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("CreateExample")) + .build(); + } + } + } + return getCreateExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteExample", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest, com.google.protobuf.Empty> + getDeleteExampleMethod; + if ((getDeleteExampleMethod = ExamplesGrpc.getDeleteExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getDeleteExampleMethod = ExamplesGrpc.getDeleteExampleMethod) == null) { + ExamplesGrpc.getDeleteExampleMethod = + getDeleteExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("DeleteExample")) + .build(); + } + } + } + return getDeleteExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse> + getListExamplesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListExamples", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse> + getListExamplesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse> + getListExamplesMethod; + if ((getListExamplesMethod = ExamplesGrpc.getListExamplesMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getListExamplesMethod = ExamplesGrpc.getListExamplesMethod) == null) { + ExamplesGrpc.getListExamplesMethod = + getListExamplesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListExamples")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("ListExamples")) + .build(); + } + } + } + return getListExamplesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getGetExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetExample", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getGetExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getGetExampleMethod; + if ((getGetExampleMethod = ExamplesGrpc.getGetExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getGetExampleMethod = ExamplesGrpc.getGetExampleMethod) == null) { + ExamplesGrpc.getGetExampleMethod = + getGetExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("GetExample")) + .build(); + } + } + } + return getGetExampleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getUpdateExampleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateExample", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Example.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getUpdateExampleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example> + getUpdateExampleMethod; + if ((getUpdateExampleMethod = ExamplesGrpc.getUpdateExampleMethod) == null) { + synchronized (ExamplesGrpc.class) { + if ((getUpdateExampleMethod = ExamplesGrpc.getUpdateExampleMethod) == null) { + ExamplesGrpc.getUpdateExampleMethod = + getUpdateExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance())) + .setSchemaDescriptor(new ExamplesMethodDescriptorSupplier("UpdateExample")) + .build(); + } + } + } + return getUpdateExampleMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ExamplesStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesStub(channel, callOptions); + } + }; + return ExamplesStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ExamplesBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingStub(channel, callOptions); + } + }; + return ExamplesBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ExamplesFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ExamplesFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesFutureStub(channel, callOptions); + } + }; + return ExamplesFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + default void createExample( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + default void deleteExample( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + default void listExamples( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListExamplesMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + default void getExample( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetExampleMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + default void updateExample( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateExampleMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+   * 
+ */ + public abstract static class ExamplesImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ExamplesGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+   * 
+ */ + public static final class ExamplesStub extends io.grpc.stub.AbstractAsyncStub { + private ExamplesStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public void createExample( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateExampleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public void deleteExample( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteExampleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public void listExamples( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListExamplesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public void getExample( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetExampleMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public void updateExample( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateExampleMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+   * 
+ */ + public static final class ExamplesBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ExamplesBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Example createExample( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public com.google.protobuf.Empty deleteExample( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse listExamples( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListExamplesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getExample( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetExampleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Example updateExample( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateExampleMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Examples. + * + *
+   * Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example].
+   * 
+ */ + public static final class ExamplesFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ExamplesFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ExamplesFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ExamplesFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates an example in the specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Example> + createExample(com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteExample(com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of examples in the specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse> + listExamples(com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListExamplesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Example> + getExample(com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetExampleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the specified example.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Example> + updateExample(com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateExampleMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_EXAMPLE = 0; + private static final int METHODID_DELETE_EXAMPLE = 1; + private static final int METHODID_LIST_EXAMPLES = 2; + private static final int METHODID_GET_EXAMPLE = 3; + private static final int METHODID_UPDATE_EXAMPLE = 4; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_EXAMPLE: + serviceImpl.createExample( + (com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_EXAMPLE: + serviceImpl.deleteExample( + (com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_EXAMPLES: + serviceImpl.listExamples( + (com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse>) + responseObserver); + break; + case METHODID_GET_EXAMPLE: + serviceImpl.getExample( + (com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_EXAMPLE: + serviceImpl.updateExample( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example>( + service, METHODID_CREATE_EXAMPLE))) + .addMethod( + getDeleteExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_EXAMPLE))) + .addMethod( + getListExamplesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse>( + service, METHODID_LIST_EXAMPLES))) + .addMethod( + getGetExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example>(service, METHODID_GET_EXAMPLE))) + .addMethod( + getUpdateExampleMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest, + com.google.cloud.dialogflow.cx.v3beta1.Example>( + service, METHODID_UPDATE_EXAMPLE))) + .build(); + } + + private abstract static class ExamplesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ExamplesBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Examples"); + } + } + + private static final class ExamplesFileDescriptorSupplier extends ExamplesBaseDescriptorSupplier { + ExamplesFileDescriptorSupplier() {} + } + + private static final class ExamplesMethodDescriptorSupplier extends ExamplesBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ExamplesMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ExamplesGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ExamplesFileDescriptorSupplier()) + .addMethod(getCreateExampleMethod()) + .addMethod(getDeleteExampleMethod()) + .addMethod(getListExamplesMethod()) + .addMethod(getGetExampleMethod()) + .addMethod(getUpdateExampleMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksGrpc.java new file mode 100644 index 000000000000..5e0c78f70a56 --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybooksGrpc.java @@ -0,0 +1,1339 @@ +/* + * Copyright 2024 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.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing
+ * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/playbook.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class PlaybooksGrpc { + + private PlaybooksGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.dialogflow.cx.v3beta1.Playbooks"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getCreatePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getCreatePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getCreatePlaybookMethod; + if ((getCreatePlaybookMethod = PlaybooksGrpc.getCreatePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getCreatePlaybookMethod = PlaybooksGrpc.getCreatePlaybookMethod) == null) { + PlaybooksGrpc.getCreatePlaybookMethod = + getCreatePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreatePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("CreatePlaybook")) + .build(); + } + } + } + return getCreatePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest, com.google.protobuf.Empty> + getDeletePlaybookMethod; + if ((getDeletePlaybookMethod = PlaybooksGrpc.getDeletePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getDeletePlaybookMethod = PlaybooksGrpc.getDeletePlaybookMethod) == null) { + PlaybooksGrpc.getDeletePlaybookMethod = + getDeletePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeletePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("DeletePlaybook")) + .build(); + } + } + } + return getDeletePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse> + getListPlaybooksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPlaybooks", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse> + getListPlaybooksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse> + getListPlaybooksMethod; + if ((getListPlaybooksMethod = PlaybooksGrpc.getListPlaybooksMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getListPlaybooksMethod = PlaybooksGrpc.getListPlaybooksMethod) == null) { + PlaybooksGrpc.getListPlaybooksMethod = + getListPlaybooksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListPlaybooks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse + .getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("ListPlaybooks")) + .build(); + } + } + } + return getListPlaybooksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getGetPlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPlaybook", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getGetPlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getGetPlaybookMethod; + if ((getGetPlaybookMethod = PlaybooksGrpc.getGetPlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getGetPlaybookMethod = PlaybooksGrpc.getGetPlaybookMethod) == null) { + PlaybooksGrpc.getGetPlaybookMethod = + getGetPlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("GetPlaybook")) + .build(); + } + } + } + return getGetPlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getUpdatePlaybookMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePlaybook", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Playbook.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getUpdatePlaybookMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getUpdatePlaybookMethod; + if ((getUpdatePlaybookMethod = PlaybooksGrpc.getUpdatePlaybookMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getUpdatePlaybookMethod = PlaybooksGrpc.getUpdatePlaybookMethod) == null) { + PlaybooksGrpc.getUpdatePlaybookMethod = + getUpdatePlaybookMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePlaybook")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance())) + .setSchemaDescriptor(new PlaybooksMethodDescriptorSupplier("UpdatePlaybook")) + .build(); + } + } + } + return getUpdatePlaybookMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getCreatePlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreatePlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getCreatePlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getCreatePlaybookVersionMethod; + if ((getCreatePlaybookVersionMethod = PlaybooksGrpc.getCreatePlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getCreatePlaybookVersionMethod = PlaybooksGrpc.getCreatePlaybookVersionMethod) + == null) { + PlaybooksGrpc.getCreatePlaybookVersionMethod = + getCreatePlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreatePlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("CreatePlaybookVersion")) + .build(); + } + } + } + return getCreatePlaybookVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getGetPlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getGetPlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getGetPlaybookVersionMethod; + if ((getGetPlaybookVersionMethod = PlaybooksGrpc.getGetPlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getGetPlaybookVersionMethod = PlaybooksGrpc.getGetPlaybookVersionMethod) == null) { + PlaybooksGrpc.getGetPlaybookVersionMethod = + getGetPlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("GetPlaybookVersion")) + .build(); + } + } + } + return getGetPlaybookVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPlaybookVersions", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + getListPlaybookVersionsMethod; + if ((getListPlaybookVersionsMethod = PlaybooksGrpc.getListPlaybookVersionsMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getListPlaybookVersionsMethod = PlaybooksGrpc.getListPlaybookVersionsMethod) == null) { + PlaybooksGrpc.getListPlaybookVersionsMethod = + getListPlaybookVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPlaybookVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("ListPlaybookVersions")) + .build(); + } + } + } + return getListPlaybookVersionsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest, + com.google.protobuf.Empty> + getDeletePlaybookVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeletePlaybookVersion", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest, + com.google.protobuf.Empty> + getDeletePlaybookVersionMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest, + com.google.protobuf.Empty> + getDeletePlaybookVersionMethod; + if ((getDeletePlaybookVersionMethod = PlaybooksGrpc.getDeletePlaybookVersionMethod) == null) { + synchronized (PlaybooksGrpc.class) { + if ((getDeletePlaybookVersionMethod = PlaybooksGrpc.getDeletePlaybookVersionMethod) + == null) { + PlaybooksGrpc.getDeletePlaybookVersionMethod = + getDeletePlaybookVersionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeletePlaybookVersion")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new PlaybooksMethodDescriptorSupplier("DeletePlaybookVersion")) + .build(); + } + } + } + return getDeletePlaybookVersionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static PlaybooksStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksStub(channel, callOptions); + } + }; + return PlaybooksStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static PlaybooksBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingStub(channel, callOptions); + } + }; + return PlaybooksBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static PlaybooksFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public PlaybooksFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksFutureStub(channel, callOptions); + } + }; + return PlaybooksFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing
+   * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + default void createPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + default void deletePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + default void listPlaybooks( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPlaybooksMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + default void getPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + default void updatePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePlaybookMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + default void createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreatePlaybookVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + default void getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetPlaybookVersionMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + default void listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListPlaybookVersionsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + default void deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeletePlaybookVersionMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Playbooks. + * + *
+   * Service for managing
+   * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+   * 
+ */ + public abstract static class PlaybooksImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return PlaybooksGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Playbooks. + * + *
+   * Service for managing
+   * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+   * 
+ */ + public static final class PlaybooksStub extends io.grpc.stub.AbstractAsyncStub { + private PlaybooksStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public void createPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public void deletePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public void listPlaybooks( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPlaybooksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public void getPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public void updatePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePlaybookMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public void createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreatePlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public void getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public void listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListPlaybookVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public void deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeletePlaybookVersionMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Playbooks. + * + *
+   * Service for managing
+   * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+   * 
+ */ + public static final class PlaybooksBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private PlaybooksBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook createPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse listPlaybooks( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPlaybooksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook updatePlaybook( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePlaybookMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreatePlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPlaybookVersionMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListPlaybookVersionsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public com.google.protobuf.Empty deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeletePlaybookVersionMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Playbooks. + * + *
+   * Service for managing
+   * [Playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook].
+   * 
+ */ + public static final class PlaybooksFutureStub + extends io.grpc.stub.AbstractFutureStub { + private PlaybooksFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected PlaybooksFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new PlaybooksFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a playbook in a specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + createPlaybook(com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specified playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePlaybook(com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of playbooks in the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse> + listPlaybooks(com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPlaybooksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + getPlaybook(com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Playbook> + updatePlaybook(com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePlaybookMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a version for the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + createPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreatePlaybookVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified version of the Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion> + getPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPlaybookVersionMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists versions for the specified Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse> + listPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListPlaybookVersionsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the specified version of the Playbook.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deletePlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeletePlaybookVersionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_PLAYBOOK = 0; + private static final int METHODID_DELETE_PLAYBOOK = 1; + private static final int METHODID_LIST_PLAYBOOKS = 2; + private static final int METHODID_GET_PLAYBOOK = 3; + private static final int METHODID_UPDATE_PLAYBOOK = 4; + private static final int METHODID_CREATE_PLAYBOOK_VERSION = 5; + private static final int METHODID_GET_PLAYBOOK_VERSION = 6; + private static final int METHODID_LIST_PLAYBOOK_VERSIONS = 7; + private static final int METHODID_DELETE_PLAYBOOK_VERSION = 8; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_PLAYBOOK: + serviceImpl.createPlaybook( + (com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_PLAYBOOK: + serviceImpl.deletePlaybook( + (com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PLAYBOOKS: + serviceImpl.listPlaybooks( + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse>) + responseObserver); + break; + case METHODID_GET_PLAYBOOK: + serviceImpl.getPlaybook( + (com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PLAYBOOK: + serviceImpl.updatePlaybook( + (com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_PLAYBOOK_VERSION: + serviceImpl.createPlaybookVersion( + (com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_PLAYBOOK_VERSION: + serviceImpl.getPlaybookVersion( + (com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PLAYBOOK_VERSIONS: + serviceImpl.listPlaybookVersions( + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse>) + responseObserver); + break; + case METHODID_DELETE_PLAYBOOK_VERSION: + serviceImpl.deletePlaybookVersion( + (com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreatePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook>( + service, METHODID_CREATE_PLAYBOOK))) + .addMethod( + getDeletePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_PLAYBOOK))) + .addMethod( + getListPlaybooksMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse>( + service, METHODID_LIST_PLAYBOOKS))) + .addMethod( + getGetPlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook>( + service, METHODID_GET_PLAYBOOK))) + .addMethod( + getUpdatePlaybookMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest, + com.google.cloud.dialogflow.cx.v3beta1.Playbook>( + service, METHODID_UPDATE_PLAYBOOK))) + .addMethod( + getCreatePlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion>( + service, METHODID_CREATE_PLAYBOOK_VERSION))) + .addMethod( + getGetPlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion>( + service, METHODID_GET_PLAYBOOK_VERSION))) + .addMethod( + getListPlaybookVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse>( + service, METHODID_LIST_PLAYBOOK_VERSIONS))) + .addMethod( + getDeletePlaybookVersionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_PLAYBOOK_VERSION))) + .build(); + } + + private abstract static class PlaybooksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + PlaybooksBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Playbooks"); + } + } + + private static final class PlaybooksFileDescriptorSupplier + extends PlaybooksBaseDescriptorSupplier { + PlaybooksFileDescriptorSupplier() {} + } + + private static final class PlaybooksMethodDescriptorSupplier + extends PlaybooksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + PlaybooksMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (PlaybooksGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new PlaybooksFileDescriptorSupplier()) + .addMethod(getCreatePlaybookMethod()) + .addMethod(getDeletePlaybookMethod()) + .addMethod(getListPlaybooksMethod()) + .addMethod(getGetPlaybookMethod()) + .addMethod(getUpdatePlaybookMethod()) + .addMethod(getCreatePlaybookVersionMethod()) + .addMethod(getGetPlaybookVersionMethod()) + .addMethod(getListPlaybookVersionsMethod()) + .addMethod(getDeletePlaybookVersionMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java index 1de6466726d1..6c332c64dcc5 100644 --- a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsGrpc.java @@ -84,6 +84,57 @@ private SessionsGrpc() {} return getDetectIntentMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse> + getServerStreamingDetectIntentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ServerStreamingDetectIntent", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse> + getServerStreamingDetectIntentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse> + getServerStreamingDetectIntentMethod; + if ((getServerStreamingDetectIntentMethod = SessionsGrpc.getServerStreamingDetectIntentMethod) + == null) { + synchronized (SessionsGrpc.class) { + if ((getServerStreamingDetectIntentMethod = + SessionsGrpc.getServerStreamingDetectIntentMethod) + == null) { + SessionsGrpc.getServerStreamingDetectIntentMethod = + getServerStreamingDetectIntentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ServerStreamingDetectIntent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new SessionsMethodDescriptorSupplier("ServerStreamingDetectIntent")) + .build(); + } + } + } + return getServerStreamingDetectIntentMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentRequest, com.google.cloud.dialogflow.cx.v3beta1.StreamingDetectIntentResponse> @@ -346,6 +397,25 @@ default void detectIntent( getDetectIntentMethod(), responseObserver); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + default void serverStreamingDetectIntent( + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getServerStreamingDetectIntentMethod(), responseObserver); + } + /** * * @@ -483,6 +553,27 @@ public void detectIntent( responseObserver); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + public void serverStreamingDetectIntent( + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getServerStreamingDetectIntentMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -606,6 +697,24 @@ public com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse detectIntent( getChannel(), getDetectIntentMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Processes a natural language query and returns structured, actionable data
+     * as a result through server-side streaming. Server-side streaming allows
+     * Dialogflow to send [partial
+     * responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response)
+     * earlier in a single request.
+     * 
+ */ + public java.util.Iterator + serverStreamingDetectIntent( + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getServerStreamingDetectIntentMethod(), getCallOptions(), request); + } + /** * * @@ -748,10 +857,11 @@ protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions } private static final int METHODID_DETECT_INTENT = 0; - private static final int METHODID_MATCH_INTENT = 1; - private static final int METHODID_FULFILL_INTENT = 2; - private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 3; - private static final int METHODID_STREAMING_DETECT_INTENT = 4; + private static final int METHODID_SERVER_STREAMING_DETECT_INTENT = 1; + private static final int METHODID_MATCH_INTENT = 2; + private static final int METHODID_FULFILL_INTENT = 3; + private static final int METHODID_SUBMIT_ANSWER_FEEDBACK = 4; + private static final int METHODID_STREAMING_DETECT_INTENT = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -777,6 +887,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse>) responseObserver); break; + case METHODID_SERVER_STREAMING_DETECT_INTENT: + serviceImpl.serverStreamingDetectIntent( + (com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse>) + responseObserver); + break; case METHODID_MATCH_INTENT: serviceImpl.matchIntent( (com.google.cloud.dialogflow.cx.v3beta1.MatchIntentRequest) request, @@ -828,6 +945,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest, com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse>( service, METHODID_DETECT_INTENT))) + .addMethod( + getServerStreamingDetectIntentMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest, + com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse>( + service, METHODID_SERVER_STREAMING_DETECT_INTENT))) .addMethod( getStreamingDetectIntentMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( @@ -906,6 +1030,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new SessionsFileDescriptorSupplier()) .addMethod(getDetectIntentMethod()) + .addMethod(getServerStreamingDetectIntentMethod()) .addMethod(getStreamingDetectIntentMethod()) .addMethod(getMatchIntentMethod()) .addMethod(getFulfillIntentMethod()) diff --git a/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsGrpc.java b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsGrpc.java new file mode 100644 index 000000000000..abffca34ec41 --- /dev/null +++ b/java-dialogflow-cx/grpc-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolsGrpc.java @@ -0,0 +1,936 @@ +/* + * Copyright 2024 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.cloud.dialogflow.cx.v3beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/cx/v3beta1/tool.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ToolsGrpc { + + private ToolsGrpc() {} + + public static final java.lang.String SERVICE_NAME = "google.cloud.dialogflow.cx.v3beta1.Tools"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getCreateToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTool", + requestType = com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getCreateToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getCreateToolMethod; + if ((getCreateToolMethod = ToolsGrpc.getCreateToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getCreateToolMethod = ToolsGrpc.getCreateToolMethod) == null) { + ToolsGrpc.getCreateToolMethod = + getCreateToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("CreateTool")) + .build(); + } + } + } + return getCreateToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse> + getListToolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTools", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse> + getListToolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse> + getListToolsMethod; + if ((getListToolsMethod = ToolsGrpc.getListToolsMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getListToolsMethod = ToolsGrpc.getListToolsMethod) == null) { + ToolsGrpc.getListToolsMethod = + getListToolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("ListTools")) + .build(); + } + } + } + return getListToolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest, + com.google.longrunning.Operation> + getExportToolsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportTools", + requestType = com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest, + com.google.longrunning.Operation> + getExportToolsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest, + com.google.longrunning.Operation> + getExportToolsMethod; + if ((getExportToolsMethod = ToolsGrpc.getExportToolsMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getExportToolsMethod = ToolsGrpc.getExportToolsMethod) == null) { + ToolsGrpc.getExportToolsMethod = + getExportToolsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportTools")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("ExportTools")) + .build(); + } + } + } + return getExportToolsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getGetToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTool", + requestType = com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getGetToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getGetToolMethod; + if ((getGetToolMethod = ToolsGrpc.getGetToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getGetToolMethod = ToolsGrpc.getGetToolMethod) == null) { + ToolsGrpc.getGetToolMethod = + getGetToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("GetTool")) + .build(); + } + } + } + return getGetToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getUpdateToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTool", + requestType = com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.class, + responseType = com.google.cloud.dialogflow.cx.v3beta1.Tool.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getUpdateToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getUpdateToolMethod; + if ((getUpdateToolMethod = ToolsGrpc.getUpdateToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getUpdateToolMethod = ToolsGrpc.getUpdateToolMethod) == null) { + ToolsGrpc.getUpdateToolMethod = + getUpdateToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("UpdateTool")) + .build(); + } + } + } + return getUpdateToolMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteTool", + requestType = com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest, com.google.protobuf.Empty> + getDeleteToolMethod; + if ((getDeleteToolMethod = ToolsGrpc.getDeleteToolMethod) == null) { + synchronized (ToolsGrpc.class) { + if ((getDeleteToolMethod = ToolsGrpc.getDeleteToolMethod) == null) { + ToolsGrpc.getDeleteToolMethod = + getDeleteToolMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteTool")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ToolsMethodDescriptorSupplier("DeleteTool")) + .build(); + } + } + } + return getDeleteToolMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ToolsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsStub(channel, callOptions); + } + }; + return ToolsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ToolsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingStub(channel, callOptions); + } + }; + return ToolsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ToolsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ToolsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsFutureStub(channel, callOptions); + } + }; + return ToolsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified
+     * agent.
+     * 
+ */ + default void createTool( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the
+     * specified agent.
+     * 
+ */ + default void listTools( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListToolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports the selected tools.
+     * 
+ */ + default void exportTools( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getExportToolsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + default void getTool( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + default void updateTool( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateToolMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + default void deleteTool( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteToolMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+   * 
+ */ + public abstract static class ToolsImplBase implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ToolsGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+   * 
+ */ + public static final class ToolsStub extends io.grpc.stub.AbstractAsyncStub { + private ToolsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified
+     * agent.
+     * 
+ */ + public void createTool( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the
+     * specified agent.
+     * 
+ */ + public void listTools( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListToolsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Exports the selected tools.
+     * 
+ */ + public void exportTools( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getExportToolsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public void getTool( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public void updateTool( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateToolMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public void deleteTool( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteToolMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+   * 
+ */ + public static final class ToolsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ToolsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified
+     * agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool createTool( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the
+     * specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse listTools( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListToolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the selected tools.
+     * 
+ */ + public com.google.longrunning.Operation exportTools( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getExportToolsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTool( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool updateTool( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateToolMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.protobuf.Empty deleteTool( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteToolMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service Tools. + * + *
+   * Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool].
+   * 
+ */ + public static final class ToolsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ToolsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ToolsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ToolsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified
+     * agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Tool> + createTool(com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the
+     * specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse> + listTools(com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListToolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports the selected tools.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportTools(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getExportToolsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Tool> + getTool(com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.cx.v3beta1.Tool> + updateTool(com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateToolMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteTool( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteToolMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_TOOL = 0; + private static final int METHODID_LIST_TOOLS = 1; + private static final int METHODID_EXPORT_TOOLS = 2; + private static final int METHODID_GET_TOOL = 3; + private static final int METHODID_UPDATE_TOOL = 4; + private static final int METHODID_DELETE_TOOL = 5; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_TOOL: + serviceImpl.createTool( + (com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TOOLS: + serviceImpl.listTools( + (com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse>) + responseObserver); + break; + case METHODID_EXPORT_TOOLS: + serviceImpl.exportTools( + (com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOOL: + serviceImpl.getTool( + (com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_TOOL: + serviceImpl.updateTool( + (com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_TOOL: + serviceImpl.deleteTool( + (com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool>(service, METHODID_CREATE_TOOL))) + .addMethod( + getListToolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse>( + service, METHODID_LIST_TOOLS))) + .addMethod( + getExportToolsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest, + com.google.longrunning.Operation>(service, METHODID_EXPORT_TOOLS))) + .addMethod( + getGetToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool>(service, METHODID_GET_TOOL))) + .addMethod( + getUpdateToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest, + com.google.cloud.dialogflow.cx.v3beta1.Tool>(service, METHODID_UPDATE_TOOL))) + .addMethod( + getDeleteToolMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_TOOL))) + .build(); + } + + private abstract static class ToolsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ToolsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Tools"); + } + } + + private static final class ToolsFileDescriptorSupplier extends ToolsBaseDescriptorSupplier { + ToolsFileDescriptorSupplier() {} + } + + private static final class ToolsMethodDescriptorSupplier extends ToolsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ToolsMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ToolsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ToolsFileDescriptorSupplier()) + .addMethod(getCreateToolMethod()) + .addMethod(getListToolsMethod()) + .addMethod(getExportToolsMethod()) + .addMethod(getGetToolMethod()) + .addMethod(getUpdateToolMethod()) + .addMethod(getDeleteToolMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java index 66c2fe1d342a..06cc838ae2c6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Agent.java @@ -4345,7 +4345,8 @@ public com.google.cloud.dialogflow.cx.v3.SpeechToTextSettings getSpeechToTextSet * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -4373,7 +4374,8 @@ public java.lang.String getStartFlow() { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -4467,7 +4469,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=323 + * google/cloud/dialogflow/cx/v3/agent.proto;l=324 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -6784,7 +6786,8 @@ public Builder clearSpeechToTextSettings() { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -6811,7 +6814,8 @@ public java.lang.String getStartFlow() { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -6838,7 +6842,8 @@ public com.google.protobuf.ByteString getStartFlowBytes() { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -6864,7 +6869,8 @@ public Builder setStartFlow(java.lang.String value) { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -6886,7 +6892,8 @@ public Builder clearStartFlow() { * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -7042,7 +7049,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=323 + * google/cloud/dialogflow/cx/v3/agent.proto;l=324 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -7063,7 +7070,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=323 + * google/cloud/dialogflow/cx/v3/agent.proto;l=324 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -7088,7 +7095,7 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=323 + * google/cloud/dialogflow/cx/v3/agent.proto;l=324 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java index 98022892790a..dcdbd6080883 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentOrBuilder.java @@ -312,7 +312,8 @@ public interface AgentOrBuilder * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -329,7 +330,8 @@ public interface AgentOrBuilder * Immutable. Name of the start flow in this agent. A start flow will be * automatically created when the agent is created, and can only be deleted by * deleting the agent. Format: `projects/<Project ID>/locations/<Location - * ID>/agents/<Agent ID>/flows/<Flow ID>`. + * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start + * flow with id "00000000-0000-0000-0000-000000000000" is allowed. * * * @@ -384,7 +386,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.Agent.enable_stackdriver_logging is deprecated. See - * google/cloud/dialogflow/cx/v3/agent.proto;l=323 + * google/cloud/dialogflow/cx/v3/agent.proto;l=324 * @return The enableStackdriverLogging. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java index ba11238f671f..c9553a45b876 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/AudioConfigProto.java @@ -80,7 +80,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\002\"{\n\rBargeInConfig\0227\n\024no_barge_in_durat" + "ion\030\001 \001(\0132\031.google.protobuf.Duration\0221\n\016" + "total_duration\030\002 \001(\0132\031.google.protobuf.D" - + "uration\"\342\002\n\020InputAudioConfig\022I\n\016audio_en" + + "uration\"\215\003\n\020InputAudioConfig\022I\n\016audio_en" + "coding\030\001 \001(\0162,.google.cloud.dialogflow.c" + "x.v3.AudioEncodingB\003\340A\002\022\031\n\021sample_rate_h" + "ertz\030\002 \001(\005\022\030\n\020enable_word_info\030\r \001(\010\022\024\n\014" @@ -89,52 +89,53 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ow.cx.v3.SpeechModelVariant\022\030\n\020single_ut" + "terance\030\010 \001(\010\022E\n\017barge_in_config\030\017 \001(\0132," + ".google.cloud.dialogflow.cx.v3.BargeInCo" - + "nfig\"i\n\024VoiceSelectionParams\022\014\n\004name\030\001 \001" - + "(\t\022C\n\013ssml_gender\030\002 \001(\0162..google.cloud.d" - + "ialogflow.cx.v3.SsmlVoiceGender\"\266\001\n\026Synt" - + "hesizeSpeechConfig\022\025\n\rspeaking_rate\030\001 \001(" - + "\001\022\r\n\005pitch\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(\001" - + "\022\032\n\022effects_profile_id\030\005 \003(\t\022B\n\005voice\030\004 " - + "\001(\01323.google.cloud.dialogflow.cx.v3.Voic" - + "eSelectionParams\"\330\001\n\021OutputAudioConfig\022O" - + "\n\016audio_encoding\030\001 \001(\01622.google.cloud.di" - + "alogflow.cx.v3.OutputAudioEncodingB\003\340A\002\022" - + "\031\n\021sample_rate_hertz\030\002 \001(\005\022W\n\030synthesize" - + "_speech_config\030\003 \001(\01325.google.cloud.dial" - + "ogflow.cx.v3.SynthesizeSpeechConfig\"\202\002\n\024" - + "TextToSpeechSettings\022s\n\031synthesize_speec" - + "h_configs\030\001 \003(\0132P.google.cloud.dialogflo" - + "w.cx.v3.TextToSpeechSettings.SynthesizeS" - + "peechConfigsEntry\032u\n\034SynthesizeSpeechCon" - + "figsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\01325." - + "google.cloud.dialogflow.cx.v3.Synthesize" - + "SpeechConfig:\0028\001*\373\001\n\rAudioEncoding\022\036\n\032AU" - + "DIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030AUDIO_ENCO" - + "DING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCODING_FLAC\020" - + "\002\022\030\n\024AUDIO_ENCODING_MULAW\020\003\022\026\n\022AUDIO_ENC" - + "ODING_AMR\020\004\022\031\n\025AUDIO_ENCODING_AMR_WB\020\005\022\033" - + "\n\027AUDIO_ENCODING_OGG_OPUS\020\006\022)\n%AUDIO_ENC" - + "ODING_SPEEX_WITH_HEADER_BYTE\020\007*v\n\022Speech" - + "ModelVariant\022$\n SPEECH_MODEL_VARIANT_UNS" - + "PECIFIED\020\000\022\026\n\022USE_BEST_AVAILABLE\020\001\022\020\n\014US" - + "E_STANDARD\020\002\022\020\n\014USE_ENHANCED\020\003*\215\001\n\017SsmlV" - + "oiceGender\022!\n\035SSML_VOICE_GENDER_UNSPECIF" - + "IED\020\000\022\032\n\026SSML_VOICE_GENDER_MALE\020\001\022\034\n\030SSM" - + "L_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSML_VOICE_GE" - + "NDER_NEUTRAL\020\003*\354\001\n\023OutputAudioEncoding\022%" - + "\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\020\000\022#\n" - + "\037OUTPUT_AUDIO_ENCODING_LINEAR_16\020\001\022\035\n\031OU" - + "TPUT_AUDIO_ENCODING_MP3\020\002\022%\n!OUTPUT_AUDI" - + "O_ENCODING_MP3_64_KBPS\020\004\022\"\n\036OUTPUT_AUDIO" - + "_ENCODING_OGG_OPUS\020\003\022\037\n\033OUTPUT_AUDIO_ENC" - + "ODING_MULAW\020\005B\216\002\n!com.google.cloud.dialo" - + "gflow.cx.v3B\020AudioConfigProtoP\001Z1cloud.g" - + "oogle.com/go/dialogflow/cx/apiv3/cxpb;cx" - + "pb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx." - + "V3\352\002!Google::Cloud::Dialogflow::CX::V3\352A" - + "U\n\033automl.googleapis.com/Model\0226projects" - + "/{project}/locations/{location}/models/{" - + "model}b\006proto3" + + "nfig\022)\n!opt_out_conformer_model_migratio" + + "n\030\032 \001(\010\"i\n\024VoiceSelectionParams\022\014\n\004name\030" + + "\001 \001(\t\022C\n\013ssml_gender\030\002 \001(\0162..google.clou" + + "d.dialogflow.cx.v3.SsmlVoiceGender\"\266\001\n\026S" + + "ynthesizeSpeechConfig\022\025\n\rspeaking_rate\030\001" + + " \001(\001\022\r\n\005pitch\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 " + + "\001(\001\022\032\n\022effects_profile_id\030\005 \003(\t\022B\n\005voice" + + "\030\004 \001(\01323.google.cloud.dialogflow.cx.v3.V" + + "oiceSelectionParams\"\330\001\n\021OutputAudioConfi" + + "g\022O\n\016audio_encoding\030\001 \001(\01622.google.cloud" + + ".dialogflow.cx.v3.OutputAudioEncodingB\003\340" + + "A\002\022\031\n\021sample_rate_hertz\030\002 \001(\005\022W\n\030synthes" + + "ize_speech_config\030\003 \001(\01325.google.cloud.d" + + "ialogflow.cx.v3.SynthesizeSpeechConfig\"\202" + + "\002\n\024TextToSpeechSettings\022s\n\031synthesize_sp" + + "eech_configs\030\001 \003(\0132P.google.cloud.dialog" + + "flow.cx.v3.TextToSpeechSettings.Synthesi" + + "zeSpeechConfigsEntry\032u\n\034SynthesizeSpeech" + + "ConfigsEntry\022\013\n\003key\030\001 \001(\t\022D\n\005value\030\002 \001(\013" + + "25.google.cloud.dialogflow.cx.v3.Synthes" + + "izeSpeechConfig:\0028\001*\373\001\n\rAudioEncoding\022\036\n" + + "\032AUDIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030AUDIO_E" + + "NCODING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCODING_FL" + + "AC\020\002\022\030\n\024AUDIO_ENCODING_MULAW\020\003\022\026\n\022AUDIO_" + + "ENCODING_AMR\020\004\022\031\n\025AUDIO_ENCODING_AMR_WB\020" + + "\005\022\033\n\027AUDIO_ENCODING_OGG_OPUS\020\006\022)\n%AUDIO_" + + "ENCODING_SPEEX_WITH_HEADER_BYTE\020\007*v\n\022Spe" + + "echModelVariant\022$\n SPEECH_MODEL_VARIANT_" + + "UNSPECIFIED\020\000\022\026\n\022USE_BEST_AVAILABLE\020\001\022\020\n" + + "\014USE_STANDARD\020\002\022\020\n\014USE_ENHANCED\020\003*\215\001\n\017Ss" + + "mlVoiceGender\022!\n\035SSML_VOICE_GENDER_UNSPE" + + "CIFIED\020\000\022\032\n\026SSML_VOICE_GENDER_MALE\020\001\022\034\n\030" + + "SSML_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSML_VOICE" + + "_GENDER_NEUTRAL\020\003*\354\001\n\023OutputAudioEncodin" + + "g\022%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFIED\020\000" + + "\022#\n\037OUTPUT_AUDIO_ENCODING_LINEAR_16\020\001\022\035\n" + + "\031OUTPUT_AUDIO_ENCODING_MP3\020\002\022%\n!OUTPUT_A" + + "UDIO_ENCODING_MP3_64_KBPS\020\004\022\"\n\036OUTPUT_AU" + + "DIO_ENCODING_OGG_OPUS\020\003\022\037\n\033OUTPUT_AUDIO_" + + "ENCODING_MULAW\020\005B\216\002\n!com.google.cloud.di" + + "alogflow.cx.v3B\020AudioConfigProtoP\001Z1clou" + + "d.google.com/go/dialogflow/cx/apiv3/cxpb" + + ";cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow." + + "Cx.V3\352\002!Google::Cloud::Dialogflow::CX::V" + + "3\352AU\n\033automl.googleapis.com/Model\0226proje" + + "cts/{project}/locations/{location}/model" + + "s/{model}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -174,6 +175,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelVariant", "SingleUtterance", "BargeInConfig", + "OptOutConformerModelMigration", }); internal_static_google_cloud_dialogflow_cx_v3_VoiceSelectionParams_descriptor = getDescriptor().getMessageTypes().get(3); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Changelog.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Changelog.java index afe6b3ccab3d..558a23c63919 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Changelog.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Changelog.java @@ -45,6 +45,7 @@ private Changelog() { action_ = ""; type_ = ""; resource_ = ""; + languageCode_ = ""; } @java.lang.Override @@ -425,6 +426,57 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -460,6 +512,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, action_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, languageCode_); + } getUnknownFields().writeTo(output); } @@ -490,6 +545,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, action_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, languageCode_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -516,6 +574,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,6 +602,8 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -702,6 +763,7 @@ public Builder clear() { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } + languageCode_ = ""; return this; } @@ -761,6 +823,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Changelog result) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.languageCode_ = languageCode_; + } result.bitField0_ |= to_bitField0_; } @@ -842,6 +907,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Changelog other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000080; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -910,6 +980,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 90 + case 114: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1760,6 +1836,112 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogOrBuilder.java index 720212e6de53..4835ffc3da20 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogOrBuilder.java @@ -212,4 +212,29 @@ public interface ChangelogOrBuilder * .google.protobuf.Timestamp create_time = 4; */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogProto.java index dd74b288cc3d..a5144d540151 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogProto.java @@ -67,32 +67,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cx.v3.Changelog\022\027\n\017next_page_token\030\002 \001(" + "\t\"P\n\023GetChangelogRequest\0229\n\004name\030\001 \001(\tB+" + "\340A\002\372A%\n#dialogflow.googleapis.com/Change" - + "log\"\235\002\n\tChangelog\022\014\n\004name\030\001 \001(\t\022\022\n\nuser_" + + "log\"\264\002\n\tChangelog\022\014\n\004name\030\001 \001(\t\022\022\n\nuser_" + "email\030\002 \001(\t\022\024\n\014display_name\030\007 \001(\t\022\016\n\006act" + "ion\030\013 \001(\t\022\014\n\004type\030\010 \001(\t\022\020\n\010resource\030\003 \001(" + "\t\022/\n\013create_time\030\004 \001(\0132\032.google.protobuf" - + ".Timestamp:w\352At\n#dialogflow.googleapis.c" - + "om/Changelog\022Mprojects/{project}/locatio" - + "ns/{location}/agents/{agent}/changelogs/" - + "{changelog}2\207\004\n\nChangelogs\022\307\001\n\016ListChang" - + "elogs\0224.google.cloud.dialogflow.cx.v3.Li" - + "stChangelogsRequest\0325.google.cloud.dialo" - + "gflow.cx.v3.ListChangelogsResponse\"H\332A\006p" - + "arent\202\323\344\223\0029\0227/v3/{parent=projects/*/loca" - + "tions/*/agents/*}/changelogs\022\264\001\n\014GetChan" - + "gelog\0222.google.cloud.dialogflow.cx.v3.Ge" - + "tChangelogRequest\032(.google.cloud.dialogf" - + "low.cx.v3.Changelog\"F\332A\004name\202\323\344\223\0029\0227/v3/" - + "{name=projects/*/locations/*/agents/*/ch" - + "angelogs/*}\032x\312A\031dialogflow.googleapis.co" - + "m\322AYhttps://www.googleapis.com/auth/clou" - + "d-platform,https://www.googleapis.com/au" - + "th/dialogflowB\264\001\n!com.google.cloud.dialo" - + "gflow.cx.v3B\016ChangelogProtoP\001Z1cloud.goo" - + "gle.com/go/dialogflow/cx/apiv3/cxpb;cxpb" - + "\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow.Cx.V3" - + "\352\002!Google::Cloud::Dialogflow::CX::V3b\006pr" - + "oto3" + + ".Timestamp\022\025\n\rlanguage_code\030\016 \001(\t:w\352At\n#" + + "dialogflow.googleapis.com/Changelog\022Mpro" + + "jects/{project}/locations/{location}/age" + + "nts/{agent}/changelogs/{changelog}2\207\004\n\nC" + + "hangelogs\022\307\001\n\016ListChangelogs\0224.google.cl" + + "oud.dialogflow.cx.v3.ListChangelogsReque" + + "st\0325.google.cloud.dialogflow.cx.v3.ListC" + + "hangelogsResponse\"H\332A\006parent\202\323\344\223\0029\0227/v3/" + + "{parent=projects/*/locations/*/agents/*}" + + "/changelogs\022\264\001\n\014GetChangelog\0222.google.cl" + + "oud.dialogflow.cx.v3.GetChangelogRequest" + + "\032(.google.cloud.dialogflow.cx.v3.Changel" + + "og\"F\332A\004name\202\323\344\223\0029\0227/v3/{name=projects/*/" + + "locations/*/agents/*/changelogs/*}\032x\312A\031d" + + "ialogflow.googleapis.com\322AYhttps://www.g" + + "oogleapis.com/auth/cloud-platform,https:" + + "//www.googleapis.com/auth/dialogflowB\264\001\n" + + "!com.google.cloud.dialogflow.cx.v3B\016Chan" + + "gelogProtoP\001Z1cloud.google.com/go/dialog" + + "flow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google" + + ".Cloud.Dialogflow.Cx.V3\352\002!Google::Cloud:" + + ":Dialogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -134,7 +134,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_Changelog_descriptor, new java.lang.String[] { - "Name", "UserEmail", "DisplayName", "Action", "Type", "Resource", "CreateTime", + "Name", + "UserEmail", + "DisplayName", + "Action", + "Type", + "Resource", + "CreateTime", + "LanguageCode", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java index eb42a1d5e8fd..7e2e1699dffc 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/EntityTypeProto.java @@ -40,6 +40,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3_EntityType_ExcludedPhrase_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3_EntityType_ExcludedPhrase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -77,83 +105,133 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ype.proto\022\035google.cloud.dialogflow.cx.v3" + "\032\034google/api/annotations.proto\032\027google/a" + "pi/client.proto\032\037google/api/field_behavi" - + "or.proto\032\031google/api/resource.proto\032\033goo" - + "gle/protobuf/empty.proto\032 google/protobu" - + "f/field_mask.proto\"\232\006\n\nEntityType\022\014\n\004nam" - + "e\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022A\n\004ki" - + "nd\030\003 \001(\0162..google.cloud.dialogflow.cx.v3" - + ".EntityType.KindB\003\340A\002\022X\n\023auto_expansion_" - + "mode\030\004 \001(\0162;.google.cloud.dialogflow.cx." - + "v3.EntityType.AutoExpansionMode\022B\n\010entit" - + "ies\030\005 \003(\01320.google.cloud.dialogflow.cx.v" - + "3.EntityType.Entity\022R\n\020excluded_phrases\030" - + "\006 \003(\01328.google.cloud.dialogflow.cx.v3.En" - + "tityType.ExcludedPhrase\022\037\n\027enable_fuzzy_" - + "extraction\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Enti" - + "ty\022\022\n\005value\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\t" - + "B\003\340A\002\032$\n\016ExcludedPhrase\022\022\n\005value\030\001 \001(\tB\003" - + "\340A\002\"J\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KIN" - + "D_MAP\020\001\022\r\n\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"" - + "Y\n\021AutoExpansionMode\022#\n\037AUTO_EXPANSION_M" - + "ODE_UNSPECIFIED\020\000\022\037\n\033AUTO_EXPANSION_MODE" - + "_DEFAULT\020\001:{\352Ax\n$dialogflow.googleapis.c" - + "om/EntityType\022Pprojects/{project}/locati" - + "ons/{location}/agents/{agent}/entityType" - + "s/{entity_type}\"\224\001\n\026ListEntityTypesReque" + + "or.proto\032\031google/api/resource.proto\032*goo" + + "gle/cloud/dialogflow/cx/v3/inline.proto\032" + + "#google/longrunning/operations.proto\032\033go" + + "ogle/protobuf/empty.proto\032 google/protob" + + "uf/field_mask.proto\"\232\006\n\nEntityType\022\014\n\004na" + + "me\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022A\n\004k" + + "ind\030\003 \001(\0162..google.cloud.dialogflow.cx.v" + + "3.EntityType.KindB\003\340A\002\022X\n\023auto_expansion" + + "_mode\030\004 \001(\0162;.google.cloud.dialogflow.cx" + + ".v3.EntityType.AutoExpansionMode\022B\n\010enti" + + "ties\030\005 \003(\01320.google.cloud.dialogflow.cx." + + "v3.EntityType.Entity\022R\n\020excluded_phrases" + + "\030\006 \003(\01328.google.cloud.dialogflow.cx.v3.E" + + "ntityType.ExcludedPhrase\022\037\n\027enable_fuzzy" + + "_extraction\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Ent" + + "ity\022\022\n\005value\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(" + + "\tB\003\340A\002\032$\n\016ExcludedPhrase\022\022\n\005value\030\001 \001(\tB" + + "\003\340A\002\"J\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KI" + + "ND_MAP\020\001\022\r\n\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003" + + "\"Y\n\021AutoExpansionMode\022#\n\037AUTO_EXPANSION_" + + "MODE_UNSPECIFIED\020\000\022\037\n\033AUTO_EXPANSION_MOD" + + "E_DEFAULT\020\001:{\352Ax\n$dialogflow.googleapis." + + "com/EntityType\022Pprojects/{project}/locat" + + "ions/{location}/agents/{agent}/entityTyp" + + "es/{entity_type}\"\220\003\n\030ExportEntityTypesRe" + + "quest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflo" + + "w.googleapis.com/EntityType\022\031\n\014entity_ty" + + "pes\030\002 \003(\tB\003\340A\002\022\037\n\020entity_types_uri\030\003 \001(\t" + + "B\003\340A\001H\000\022*\n\033entity_types_content_inline\030\004" + + " \001(\010B\003\340A\001H\000\022\\\n\013data_format\030\005 \001(\0162B.googl" + + "e.cloud.dialogflow.cx.v3.ExportEntityTyp" + + "esRequest.DataFormatB\003\340A\001\022\032\n\rlanguage_co" + + "de\030\006 \001(\tB\003\340A\001\"E\n\nDataFormat\022\033\n\027DATA_FORM" + + "AT_UNSPECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKA" + + "GE\020\005B\r\n\013destination\"\242\001\n\031ExportEntityType" + + "sResponse\022\032\n\020entity_types_uri\030\001 \001(\tH\000\022P\n" + + "\024entity_types_content\030\002 \001(\01320.google.clo" + + "ud.dialogflow.cx.v3.InlineDestinationH\000B" + + "\027\n\025exported_entity_types\"\033\n\031ExportEntity" + + "TypesMetadata\"\353\003\n\030ImportEntityTypesReque" + "st\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.g" - + "oogleapis.com/EntityType\022\025\n\rlanguage_cod" - + "e\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token" - + "\030\004 \001(\t\"s\n\027ListEntityTypesResponse\022?\n\014ent" - + "ity_types\030\001 \003(\0132).google.cloud.dialogflo" - + "w.cx.v3.EntityType\022\027\n\017next_page_token\030\002 " - + "\001(\t\"i\n\024GetEntityTypeRequest\022:\n\004name\030\001 \001(" - + "\tB,\340A\002\372A&\n$dialogflow.googleapis.com/Ent" - + "ityType\022\025\n\rlanguage_code\030\002 \001(\t\"\263\001\n\027Creat" - + "eEntityTypeRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372" - + "A&\022$dialogflow.googleapis.com/EntityType" - + "\022C\n\013entity_type\030\002 \001(\0132).google.cloud.dia" - + "logflow.cx.v3.EntityTypeB\003\340A\002\022\025\n\rlanguag" - + "e_code\030\003 \001(\t\"\246\001\n\027UpdateEntityTypeRequest" - + "\022C\n\013entity_type\030\001 \001(\0132).google.cloud.dia" - + "logflow.cx.v3.EntityTypeB\003\340A\002\022\025\n\rlanguag" - + "e_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.goog" - + "le.protobuf.FieldMask\"d\n\027DeleteEntityTyp" - + "eRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogfl" - + "ow.googleapis.com/EntityType\022\r\n\005force\030\002 " - + "\001(\0102\207\t\n\013EntityTypes\022\270\001\n\rGetEntityType\0223." - + "google.cloud.dialogflow.cx.v3.GetEntityT" - + "ypeRequest\032).google.cloud.dialogflow.cx." - + "v3.EntityType\"G\332A\004name\202\323\344\223\002:\0228/v3/{name=" - + "projects/*/locations/*/agents/*/entityTy" - + "pes/*}\022\331\001\n\020CreateEntityType\0226.google.clo" - + "ud.dialogflow.cx.v3.CreateEntityTypeRequ" - + "est\032).google.cloud.dialogflow.cx.v3.Enti" - + "tyType\"b\332A\022parent,entity_type\202\323\344\223\002G\"8/v3" - + "/{parent=projects/*/locations/*/agents/*" - + "}/entityTypes:\013entity_type\022\352\001\n\020UpdateEnt" - + "ityType\0226.google.cloud.dialogflow.cx.v3." - + "UpdateEntityTypeRequest\032).google.cloud.d" - + "ialogflow.cx.v3.EntityType\"s\332A\027entity_ty" - + "pe,update_mask\202\323\344\223\002S2D/v3/{entity_type.n" - + "ame=projects/*/locations/*/agents/*/enti" - + "tyTypes/*}:\013entity_type\022\253\001\n\020DeleteEntity" - + "Type\0226.google.cloud.dialogflow.cx.v3.Del" - + "eteEntityTypeRequest\032\026.google.protobuf.E" - + "mpty\"G\332A\004name\202\323\344\223\002:*8/v3/{name=projects/" - + "*/locations/*/agents/*/entityTypes/*}\022\313\001" - + "\n\017ListEntityTypes\0225.google.cloud.dialogf" - + "low.cx.v3.ListEntityTypesRequest\0326.googl" + + "oogleapis.com/EntityType\022\032\n\020entity_types" + + "_uri\030\002 \001(\tH\000\022K\n\024entity_types_content\030\003 \001" + + "(\0132+.google.cloud.dialogflow.cx.v3.Inlin" + + "eSourceH\000\022^\n\014merge_option\030\004 \001(\0162C.google" + + ".cloud.dialogflow.cx.v3.ImportEntityType" + + "sRequest.MergeOptionB\003\340A\002\022H\n\022target_enti" + + "ty_type\030\005 \001(\tB,\340A\001\372A&\n$dialogflow.google" + + "apis.com/EntityType\"n\n\013MergeOption\022\034\n\030ME" + + "RGE_OPTION_UNSPECIFIED\020\000\022\013\n\007REPLACE\020\001\022\t\n" + + "\005MERGE\020\002\022\n\n\006RENAME\020\003\022\023\n\017REPORT_CONFLICT\020" + + "\004\022\010\n\004KEEP\020\005B\016\n\014entity_types\"\243\002\n\031ImportEn" + + "tityTypesResponse\022?\n\014entity_types\030\001 \003(\tB" + + ")\372A&\n$dialogflow.googleapis.com/EntityTy" + + "pe\022l\n\025conflicting_resources\030\002 \001(\0132M.goog" + + "le.cloud.dialogflow.cx.v3.ImportEntityTy" + + "pesResponse.ConflictingResources\032W\n\024Conf" + + "lictingResources\022!\n\031entity_type_display_" + + "names\030\001 \003(\t\022\034\n\024entity_display_names\030\002 \003(" + + "\t\"\033\n\031ImportEntityTypesMetadata\"\224\001\n\026ListE" + + "ntityTypesRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A" + + "&\022$dialogflow.googleapis.com/EntityType\022" + + "\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(" + + "\005\022\022\n\npage_token\030\004 \001(\t\"s\n\027ListEntityTypes" + + "Response\022?\n\014entity_types\030\001 \003(\0132).google." + + "cloud.dialogflow.cx.v3.EntityType\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"i\n\024GetEntityTypeReque" + + "st\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dialogflow.goo" + + "gleapis.com/EntityType\022\025\n\rlanguage_code\030" + + "\002 \001(\t\"\263\001\n\027CreateEntityTypeRequest\022<\n\006par" + + "ent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapis" + + ".com/EntityType\022C\n\013entity_type\030\002 \001(\0132).g" + + "oogle.cloud.dialogflow.cx.v3.EntityTypeB" + + "\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"\246\001\n\027UpdateEn" + + "tityTypeRequest\022C\n\013entity_type\030\001 \001(\0132).g" + + "oogle.cloud.dialogflow.cx.v3.EntityTypeB" + + "\003\340A\002\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013update_ma" + + "sk\030\003 \001(\0132\032.google.protobuf.FieldMask\"d\n\027" + + "DeleteEntityTypeRequest\022:\n\004name\030\001 \001(\tB,\340" + + "A\002\372A&\n$dialogflow.googleapis.com/EntityT" + + "ype\022\r\n\005force\030\002 \001(\0102\357\014\n\013EntityTypes\022\270\001\n\rG" + + "etEntityType\0223.google.cloud.dialogflow.c" + + "x.v3.GetEntityTypeRequest\032).google.cloud" + + ".dialogflow.cx.v3.EntityType\"G\332A\004name\202\323\344" + + "\223\002:\0228/v3/{name=projects/*/locations/*/ag" + + "ents/*/entityTypes/*}\022\331\001\n\020CreateEntityTy" + + "pe\0226.google.cloud.dialogflow.cx.v3.Creat" + + "eEntityTypeRequest\032).google.cloud.dialog" + + "flow.cx.v3.EntityType\"b\332A\022parent,entity_" + + "type\202\323\344\223\002G\"8/v3/{parent=projects/*/locat" + + "ions/*/agents/*}/entityTypes:\013entity_typ" + + "e\022\352\001\n\020UpdateEntityType\0226.google.cloud.di" + + "alogflow.cx.v3.UpdateEntityTypeRequest\032)" + + ".google.cloud.dialogflow.cx.v3.EntityTyp" + + "e\"s\332A\027entity_type,update_mask\202\323\344\223\002S2D/v3" + + "/{entity_type.name=projects/*/locations/" + + "*/agents/*/entityTypes/*}:\013entity_type\022\253" + + "\001\n\020DeleteEntityType\0226.google.cloud.dialo" + + "gflow.cx.v3.DeleteEntityTypeRequest\032\026.go" + + "ogle.protobuf.Empty\"G\332A\004name\202\323\344\223\002:*8/v3/" + + "{name=projects/*/locations/*/agents/*/en" + + "tityTypes/*}\022\313\001\n\017ListEntityTypes\0225.googl" + "e.cloud.dialogflow.cx.v3.ListEntityTypes" - + "Response\"I\332A\006parent\202\323\344\223\002:\0228/v3/{parent=p" - + "rojects/*/locations/*/agents/*}/entityTy" - + "pes\032x\312A\031dialogflow.googleapis.com\322AYhttp" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rm,https://www.googleapis.com/auth/dialo" - + "gflowB\265\001\n!com.google.cloud.dialogflow.cx" - + ".v3B\017EntityTypeProtoP\001Z1cloud.google.com" - + "/go/dialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002D" - + "F\252\002\035Google.Cloud.Dialogflow.Cx.V3\352\002!Goog" - + "le::Cloud::Dialogflow::CX::V3b\006proto3" + + "Request\0326.google.cloud.dialogflow.cx.v3." + + "ListEntityTypesResponse\"I\332A\006parent\202\323\344\223\002:" + + "\0228/v3/{parent=projects/*/locations/*/age" + + "nts/*}/entityTypes\022\361\001\n\021ExportEntityTypes" + + "\0227.google.cloud.dialogflow.cx.v3.ExportE" + + "ntityTypesRequest\032\035.google.longrunning.O" + + "peration\"\203\001\312A6\n\031ExportEntityTypesRespons" + + "e\022\031ExportEntityTypesMetadata\202\323\344\223\002D\"?/v3/" + + "{parent=projects/*/locations/*/agents/*}" + + "/entityTypes:export:\001*\022\361\001\n\021ImportEntityT" + + "ypes\0227.google.cloud.dialogflow.cx.v3.Imp" + + "ortEntityTypesRequest\032\035.google.longrunni" + + "ng.Operation\"\203\001\312A6\n\031ImportEntityTypesRes" + + "ponse\022\031ImportEntityTypesMetadata\202\323\344\223\002D\"?" + + "/v3/{parent=projects/*/locations/*/agent" + + "s/*}/entityTypes:import:\001*\032x\312A\031dialogflo" + + "w.googleapis.com\322AYhttps://www.googleapi" + + "s.com/auth/cloud-platform,https://www.go" + + "ogleapis.com/auth/dialogflowB\265\001\n!com.goo" + + "gle.cloud.dialogflow.cx.v3B\017EntityTypePr" + + "otoP\001Z1cloud.google.com/go/dialogflow/cx" + + "/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud." + + "Dialogflow.Cx.V3\352\002!Google::Cloud::Dialog" + + "flow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -163,6 +241,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.InlineProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), }); @@ -197,8 +277,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Value", }); - internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesRequest_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor, + new java.lang.String[] { + "Parent", + "EntityTypes", + "EntityTypesUri", + "EntityTypesContentInline", + "DataFormat", + "LanguageCode", + "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor, + new java.lang.String[] { + "EntityTypesUri", "EntityTypesContent", "ExportedEntityTypes", + }); + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor, + new java.lang.String[] { + "Parent", + "EntityTypesUri", + "EntityTypesContent", + "MergeOption", + "TargetEntityType", + "EntityTypes", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor, + new java.lang.String[] { + "EntityTypes", "ConflictingResources", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor = + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor, + new java.lang.String[] { + "EntityTypeDisplayNames", "EntityDisplayNames", + }); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesRequest_descriptor, @@ -206,7 +351,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LanguageCode", "PageSize", "PageToken", }); internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_ListEntityTypesResponse_descriptor, @@ -214,7 +359,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityTypes", "NextPageToken", }); internal_static_google_cloud_dialogflow_cx_v3_GetEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_cx_v3_GetEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_GetEntityTypeRequest_descriptor, @@ -222,7 +367,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3_CreateEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_dialogflow_cx_v3_CreateEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_CreateEntityTypeRequest_descriptor, @@ -230,7 +375,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "EntityType", "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3_UpdateEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_dialogflow_cx_v3_UpdateEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_UpdateEntityTypeRequest_descriptor, @@ -238,7 +383,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityType", "LanguageCode", "UpdateMask", }); internal_static_google_cloud_dialogflow_cx_v3_DeleteEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_dialogflow_cx_v3_DeleteEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_DeleteEntityTypeRequest_descriptor, @@ -254,12 +399,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.InlineProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadata.java new file mode 100644 index 000000000000..bb97acdae730 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadata.java @@ -0,0 +1,437 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} + */ +public final class ExportEntityTypesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) + ExportEntityTypesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesMetadata.newBuilder() to construct. + private ExportEntityTypesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata other = + (com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata build() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata result = + new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) + private static final com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadataOrBuilder.java new file mode 100644 index 000000000000..a0761cbc41eb --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportEntityTypesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequest.java new file mode 100644 index 000000000000..ac33527d7e93 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequest.java @@ -0,0 +1,2090 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} + */ +public final class ExportEntityTypesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + ExportEntityTypesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesRequest.newBuilder() to construct. + private ExportEntityTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesRequest() { + parent_ = ""; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported entity types.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * EntityTypes will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * EntityTypes will be exported in JSON Package format.
+     * 
+ * + * JSON_PACKAGE = 5; + */ + JSON_PACKAGE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * EntityTypes will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * EntityTypes will be exported in JSON Package format.
+     * 
+ * + * JSON_PACKAGE = 5; + */ + public static final int JSON_PACKAGE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 5: + return JSON_PACKAGE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat) + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(3), + ENTITY_TYPES_CONTENT_INLINE(4), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 3: + return ENTITY_TYPES_URI; + case 4: + return ENTITY_TYPES_CONTENT_INLINE; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + return entityTypes_; + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_INLINE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + @java.lang.Override + public boolean getEntityTypesContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 5; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat.UNRECOGNIZED + : result; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < entityTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityTypes_.getRaw(i)); + } + if (destinationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destination_); + } + if (destinationCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, dataFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < entityTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypesList().size(); + } + if (destinationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destination_); + } + if (destinationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, dataFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest other = + (com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntityTypesList().equals(other.getEntityTypesList())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 3: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 4: + if (getEntityTypesContentInline() != other.getEntityTypesContentInline()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getEntityTypesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesList().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (destinationCase_) { + case 3: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 4: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_INLINE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEntityTypesContentInline()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + languageCode_ = ""; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest build() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest result = + new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityTypes_.makeImmutable(); + result.entityTypes_ = entityTypes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataFormat_ = dataFormat_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.languageCode_ = languageCode_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.entityTypes_.isEmpty()) { + if (entityTypes_.isEmpty()) { + entityTypes_ = other.entityTypes_; + bitField0_ |= 0x00000002; + } else { + ensureEntityTypesIsMutable(); + entityTypes_.addAll(other.entityTypes_); + } + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getDestinationCase()) { + case ENTITY_TYPES_URI: + { + destinationCase_ = 3; + destination_ = other.destination_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT_INLINE: + { + setEntityTypesContentInline(other.getEntityTypesContentInline()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypesIsMutable(); + entityTypes_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 3; + destination_ = s; + break; + } // case 26 + case 32: + { + destination_ = input.readBool(); + destinationCase_ = 4; + break; + } // case 32 + case 40: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypesIsMutable() { + if (!entityTypes_.isModifiable()) { + entityTypes_ = new com.google.protobuf.LazyStringArrayList(entityTypes_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + entityTypes_.makeImmutable(); + return entityTypes_; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The entityTypes to set. + * @return This builder for chaining. + */ + public Builder setEntityTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypes(java.lang.Iterable values) { + ensureEntityTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypes() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + public boolean hasEntityTypesContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + public boolean getEntityTypesContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entityTypesContentInline to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesContentInline(boolean value) { + + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesContentInline() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000010); + dataFormat_ = 0; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequestOrBuilder.java new file mode 100644 index 000000000000..13c41c2920a8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesRequestOrBuilder.java @@ -0,0 +1,287 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportEntityTypesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + java.util.List getEntityTypesList(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + int getEntityTypesCount(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + java.lang.String getEntityTypes(int index); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + com.google.protobuf.ByteString getEntityTypesBytes(int index); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + boolean hasEntityTypesContentInline(); + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + boolean getEntityTypesContentInline(); + + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DataFormat getDataFormat(); + + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest.DestinationCase getDestinationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponse.java new file mode 100644 index 000000000000..46bd5639f4d5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponse.java @@ -0,0 +1,1106 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} + */ +public final class ExportEntityTypesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + ExportEntityTypesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesResponse.newBuilder() to construct. + private ExportEntityTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.Builder.class); + } + + private int exportedEntityTypesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object exportedEntityTypes_; + + public enum ExportedEntityTypesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(1), + ENTITY_TYPES_CONTENT(2), + EXPORTEDENTITYTYPES_NOT_SET(0); + private final int value; + + private ExportedEntityTypesCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExportedEntityTypesCase valueOf(int value) { + return forNumber(value); + } + + public static ExportedEntityTypesCase forNumber(int value) { + switch (value) { + case 1: + return ENTITY_TYPES_URI; + case 2: + return ENTITY_TYPES_CONTENT; + case 0: + return EXPORTEDENTITYTYPES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExportedEntityTypesCase getExportedEntityTypesCase() { + return ExportedEntityTypesCase.forNumber(exportedEntityTypesCase_); + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return exportedEntityTypesCase_ == 1; + } + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = s; + } + return s; + } + } + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return exportedEntityTypesCase_ == 2; + } + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineDestination getEntityTypesContent() { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder + getEntityTypesContentOrBuilder() { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (exportedEntityTypesCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, exportedEntityTypes_); + } + if (exportedEntityTypesCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exportedEntityTypesCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, exportedEntityTypes_); + } + if (exportedEntityTypesCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse other = + (com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) obj; + + if (!getExportedEntityTypesCase().equals(other.getExportedEntityTypesCase())) return false; + switch (exportedEntityTypesCase_) { + case 1: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 2: + if (!getEntityTypesContent().equals(other.getEntityTypesContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (exportedEntityTypesCase_) { + case 1: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 2: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entityTypesContentBuilder_ != null) { + entityTypesContentBuilder_.clear(); + } + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse build() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse result = + new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse result) { + result.exportedEntityTypesCase_ = exportedEntityTypesCase_; + result.exportedEntityTypes_ = this.exportedEntityTypes_; + if (exportedEntityTypesCase_ == 2 && entityTypesContentBuilder_ != null) { + result.exportedEntityTypes_ = entityTypesContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.getDefaultInstance()) + return this; + switch (other.getExportedEntityTypesCase()) { + case ENTITY_TYPES_URI: + { + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = other.exportedEntityTypes_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT: + { + mergeEntityTypesContent(other.getEntityTypesContent()); + break; + } + case EXPORTEDENTITYTYPES_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + getEntityTypesContentFieldBuilder().getBuilder(), extensionRegistry); + exportedEntityTypesCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int exportedEntityTypesCase_ = 0; + private java.lang.Object exportedEntityTypes_; + + public ExportedEntityTypesCase getExportedEntityTypesCase() { + return ExportedEntityTypesCase.forNumber(exportedEntityTypesCase_); + } + + public Builder clearExportedEntityTypes() { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return exportedEntityTypesCase_ == 1; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineDestination, + com.google.cloud.dialogflow.cx.v3.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder> + entityTypesContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return exportedEntityTypesCase_ == 2; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineDestination getEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } else { + if (exportedEntityTypesCase_ == 2) { + return entityTypesContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3.InlineDestination value) { + if (entityTypesContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exportedEntityTypes_ = value; + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(value); + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3.InlineDestination.Builder builderForValue) { + if (entityTypesContentBuilder_ == null) { + exportedEntityTypes_ = builderForValue.build(); + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(builderForValue.build()); + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + public Builder mergeEntityTypesContent( + com.google.cloud.dialogflow.cx.v3.InlineDestination value) { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2 + && exportedEntityTypes_ + != com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance()) { + exportedEntityTypes_ = + com.google.cloud.dialogflow.cx.v3.InlineDestination.newBuilder( + (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_) + .mergeFrom(value) + .buildPartial(); + } else { + exportedEntityTypes_ = value; + } + onChanged(); + } else { + if (exportedEntityTypesCase_ == 2) { + entityTypesContentBuilder_.mergeFrom(value); + } else { + entityTypesContentBuilder_.setMessage(value); + } + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + public Builder clearEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + } + } else { + if (exportedEntityTypesCase_ == 2) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + } + entityTypesContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + public com.google.cloud.dialogflow.cx.v3.InlineDestination.Builder + getEntityTypesContentBuilder() { + return getEntityTypesContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder + getEntityTypesContentOrBuilder() { + if ((exportedEntityTypesCase_ == 2) && (entityTypesContentBuilder_ != null)) { + return entityTypesContentBuilder_.getMessageOrBuilder(); + } else { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineDestination, + com.google.cloud.dialogflow.cx.v3.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder> + getEntityTypesContentFieldBuilder() { + if (entityTypesContentBuilder_ == null) { + if (!(exportedEntityTypesCase_ == 2)) { + exportedEntityTypes_ = + com.google.cloud.dialogflow.cx.v3.InlineDestination.getDefaultInstance(); + } + entityTypesContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineDestination, + com.google.cloud.dialogflow.cx.v3.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.InlineDestination) exportedEntityTypes_, + getParentForChildren(), + isClean()); + exportedEntityTypes_ = null; + } + exportedEntityTypesCase_ = 2; + onChanged(); + return entityTypesContentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponseOrBuilder.java new file mode 100644 index 000000000000..33843e270203 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ExportEntityTypesResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ExportEntityTypesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + boolean hasEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + com.google.cloud.dialogflow.cx.v3.InlineDestination getEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineDestination entity_types_content = 2; + */ + com.google.cloud.dialogflow.cx.v3.InlineDestinationOrBuilder getEntityTypesContentOrBuilder(); + + com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse.ExportedEntityTypesCase + getExportedEntityTypesCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java index ec61952ccd88..3e505f9452c8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettings.java @@ -2600,6 +2600,20 @@ public interface KnowledgeConnectorSettingsOrBuilder * @return The bytes for agentScope. */ com.google.protobuf.ByteString getAgentScopeBytes(); + + /** + * + * + *
+     * Whether to disable fallback to Data Store search results (in case the LLM
+     * couldn't pick a proper answer). Per default the feature is enabled.
+     * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + boolean getDisableDataStoreFallback(); } /** * @@ -2918,6 +2932,25 @@ public com.google.protobuf.ByteString getAgentScopeBytes() { } } + public static final int DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER = 8; + private boolean disableDataStoreFallback_ = false; + /** + * + * + *
+     * Whether to disable fallback to Data Store search results (in case the LLM
+     * couldn't pick a proper answer). Per default the feature is enabled.
+     * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + @java.lang.Override + public boolean getDisableDataStoreFallback() { + return disableDataStoreFallback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2947,6 +2980,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_); } + if (disableDataStoreFallback_ != false) { + output.writeBool(8, disableDataStoreFallback_); + } getUnknownFields().writeTo(output); } @@ -2971,6 +3007,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_); } + if (disableDataStoreFallback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, disableDataStoreFallback_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2994,6 +3033,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAgentIdentity().equals(other.getAgentIdentity())) return false; if (!getBusinessDescription().equals(other.getBusinessDescription())) return false; if (!getAgentScope().equals(other.getAgentScope())) return false; + if (getDisableDataStoreFallback() != other.getDisableDataStoreFallback()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3015,6 +3055,8 @@ public int hashCode() { hash = (53 * hash) + getBusinessDescription().hashCode(); hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER; hash = (53 * hash) + getAgentScope().hashCode(); + hash = (37 * hash) + DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDataStoreFallback()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3175,6 +3217,7 @@ public Builder clear() { agentIdentity_ = ""; businessDescription_ = ""; agentScope_ = ""; + disableDataStoreFallback_ = false; return this; } @@ -3233,6 +3276,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000010) != 0)) { result.agentScope_ = agentScope_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.disableDataStoreFallback_ = disableDataStoreFallback_; + } } @java.lang.Override @@ -3314,6 +3360,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; onChanged(); } + if (other.getDisableDataStoreFallback() != false) { + setDisableDataStoreFallback(other.getDisableDataStoreFallback()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3370,6 +3419,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 42 + case 64: + { + disableDataStoreFallback_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3939,6 +3994,62 @@ public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) { return this; } + private boolean disableDataStoreFallback_; + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + @java.lang.Override + public boolean getDisableDataStoreFallback() { + return disableDataStoreFallback_; + } + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @param value The disableDataStoreFallback to set. + * @return This builder for chaining. + */ + public Builder setDisableDataStoreFallback(boolean value) { + + disableDataStoreFallback_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisableDataStoreFallback() { + bitField0_ = (bitField0_ & ~0x00000020); + disableDataStoreFallback_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java index 83f9197fe832..53c0f3320531 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/GenerativeSettingsProto.java @@ -57,7 +57,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ve_settings.proto\022\035google.cloud.dialogfl" + "ow.cx.v3\032\031google/api/resource.proto\0323goo" + "gle/cloud/dialogflow/cx/v3/safety_settin" - + "gs.proto\"\326\006\n\022GenerativeSettings\022\014\n\004name\030" + + "gs.proto\"\373\006\n\022GenerativeSettings\022\014\n\004name\030" + "\005 \001(\t\022]\n\021fallback_settings\030\001 \001(\0132B.googl" + "e.cloud.dialogflow.cx.v3.GenerativeSetti" + "ngs.FallbackSettings\022Q\n\032generative_safet" @@ -71,19 +71,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gle.cloud.dialogflow.cx.v3.GenerativeSet" + "tings.FallbackSettings.PromptTemplate\032K\n" + "\016PromptTemplate\022\024\n\014display_name\030\001 \001(\t\022\023\n" - + "\013prompt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\210\001\n\032K" + + "\013prompt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\255\001\n\032K" + "nowledgeConnectorSettings\022\020\n\010business\030\001 " + "\001(\t\022\r\n\005agent\030\002 \001(\t\022\026\n\016agent_identity\030\003 \001" + "(\t\022\034\n\024business_description\030\004 \001(\t\022\023\n\013agen" - + "t_scope\030\005 \001(\t:\201\001\352A~\n1dialogflow.googleap" - + "is.com/AgentGenerativeSettings\022Iprojects" - + "/{project}/locations/{location}/agents/{" - + "agent}/generativeSettingsB\275\001\n!com.google" - + ".cloud.dialogflow.cx.v3B\027GenerativeSetti" - + "ngsProtoP\001Z1cloud.google.com/go/dialogfl" - + "ow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.C" - + "loud.Dialogflow.Cx.V3\352\002!Google::Cloud::D" - + "ialogflow::CX::V3b\006proto3" + + "t_scope\030\005 \001(\t\022#\n\033disable_data_store_fall" + + "back\030\010 \001(\010:\201\001\352A~\n1dialogflow.googleapis." + + "com/AgentGenerativeSettings\022Iprojects/{p" + + "roject}/locations/{location}/agents/{age" + + "nt}/generativeSettingsB\275\001\n!com.google.cl" + + "oud.dialogflow.cx.v3B\027GenerativeSettings" + + "ProtoP\001Z1cloud.google.com/go/dialogflow/" + + "cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Clou" + + "d.Dialogflow.Cx.V3\352\002!Google::Cloud::Dial" + + "ogflow::CX::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -132,7 +133,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor, new java.lang.String[] { - "Business", "Agent", "AgentIdentity", "BusinessDescription", "AgentScope", + "Business", + "Agent", + "AgentIdentity", + "BusinessDescription", + "AgentScope", + "DisableDataStoreFallback", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadata.java new file mode 100644 index 000000000000..90e5c39e2be8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadata.java @@ -0,0 +1,437 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * Metadata returned for the
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} + */ +public final class ImportEntityTypesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) + ImportEntityTypesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesMetadata.newBuilder() to construct. + private ImportEntityTypesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata other = + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata build() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata result = + new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) + private static final com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadataOrBuilder.java new file mode 100644 index 000000000000..e5148c4ee271 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportEntityTypesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequest.java new file mode 100644 index 000000000000..699ce80dd5d4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequest.java @@ -0,0 +1,1989 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The request message for
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} + */ +public final class ImportEntityTypesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + ImportEntityTypesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesRequest.newBuilder() to construct. + private ImportEntityTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesRequest() { + parent_ = ""; + mergeOption_ = 0; + targetEntityType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.Builder.class); + } + + /** + * + * + *
+   * Merge option when display name conflicts exist during import.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption} + */ + public enum MergeOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. If used, system uses REPORT_CONFLICT as default.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + MERGE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Replace the original entity type in the agent with the new entity type
+     * when display name conflicts exist.
+     * 
+ * + * REPLACE = 1; + */ + REPLACE(1), + /** + * + * + *
+     * Merge the original entity type with the new entity type when display name
+     * conflicts exist.
+     * 
+ * + * MERGE = 2; + */ + MERGE(2), + /** + * + * + *
+     * Create new entity types with new display names to differentiate them from
+     * the existing entity types when display name conflicts exist.
+     * 
+ * + * RENAME = 3; + */ + RENAME(3), + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import entity types.
+     * 
+ * + * REPORT_CONFLICT = 4; + */ + REPORT_CONFLICT(4), + /** + * + * + *
+     * Keep the original entity type and discard the conflicting new entity type
+     * when display name conflicts exist.
+     * 
+ * + * KEEP = 5; + */ + KEEP(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. If used, system uses REPORT_CONFLICT as default.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + public static final int MERGE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Replace the original entity type in the agent with the new entity type
+     * when display name conflicts exist.
+     * 
+ * + * REPLACE = 1; + */ + public static final int REPLACE_VALUE = 1; + /** + * + * + *
+     * Merge the original entity type with the new entity type when display name
+     * conflicts exist.
+     * 
+ * + * MERGE = 2; + */ + public static final int MERGE_VALUE = 2; + /** + * + * + *
+     * Create new entity types with new display names to differentiate them from
+     * the existing entity types when display name conflicts exist.
+     * 
+ * + * RENAME = 3; + */ + public static final int RENAME_VALUE = 3; + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import entity types.
+     * 
+ * + * REPORT_CONFLICT = 4; + */ + public static final int REPORT_CONFLICT_VALUE = 4; + /** + * + * + *
+     * Keep the original entity type and discard the conflicting new entity type
+     * when display name conflicts exist.
+     * 
+ * + * KEEP = 5; + */ + public static final int KEEP_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MergeOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MergeOption forNumber(int value) { + switch (value) { + case 0: + return MERGE_OPTION_UNSPECIFIED; + case 1: + return REPLACE; + case 2: + return MERGE; + case 3: + return RENAME; + case 4: + return REPORT_CONFLICT; + case 5: + return KEEP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MergeOption findValueByNumber(int number) { + return MergeOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MergeOption[] VALUES = values(); + + public static MergeOption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MergeOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption) + } + + private int entityTypesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object entityTypes_; + + public enum EntityTypesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(2), + ENTITY_TYPES_CONTENT(3), + ENTITYTYPES_NOT_SET(0); + private final int value; + + private EntityTypesCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EntityTypesCase valueOf(int value) { + return forNumber(value); + } + + public static EntityTypesCase forNumber(int value) { + switch (value) { + case 2: + return ENTITY_TYPES_URI; + case 3: + return ENTITY_TYPES_CONTENT; + case 0: + return ENTITYTYPES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EntityTypesCase getEntityTypesCase() { + return EntityTypesCase.forNumber(entityTypesCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 2; + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return entityTypesCase_ == 2; + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypesCase_ == 2) { + entityTypes_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entityTypesCase_ == 2) { + entityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return entityTypesCase_ == 3; + } + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSource getEntityTypesContent() { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder getEntityTypesContentOrBuilder() { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } + + public static final int MERGE_OPTION_FIELD_NUMBER = 4; + private int mergeOption_ = 0; + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption getMergeOption() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption.UNRECOGNIZED + : result; + } + + public static final int TARGET_ENTITY_TYPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetEntityType_ = ""; + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + @java.lang.Override + public java.lang.String getTargetEntityType() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetEntityType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetEntityTypeBytes() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetEntityType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entityTypesCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityTypes_); + } + if (entityTypesCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, mergeOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetEntityType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetEntityType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entityTypesCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityTypes_); + } + if (entityTypesCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mergeOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetEntityType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetEntityType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest other = + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (mergeOption_ != other.mergeOption_) return false; + if (!getTargetEntityType().equals(other.getTargetEntityType())) return false; + if (!getEntityTypesCase().equals(other.getEntityTypesCase())) return false; + switch (entityTypesCase_) { + case 2: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 3: + if (!getEntityTypesContent().equals(other.getEntityTypesContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + MERGE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + mergeOption_; + hash = (37 * hash) + TARGET_ENTITY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetEntityType().hashCode(); + switch (entityTypesCase_) { + case 2: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 3: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (entityTypesContentBuilder_ != null) { + entityTypesContentBuilder_.clear(); + } + mergeOption_ = 0; + targetEntityType_ = ""; + entityTypesCase_ = 0; + entityTypes_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest build() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest result = + new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergeOption_ = mergeOption_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.targetEntityType_ = targetEntityType_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest result) { + result.entityTypesCase_ = entityTypesCase_; + result.entityTypes_ = this.entityTypes_; + if (entityTypesCase_ == 3 && entityTypesContentBuilder_ != null) { + result.entityTypes_ = entityTypesContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.mergeOption_ != 0) { + setMergeOptionValue(other.getMergeOptionValue()); + } + if (!other.getTargetEntityType().isEmpty()) { + targetEntityType_ = other.targetEntityType_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getEntityTypesCase()) { + case ENTITY_TYPES_URI: + { + entityTypesCase_ = 2; + entityTypes_ = other.entityTypes_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT: + { + mergeEntityTypesContent(other.getEntityTypesContent()); + break; + } + case ENTITYTYPES_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + entityTypesCase_ = 2; + entityTypes_ = s; + break; + } // case 18 + case 26: + { + input.readMessage( + getEntityTypesContentFieldBuilder().getBuilder(), extensionRegistry); + entityTypesCase_ = 3; + break; + } // case 26 + case 32: + { + mergeOption_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + targetEntityType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int entityTypesCase_ = 0; + private java.lang.Object entityTypes_; + + public EntityTypesCase getEntityTypesCase() { + return EntityTypesCase.forNumber(entityTypesCase_); + } + + public Builder clearEntityTypes() { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return entityTypesCase_ == 2; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypesCase_ == 2) { + entityTypes_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entityTypesCase_ == 2) { + entityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + entityTypesCase_ = 2; + entityTypes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (entityTypesCase_ == 2) { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + entityTypesCase_ = 2; + entityTypes_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSource, + com.google.cloud.dialogflow.cx.v3.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder> + entityTypesContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return entityTypesCase_ == 3; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSource getEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } else { + if (entityTypesCase_ == 3) { + return entityTypesContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + public Builder setEntityTypesContent(com.google.cloud.dialogflow.cx.v3.InlineSource value) { + if (entityTypesContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityTypes_ = value; + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(value); + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3.InlineSource.Builder builderForValue) { + if (entityTypesContentBuilder_ == null) { + entityTypes_ = builderForValue.build(); + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(builderForValue.build()); + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + public Builder mergeEntityTypesContent(com.google.cloud.dialogflow.cx.v3.InlineSource value) { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3 + && entityTypes_ + != com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance()) { + entityTypes_ = + com.google.cloud.dialogflow.cx.v3.InlineSource.newBuilder( + (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_) + .mergeFrom(value) + .buildPartial(); + } else { + entityTypes_ = value; + } + onChanged(); + } else { + if (entityTypesCase_ == 3) { + entityTypesContentBuilder_.mergeFrom(value); + } else { + entityTypesContentBuilder_.setMessage(value); + } + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + public Builder clearEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3) { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + } + } else { + if (entityTypesCase_ == 3) { + entityTypesCase_ = 0; + entityTypes_ = null; + } + entityTypesContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + public com.google.cloud.dialogflow.cx.v3.InlineSource.Builder getEntityTypesContentBuilder() { + return getEntityTypesContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder + getEntityTypesContentOrBuilder() { + if ((entityTypesCase_ == 3) && (entityTypesContentBuilder_ != null)) { + return entityTypesContentBuilder_.getMessageOrBuilder(); + } else { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSource, + com.google.cloud.dialogflow.cx.v3.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder> + getEntityTypesContentFieldBuilder() { + if (entityTypesContentBuilder_ == null) { + if (!(entityTypesCase_ == 3)) { + entityTypes_ = com.google.cloud.dialogflow.cx.v3.InlineSource.getDefaultInstance(); + } + entityTypesContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.InlineSource, + com.google.cloud.dialogflow.cx.v3.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3.InlineSource) entityTypes_, + getParentForChildren(), + isClean()); + entityTypes_ = null; + } + entityTypesCase_ = 3; + onChanged(); + return entityTypesContentBuilder_; + } + + private int mergeOption_ = 0; + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOptionValue(int value) { + mergeOption_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption getMergeOption() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOption( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + mergeOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMergeOption() { + bitField0_ = (bitField0_ & ~0x00000008); + mergeOption_ = 0; + onChanged(); + return this; + } + + private java.lang.Object targetEntityType_ = ""; + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + public java.lang.String getTargetEntityType() { + java.lang.Object ref = targetEntityType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetEntityType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + public com.google.protobuf.ByteString getTargetEntityTypeBytes() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetEntityType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The targetEntityType to set. + * @return This builder for chaining. + */ + public Builder setTargetEntityType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetEntityType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTargetEntityType() { + targetEntityType_ = getDefaultInstance().getTargetEntityType(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for targetEntityType to set. + * @return This builder for chaining. + */ + public Builder setTargetEntityTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetEntityType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + private static final com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequestOrBuilder.java new file mode 100644 index 000000000000..e913fee73cd7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesRequestOrBuilder.java @@ -0,0 +1,227 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportEntityTypesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + boolean hasEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + com.google.cloud.dialogflow.cx.v3.InlineSource getEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.InlineSource entity_types_content = 3; + */ + com.google.cloud.dialogflow.cx.v3.InlineSourceOrBuilder getEntityTypesContentOrBuilder(); + + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + int getMergeOptionValue(); + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.MergeOption getMergeOption(); + + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + java.lang.String getTargetEntityType(); + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + com.google.protobuf.ByteString getTargetEntityTypeBytes(); + + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.EntityTypesCase getEntityTypesCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponse.java new file mode 100644 index 000000000000..d9b7b6386f0b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponse.java @@ -0,0 +1,2237 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +/** + * + * + *
+ * The response message for
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} + */ +public final class ImportEntityTypesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) + ImportEntityTypesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesResponse.newBuilder() to construct. + private ImportEntityTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesResponse() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.Builder.class); + } + + public interface ConflictingResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + java.util.List getEntityTypeDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + int getEntityTypeDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + java.lang.String getEntityTypeDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index); + + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + java.util.List getEntityDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + int getEntityDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + java.lang.String getEntityDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index); + } + /** + * + * + *
+   * Conflicting resources detected during the import process. Only filled when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the
+   * request and there are conflicts in the display names.
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} + */ + public static final class ConflictingResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + ConflictingResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConflictingResources.newBuilder() to construct. + private ConflictingResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConflictingResources() { + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConflictingResources(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .Builder.class); + } + + public static final int ENTITY_TYPE_DISPLAY_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypeDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityTypeDisplayNamesList() { + return entityTypeDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + public int getEntityTypeDisplayNamesCount() { + return entityTypeDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + public java.lang.String getEntityTypeDisplayNames(int index) { + return entityTypeDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index) { + return entityTypeDisplayNames_.getByteString(index); + } + + public static final int ENTITY_DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + return entityDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entityTypeDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, entityTypeDisplayNames_.getRaw(i)); + } + for (int i = 0; i < entityDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, entityDisplayNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < entityTypeDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypeDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypeDisplayNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < entityDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(entityDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityDisplayNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources other = + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) obj; + + if (!getEntityTypeDisplayNamesList().equals(other.getEntityTypeDisplayNamesList())) + return false; + if (!getEntityDisplayNamesList().equals(other.getEntityDisplayNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntityTypeDisplayNamesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPE_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypeDisplayNamesList().hashCode(); + } + if (getEntityDisplayNamesCount() > 0) { + hash = (37 * hash) + ENTITY_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEntityDisplayNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Conflicting resources detected during the import process. Only filled when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the
+     * request and there are conflicts in the display names.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + build() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources result = + new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + entityTypeDisplayNames_.makeImmutable(); + result.entityTypeDisplayNames_ = entityTypeDisplayNames_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityDisplayNames_.makeImmutable(); + result.entityDisplayNames_ = entityDisplayNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources other) { + if (other + == com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance()) return this; + if (!other.entityTypeDisplayNames_.isEmpty()) { + if (entityTypeDisplayNames_.isEmpty()) { + entityTypeDisplayNames_ = other.entityTypeDisplayNames_; + bitField0_ |= 0x00000001; + } else { + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.addAll(other.entityTypeDisplayNames_); + } + onChanged(); + } + if (!other.entityDisplayNames_.isEmpty()) { + if (entityDisplayNames_.isEmpty()) { + entityDisplayNames_ = other.entityDisplayNames_; + bitField0_ |= 0x00000002; + } else { + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.addAll(other.entityDisplayNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList entityTypeDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypeDisplayNamesIsMutable() { + if (!entityTypeDisplayNames_.isModifiable()) { + entityTypeDisplayNames_ = + new com.google.protobuf.LazyStringArrayList(entityTypeDisplayNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityTypeDisplayNamesList() { + entityTypeDisplayNames_.makeImmutable(); + return entityTypeDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + public int getEntityTypeDisplayNamesCount() { + return entityTypeDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + public java.lang.String getEntityTypeDisplayNames(int index) { + return entityTypeDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index) { + return entityTypeDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index to set the value at. + * @param value The entityTypeDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setEntityTypeDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param value The entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityTypeDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param values The entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypeDisplayNames(java.lang.Iterable values) { + ensureEntityTypeDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypeDisplayNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypeDisplayNames() { + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param value The bytes of the entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityTypeDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityDisplayNamesIsMutable() { + if (!entityDisplayNames_.isModifiable()) { + entityDisplayNames_ = new com.google.protobuf.LazyStringArrayList(entityDisplayNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + entityDisplayNames_.makeImmutable(); + return entityDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index to set the value at. + * @param value The entityDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setEntityDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param values The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllEntityDisplayNames(java.lang.Iterable values) { + ensureEntityDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityDisplayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearEntityDisplayNames() { + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The bytes of the entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources) + private static final com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + .ConflictingResources + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConflictingResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ENTITY_TYPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + return entityTypes_; + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + + public static final int CONFLICTING_RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + conflictingResources_; + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + @java.lang.Override + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getConflictingResources() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entityTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityTypes_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getConflictingResources()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < entityTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConflictingResources()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse other = + (com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) obj; + + if (!getEntityTypesList().equals(other.getEntityTypesList())) return false; + if (hasConflictingResources() != other.hasConflictingResources()) return false; + if (hasConflictingResources()) { + if (!getConflictingResources().equals(other.getConflictingResources())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntityTypesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesList().hashCode(); + } + if (hasConflictingResources()) { + hash = (37 * hash) + CONFLICTING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getConflictingResources().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConflictingResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse build() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse result = + new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + entityTypes_.makeImmutable(); + result.entityTypes_ = entityTypes_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conflictingResources_ = + conflictingResourcesBuilder_ == null + ? conflictingResources_ + : conflictingResourcesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.getDefaultInstance()) + return this; + if (!other.entityTypes_.isEmpty()) { + if (entityTypes_.isEmpty()) { + entityTypes_ = other.entityTypes_; + bitField0_ |= 0x00000001; + } else { + ensureEntityTypesIsMutable(); + entityTypes_.addAll(other.entityTypes_); + } + onChanged(); + } + if (other.hasConflictingResources()) { + mergeConflictingResources(other.getConflictingResources()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypesIsMutable(); + entityTypes_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage( + getConflictingResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypesIsMutable() { + if (!entityTypes_.isModifiable()) { + entityTypes_ = new com.google.protobuf.LazyStringArrayList(entityTypes_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + entityTypes_.makeImmutable(); + return entityTypes_; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The entityTypes to set. + * @return This builder for chaining. + */ + public Builder setEntityTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypes(java.lang.Iterable values) { + ensureEntityTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypes_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearEntityTypes() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + conflictingResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder> + conflictingResourcesBuilder_; + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getConflictingResources() { + if (conflictingResourcesBuilder_ == null) { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } else { + return conflictingResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources value) { + if (conflictingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conflictingResources_ = value; + } else { + conflictingResourcesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.Builder + builderForValue) { + if (conflictingResourcesBuilder_ == null) { + conflictingResources_ = builderForValue.build(); + } else { + conflictingResourcesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder mergeConflictingResources( + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources value) { + if (conflictingResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conflictingResources_ != null + && conflictingResources_ + != com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance()) { + getConflictingResourcesBuilder().mergeFrom(value); + } else { + conflictingResources_ = value; + } + } else { + conflictingResourcesBuilder_.mergeFrom(value); + } + if (conflictingResources_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder clearConflictingResources() { + bitField0_ = (bitField0_ & ~0x00000002); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources.Builder + getConflictingResourcesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConflictingResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + if (conflictingResourcesBuilder_ != null) { + return conflictingResourcesBuilder_.getMessageOrBuilder(); + } else { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder> + getConflictingResourcesFieldBuilder() { + if (conflictingResourcesBuilder_ == null) { + conflictingResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder>( + getConflictingResources(), getParentForChildren(), isClean()); + conflictingResources_ = null; + } + return conflictingResourcesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) + private static final com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponseOrBuilder.java new file mode 100644 index 000000000000..450fdb66b0e0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/ImportEntityTypesResponseOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3; + +public interface ImportEntityTypesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + java.util.List getEntityTypesList(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + int getEntityTypesCount(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + java.lang.String getEntityTypes(int index); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + com.google.protobuf.ByteString getEntityTypesBytes(int index); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + boolean hasConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources + getConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java index 1475a6eb67e9..39efcbb446cf 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfig.java @@ -243,28 +243,10 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) { * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -287,28 +269,10 @@ public java.lang.String getModel() { * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -442,6 +406,27 @@ public com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfig : bargeInConfig_; } + public static final int OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER = 26; + private boolean optOutConformerModelMigration_ = false; + /** + * + * + *
+   * If `true`, the request will opt out for STT conformer model migration.
+   * This field will be deprecated once force migration takes place in June
+   * 2024. Please refer to [Dialogflow CX Speech model
+   * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+   * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + @java.lang.Override + public boolean getOptOutConformerModelMigration() { + return optOutConformerModelMigration_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -483,6 +468,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(15, getBargeInConfig()); } + if (optOutConformerModelMigration_ != false) { + output.writeBool(26, optOutConformerModelMigration_); + } getUnknownFields().writeTo(output); } @@ -524,6 +512,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBargeInConfig()); } + if (optOutConformerModelMigration_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(26, optOutConformerModelMigration_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -551,6 +543,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBargeInConfig()) { if (!getBargeInConfig().equals(other.getBargeInConfig())) return false; } + if (getOptOutConformerModelMigration() != other.getOptOutConformerModelMigration()) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -582,6 +576,9 @@ public int hashCode() { hash = (37 * hash) + BARGE_IN_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getBargeInConfig().hashCode(); } + hash = (37 * hash) + OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptOutConformerModelMigration()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -742,6 +739,7 @@ public Builder clear() { bargeInConfigBuilder_.dispose(); bargeInConfigBuilder_ = null; } + optOutConformerModelMigration_ = false; return this; } @@ -806,6 +804,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.InputAudioConfig re bargeInConfigBuilder_ == null ? bargeInConfig_ : bargeInConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.optOutConformerModelMigration_ = optOutConformerModelMigration_; + } result.bitField0_ |= to_bitField0_; } @@ -888,6 +889,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.InputAudioConfig othe if (other.hasBargeInConfig()) { mergeBargeInConfig(other.getBargeInConfig()); } + if (other.getOptOutConformerModelMigration() != false) { + setOptOutConformerModelMigration(other.getOptOutConformerModelMigration()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -963,6 +967,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 122 + case 208: + { + optOutConformerModelMigration_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 208 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1439,28 +1449,10 @@ public Builder addPhraseHintsBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1482,28 +1474,10 @@ public java.lang.String getModel() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1525,28 +1499,10 @@ public com.google.protobuf.ByteString getModelBytes() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1567,28 +1523,10 @@ public Builder setModel(java.lang.String value) { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1605,28 +1543,10 @@ public Builder clearModel() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -2003,6 +1923,68 @@ public com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfig return bargeInConfigBuilder_; } + private boolean optOutConformerModelMigration_; + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + @java.lang.Override + public boolean getOptOutConformerModelMigration() { + return optOutConformerModelMigration_; + } + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @param value The optOutConformerModelMigration to set. + * @return This builder for chaining. + */ + public Builder setOptOutConformerModelMigration(boolean value) { + + optOutConformerModelMigration_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return This builder for chaining. + */ + public Builder clearOptOutConformerModelMigration() { + bitField0_ = (bitField0_ & ~0x00000100); + optOutConformerModelMigration_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java index a30b4589c4ab..05fe271ea13c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/InputAudioConfigOrBuilder.java @@ -163,28 +163,10 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -196,28 +178,10 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -307,4 +271,20 @@ public interface InputAudioConfigOrBuilder * .google.cloud.dialogflow.cx.v3.BargeInConfig barge_in_config = 15; */ com.google.cloud.dialogflow.cx.v3.BargeInConfigOrBuilder getBargeInConfigOrBuilder(); + + /** + * + * + *
+   * If `true`, the request will opt out for STT conformer model migration.
+   * This field will be deprecated once force migration takes place in June
+   * 2024. Please refer to [Dialogflow CX Speech model
+   * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+   * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + boolean getOptOutConformerModelMigration(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java index 96c744383451..46b920a71dfd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/Page.java @@ -56,6 +56,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Page() { name_ = ""; displayName_ = ""; + description_ = ""; transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); transitionRoutes_ = java.util.Collections.emptyList(); eventHandlers_ = java.util.Collections.emptyList(); @@ -197,6 +198,57 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { } } + public static final int DESCRIPTION_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ENTRY_FULFILLMENT_FIELD_NUMBER = 7; private com.google.cloud.dialogflow.cx.v3.Fulfillment entryFulfillment_; /** @@ -845,6 +897,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(18, getKnowledgeConnectorSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, description_); + } getUnknownFields().writeTo(output); } @@ -888,6 +943,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getKnowledgeConnectorSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, description_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -905,6 +963,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (hasEntryFulfillment() != other.hasEntryFulfillment()) return false; if (hasEntryFulfillment()) { if (!getEntryFulfillment().equals(other.getEntryFulfillment())) return false; @@ -940,6 +999,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); if (hasEntryFulfillment()) { hash = (37 * hash) + ENTRY_FULFILLMENT_FIELD_NUMBER; hash = (53 * hash) + getEntryFulfillment().hashCode(); @@ -1138,6 +1199,7 @@ public Builder clear() { bitField0_ = 0; name_ = ""; displayName_ = ""; + description_ = ""; entryFulfillment_ = null; if (entryFulfillmentBuilder_ != null) { entryFulfillmentBuilder_.dispose(); @@ -1155,14 +1217,14 @@ public Builder clear() { transitionRoutes_ = null; transitionRoutesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); } else { eventHandlers_ = null; eventHandlersBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -1210,18 +1272,18 @@ public com.google.cloud.dialogflow.cx.v3.Page buildPartial() { private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.Page result) { if (transitionRoutesBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { transitionRoutes_ = java.util.Collections.unmodifiableList(transitionRoutes_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } result.transitionRoutes_ = transitionRoutes_; } else { result.transitionRoutes_ = transitionRoutesBuilder_.build(); } if (eventHandlersBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { eventHandlers_ = java.util.Collections.unmodifiableList(eventHandlers_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } result.eventHandlers_ = eventHandlers_; } else { @@ -1237,26 +1299,29 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.Page result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.displayName_ = displayName_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { result.entryFulfillment_ = entryFulfillmentBuilder_ == null ? entryFulfillment_ : entryFulfillmentBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.form_ = formBuilder_ == null ? form_ : formBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { transitionRouteGroups_.makeImmutable(); result.transitionRouteGroups_ = transitionRouteGroups_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.knowledgeConnectorSettings_ = knowledgeConnectorSettingsBuilder_ == null ? knowledgeConnectorSettings_ @@ -1321,6 +1386,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } if (other.hasEntryFulfillment()) { mergeEntryFulfillment(other.getEntryFulfillment()); } @@ -1330,7 +1400,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { if (!other.transitionRouteGroups_.isEmpty()) { if (transitionRouteGroups_.isEmpty()) { transitionRouteGroups_ = other.transitionRouteGroups_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } else { ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.addAll(other.transitionRouteGroups_); @@ -1341,7 +1411,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { if (!other.transitionRoutes_.isEmpty()) { if (transitionRoutes_.isEmpty()) { transitionRoutes_ = other.transitionRoutes_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureTransitionRoutesIsMutable(); transitionRoutes_.addAll(other.transitionRoutes_); @@ -1354,7 +1424,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { transitionRoutesBuilder_.dispose(); transitionRoutesBuilder_ = null; transitionRoutes_ = other.transitionRoutes_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); transitionRoutesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTransitionRoutesFieldBuilder() @@ -1368,7 +1438,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { if (!other.eventHandlers_.isEmpty()) { if (eventHandlers_.isEmpty()) { eventHandlers_ = other.eventHandlers_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureEventHandlersIsMutable(); eventHandlers_.addAll(other.eventHandlers_); @@ -1381,7 +1451,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.Page other) { eventHandlersBuilder_.dispose(); eventHandlersBuilder_ = null; eventHandlers_ = other.eventHandlers_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); eventHandlersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventHandlersFieldBuilder() @@ -1438,14 +1508,14 @@ public Builder mergeFrom( case 34: { input.readMessage(getFormFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 case 58: { input.readMessage( getEntryFulfillmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 58 case 74: @@ -1486,16 +1556,22 @@ public Builder mergeFrom( { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 106 case 146: { input.readMessage( getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 146 + case 154: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1757,6 +1833,112 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private com.google.cloud.dialogflow.cx.v3.Fulfillment entryFulfillment_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.Fulfillment, @@ -1775,7 +1957,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * @return Whether the entryFulfillment field is set. */ public boolean hasEntryFulfillment() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -1815,7 +1997,7 @@ public Builder setEntryFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment } else { entryFulfillmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1835,7 +2017,7 @@ public Builder setEntryFulfillment( } else { entryFulfillmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1850,7 +2032,7 @@ public Builder setEntryFulfillment( */ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillment value) { if (entryFulfillmentBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && entryFulfillment_ != null && entryFulfillment_ != com.google.cloud.dialogflow.cx.v3.Fulfillment.getDefaultInstance()) { @@ -1862,7 +2044,7 @@ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillme entryFulfillmentBuilder_.mergeFrom(value); } if (entryFulfillment_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } return this; @@ -1877,7 +2059,7 @@ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3.Fulfillme * .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; */ public Builder clearEntryFulfillment() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); entryFulfillment_ = null; if (entryFulfillmentBuilder_ != null) { entryFulfillmentBuilder_.dispose(); @@ -1896,7 +2078,7 @@ public Builder clearEntryFulfillment() { * .google.cloud.dialogflow.cx.v3.Fulfillment entry_fulfillment = 7; */ public com.google.cloud.dialogflow.cx.v3.Fulfillment.Builder getEntryFulfillmentBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getEntryFulfillmentFieldBuilder().getBuilder(); } @@ -1963,7 +2145,7 @@ public com.google.cloud.dialogflow.cx.v3.FulfillmentOrBuilder getEntryFulfillmen * @return Whether the form field is set. */ public boolean hasForm() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2003,7 +2185,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3.Form value) { } else { formBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2023,7 +2205,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3.Form.Builder builderFor } else { formBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2039,7 +2221,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3.Form.Builder builderFor */ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3.Form value) { if (formBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && form_ != null && form_ != com.google.cloud.dialogflow.cx.v3.Form.getDefaultInstance()) { getFormBuilder().mergeFrom(value); @@ -2050,7 +2232,7 @@ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3.Form value) { formBuilder_.mergeFrom(value); } if (form_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -2066,7 +2248,7 @@ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3.Form value) { * .google.cloud.dialogflow.cx.v3.Form form = 4; */ public Builder clearForm() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); form_ = null; if (formBuilder_ != null) { formBuilder_.dispose(); @@ -2086,7 +2268,7 @@ public Builder clearForm() { * .google.cloud.dialogflow.cx.v3.Form form = 4; */ public com.google.cloud.dialogflow.cx.v3.Form.Builder getFormBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getFormFieldBuilder().getBuilder(); } @@ -2142,7 +2324,7 @@ private void ensureTransitionRouteGroupsIsMutable() { transitionRouteGroups_ = new com.google.protobuf.LazyStringArrayList(transitionRouteGroups_); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } /** * @@ -2322,7 +2504,7 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.set(index, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2364,7 +2546,7 @@ public Builder addTransitionRouteGroups(java.lang.String value) { } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2403,7 +2585,7 @@ public Builder addTransitionRouteGroups(java.lang.String value) { public Builder addAllTransitionRouteGroups(java.lang.Iterable values) { ensureTransitionRouteGroupsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRouteGroups_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2440,7 +2622,7 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable */ public Builder clearTransitionRouteGroups() { transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); ; onChanged(); return this; @@ -2484,7 +2666,7 @@ public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString valu checkByteStringIsUtf8(value); ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2493,11 +2675,11 @@ public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString valu java.util.Collections.emptyList(); private void ensureTransitionRoutesIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { transitionRoutes_ = new java.util.ArrayList( transitionRoutes_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } } @@ -2947,7 +3129,7 @@ public Builder addAllTransitionRoutes( public Builder clearTransitionRoutes() { if (transitionRoutesBuilder_ == null) { transitionRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { transitionRoutesBuilder_.clear(); @@ -3221,7 +3403,7 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder, com.google.cloud.dialogflow.cx.v3.TransitionRouteOrBuilder>( transitionRoutes_, - ((bitField0_ & 0x00000020) != 0), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); transitionRoutes_ = null; @@ -3233,10 +3415,10 @@ public com.google.cloud.dialogflow.cx.v3.TransitionRoute.Builder addTransitionRo java.util.Collections.emptyList(); private void ensureEventHandlersIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { eventHandlers_ = new java.util.ArrayList(eventHandlers_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } } @@ -3465,7 +3647,7 @@ public Builder addAllEventHandlers( public Builder clearEventHandlers() { if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { eventHandlersBuilder_.clear(); @@ -3598,7 +3780,7 @@ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBu com.google.cloud.dialogflow.cx.v3.EventHandler.Builder, com.google.cloud.dialogflow.cx.v3.EventHandlerOrBuilder>( eventHandlers_, - ((bitField0_ & 0x00000040) != 0), + ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); eventHandlers_ = null; @@ -3625,7 +3807,7 @@ public com.google.cloud.dialogflow.cx.v3.EventHandler.Builder addEventHandlersBu * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3667,7 +3849,7 @@ public Builder setAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSet } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3688,7 +3870,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3704,7 +3886,7 @@ public Builder setAdvancedSettings( */ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance()) { @@ -3716,7 +3898,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } return this; @@ -3732,7 +3914,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -3752,7 +3934,7 @@ public Builder clearAdvancedSettings() { * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 13; */ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -3824,7 +4006,7 @@ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSet * @return Whether the knowledgeConnectorSettings field is set. */ public boolean hasKnowledgeConnectorSettings() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -3870,7 +4052,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3892,7 +4074,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3910,7 +4092,7 @@ public Builder setKnowledgeConnectorSettings( public Builder mergeKnowledgeConnectorSettings( com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings value) { if (knowledgeConnectorSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && knowledgeConnectorSettings_ != null && knowledgeConnectorSettings_ != com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings @@ -3923,7 +4105,7 @@ public Builder mergeKnowledgeConnectorSettings( knowledgeConnectorSettingsBuilder_.mergeFrom(value); } if (knowledgeConnectorSettings_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -3940,7 +4122,7 @@ public Builder mergeKnowledgeConnectorSettings( *
*/ public Builder clearKnowledgeConnectorSettings() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -3962,7 +4144,7 @@ public Builder clearKnowledgeConnectorSettings() { */ public com.google.cloud.dialogflow.cx.v3.KnowledgeConnectorSettings.Builder getKnowledgeConnectorSettingsBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java index b56fee3a693a..57fb96f85c9b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageOrBuilder.java @@ -86,6 +86,31 @@ public interface PageOrBuilder */ com.google.protobuf.ByteString getDisplayNameBytes(); + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java index 3d05b8c12b96..96352e061e89 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/PageProto.java @@ -100,112 +100,113 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "logflow/cx/v3/fulfillment.proto\032\033google/" + "protobuf/empty.proto\032 google/protobuf/fi" + "eld_mask.proto\032\034google/protobuf/struct.p" - + "roto\"\270\005\n\004Page\022\014\n\004name\030\001 \001(\t\022\031\n\014display_n" - + "ame\030\002 \001(\tB\003\340A\002\022E\n\021entry_fulfillment\030\007 \001(" - + "\0132*.google.cloud.dialogflow.cx.v3.Fulfil" - + "lment\0221\n\004form\030\004 \001(\0132#.google.cloud.dialo" - + "gflow.cx.v3.Form\022T\n\027transition_route_gro" - + "ups\030\013 \003(\tB3\372A0\n.dialogflow.googleapis.co" - + "m/TransitionRouteGroup\022I\n\021transition_rou" - + "tes\030\t \003(\0132..google.cloud.dialogflow.cx.v" - + "3.TransitionRoute\022C\n\016event_handlers\030\n \003(" - + "\0132+.google.cloud.dialogflow.cx.v3.EventH" - + "andler\022J\n\021advanced_settings\030\r \001(\0132/.goog" - + "le.cloud.dialogflow.cx.v3.AdvancedSettin" - + "gs\022d\n\034knowledge_connector_settings\030\022 \001(\013" - + "29.google.cloud.dialogflow.cx.v3.Knowled" - + "geConnectorSettingsB\003\340A\001:u\352Ar\n\036dialogflo" - + "w.googleapis.com/Page\022Pprojects/{project" - + "}/locations/{location}/agents/{agent}/fl" - + "ows/{flow}/pages/{page}\"\357\004\n\004Form\022A\n\npara" - + "meters\030\001 \003(\0132-.google.cloud.dialogflow.c" - + "x.v3.Form.Parameter\032\243\004\n\tParameter\022\031\n\014dis" - + "play_name\030\001 \001(\tB\003\340A\002\022\020\n\010required\030\002 \001(\010\022A" - + "\n\013entity_type\030\003 \001(\tB,\340A\002\372A&\n$dialogflow." - + "googleapis.com/EntityType\022\017\n\007is_list\030\004 \001" - + "(\010\022V\n\rfill_behavior\030\007 \001(\0132:.google.cloud" - + ".dialogflow.cx.v3.Form.Parameter.FillBeh" - + "aviorB\003\340A\002\022-\n\rdefault_value\030\t \001(\0132\026.goog" - + "le.protobuf.Value\022\016\n\006redact\030\013 \001(\010\022J\n\021adv" - + "anced_settings\030\014 \001(\0132/.google.cloud.dial" - + "ogflow.cx.v3.AdvancedSettings\032\261\001\n\014FillBe" - + "havior\022S\n\032initial_prompt_fulfillment\030\003 \001" - + "(\0132*.google.cloud.dialogflow.cx.v3.Fulfi" - + "llmentB\003\340A\002\022L\n\027reprompt_event_handlers\030\005" - + " \003(\0132+.google.cloud.dialogflow.cx.v3.Eve" - + "ntHandler\"\200\002\n\014EventHandler\022\021\n\004name\030\006 \001(\t" - + "B\003\340A\003\022\022\n\005event\030\004 \001(\tB\003\340A\002\022G\n\023trigger_ful" - + "fillment\030\005 \001(\0132*.google.cloud.dialogflow" - + ".cx.v3.Fulfillment\022:\n\013target_page\030\002 \001(\tB" - + "#\372A \n\036dialogflow.googleapis.com/PageH\000\022:" - + "\n\013target_flow\030\003 \001(\tB#\372A \n\036dialogflow.goo" - + "gleapis.com/FlowH\000B\010\n\006target\"\323\002\n\017Transit" - + "ionRoute\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\030\n\013descripti" - + "on\030\010 \001(\tB\003\340A\001\0225\n\006intent\030\001 \001(\tB%\372A\"\n dial" - + "ogflow.googleapis.com/Intent\022\021\n\tconditio" - + "n\030\002 \001(\t\022G\n\023trigger_fulfillment\030\003 \001(\0132*.g" - + "oogle.cloud.dialogflow.cx.v3.Fulfillment" - + "\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflow.g" - + "oogleapis.com/PageH\000\022:\n\013target_flow\030\005 \001(" - + "\tB#\372A \n\036dialogflow.googleapis.com/FlowH\000" - + "B\010\n\006target\"\210\001\n\020ListPagesRequest\0226\n\006paren" - + "t\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.googleapis.c" - + "om/Page\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_s" - + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"`\n\021ListPag" - + "esResponse\0222\n\005pages\030\001 \003(\0132#.google.cloud" - + ".dialogflow.cx.v3.Page\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"]\n\016GetPageRequest\0224\n\004name\030\001 \001(\tB" - + "&\340A\002\372A \n\036dialogflow.googleapis.com/Page\022" - + "\025\n\rlanguage_code\030\002 \001(\t\"\232\001\n\021CreatePageReq" - + "uest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow" - + ".googleapis.com/Page\0226\n\004page\030\002 \001(\0132#.goo" - + "gle.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025\n\r" - + "language_code\030\003 \001(\t\"\223\001\n\021UpdatePageReques" - + "t\0226\n\004page\030\001 \001(\0132#.google.cloud.dialogflo" - + "w.cx.v3.PageB\003\340A\002\022\025\n\rlanguage_code\030\002 \001(\t" - + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." - + "FieldMask\"X\n\021DeletePageRequest\0224\n\004name\030\001" - + " \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/" - + "Page\022\r\n\005force\030\002 \001(\010\"\321\002\n\032KnowledgeConnect" - + "orSettings\022\017\n\007enabled\030\001 \001(\010\022G\n\023trigger_f" - + "ulfillment\030\003 \001(\0132*.google.cloud.dialogfl" - + "ow.cx.v3.Fulfillment\022:\n\013target_page\030\004 \001(" - + "\tB#\372A \n\036dialogflow.googleapis.com/PageH\000" - + "\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dialogflow.g" - + "oogleapis.com/FlowH\000\022W\n\026data_store_conne" - + "ctions\030\006 \003(\01322.google.cloud.dialogflow.c" - + "x.v3.DataStoreConnectionB\003\340A\001B\010\n\006target2" - + "\224\010\n\005Pages\022\273\001\n\tListPages\022/.google.cloud.d" - + "ialogflow.cx.v3.ListPagesRequest\0320.googl" - + "e.cloud.dialogflow.cx.v3.ListPagesRespon" - + "se\"K\332A\006parent\202\323\344\223\002<\022:/v3/{parent=project" - + "s/*/locations/*/agents/*/flows/*}/pages\022" - + "\250\001\n\007GetPage\022-.google.cloud.dialogflow.cx" - + ".v3.GetPageRequest\032#.google.cloud.dialog" - + "flow.cx.v3.Page\"I\332A\004name\202\323\344\223\002<\022:/v3/{nam" - + "e=projects/*/locations/*/agents/*/flows/" - + "*/pages/*}\022\273\001\n\nCreatePage\0220.google.cloud" - + ".dialogflow.cx.v3.CreatePageRequest\032#.go" - + "ogle.cloud.dialogflow.cx.v3.Page\"V\332A\013par" - + "ent,page\202\323\344\223\002B\":/v3/{parent=projects/*/l" - + "ocations/*/agents/*/flows/*}/pages:\004page" - + "\022\305\001\n\nUpdatePage\0220.google.cloud.dialogflo" - + "w.cx.v3.UpdatePageRequest\032#.google.cloud" - + ".dialogflow.cx.v3.Page\"`\332A\020page,update_m" - + "ask\202\323\344\223\002G2?/v3/{page.name=projects/*/loc" - + "ations/*/agents/*/flows/*/pages/*}:\004page" - + "\022\241\001\n\nDeletePage\0220.google.cloud.dialogflo" - + "w.cx.v3.DeletePageRequest\032\026.google.proto" - + "buf.Empty\"I\332A\004name\202\323\344\223\002<*:/v3/{name=proj" - + "ects/*/locations/*/agents/*/flows/*/page" - + "s/*}\032x\312A\031dialogflow.googleapis.com\322AYhtt" - + "ps://www.googleapis.com/auth/cloud-platf" - + "orm,https://www.googleapis.com/auth/dial" - + "ogflowB\257\001\n!com.google.cloud.dialogflow.c" - + "x.v3B\tPageProtoP\001Z1cloud.google.com/go/d" - + "ialogflow/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035G" - + "oogle.Cloud.Dialogflow.Cx.V3\352\002!Google::C" - + "loud::Dialogflow::CX::V3b\006proto3" + + "roto\"\315\005\n\004Page\022\014\n\004name\030\001 \001(\t\022\031\n\014display_n" + + "ame\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\023 \001(\t\022E\n\021e" + + "ntry_fulfillment\030\007 \001(\0132*.google.cloud.di" + + "alogflow.cx.v3.Fulfillment\0221\n\004form\030\004 \001(\013" + + "2#.google.cloud.dialogflow.cx.v3.Form\022T\n" + + "\027transition_route_groups\030\013 \003(\tB3\372A0\n.dia" + + "logflow.googleapis.com/TransitionRouteGr" + + "oup\022I\n\021transition_routes\030\t \003(\0132..google." + + "cloud.dialogflow.cx.v3.TransitionRoute\022C" + + "\n\016event_handlers\030\n \003(\0132+.google.cloud.di" + + "alogflow.cx.v3.EventHandler\022J\n\021advanced_" + + "settings\030\r \001(\0132/.google.cloud.dialogflow" + + ".cx.v3.AdvancedSettings\022d\n\034knowledge_con" + + "nector_settings\030\022 \001(\01329.google.cloud.dia" + + "logflow.cx.v3.KnowledgeConnectorSettings" + + "B\003\340A\001:u\352Ar\n\036dialogflow.googleapis.com/Pa" + + "ge\022Pprojects/{project}/locations/{locati" + + "on}/agents/{agent}/flows/{flow}/pages/{p" + + "age}\"\357\004\n\004Form\022A\n\nparameters\030\001 \003(\0132-.goog" + + "le.cloud.dialogflow.cx.v3.Form.Parameter" + + "\032\243\004\n\tParameter\022\031\n\014display_name\030\001 \001(\tB\003\340A" + + "\002\022\020\n\010required\030\002 \001(\010\022A\n\013entity_type\030\003 \001(\t" + + "B,\340A\002\372A&\n$dialogflow.googleapis.com/Enti" + + "tyType\022\017\n\007is_list\030\004 \001(\010\022V\n\rfill_behavior" + + "\030\007 \001(\0132:.google.cloud.dialogflow.cx.v3.F" + + "orm.Parameter.FillBehaviorB\003\340A\002\022-\n\rdefau" + + "lt_value\030\t \001(\0132\026.google.protobuf.Value\022\016" + + "\n\006redact\030\013 \001(\010\022J\n\021advanced_settings\030\014 \001(" + + "\0132/.google.cloud.dialogflow.cx.v3.Advanc" + + "edSettings\032\261\001\n\014FillBehavior\022S\n\032initial_p" + + "rompt_fulfillment\030\003 \001(\0132*.google.cloud.d" + + "ialogflow.cx.v3.FulfillmentB\003\340A\002\022L\n\027repr" + + "ompt_event_handlers\030\005 \003(\0132+.google.cloud" + + ".dialogflow.cx.v3.EventHandler\"\200\002\n\014Event" + + "Handler\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\022\n\005event\030\004 \001(" + + "\tB\003\340A\002\022G\n\023trigger_fulfillment\030\005 \001(\0132*.go" + + "ogle.cloud.dialogflow.cx.v3.Fulfillment\022" + + ":\n\013target_page\030\002 \001(\tB#\372A \n\036dialogflow.go" + + "ogleapis.com/PageH\000\022:\n\013target_flow\030\003 \001(\t" + + "B#\372A \n\036dialogflow.googleapis.com/FlowH\000B" + + "\010\n\006target\"\323\002\n\017TransitionRoute\022\021\n\004name\030\006 " + + "\001(\tB\003\340A\003\022\030\n\013description\030\010 \001(\tB\003\340A\001\0225\n\006in" + + "tent\030\001 \001(\tB%\372A\"\n dialogflow.googleapis.c" + + "om/Intent\022\021\n\tcondition\030\002 \001(\t\022G\n\023trigger_" + + "fulfillment\030\003 \001(\0132*.google.cloud.dialogf" + + "low.cx.v3.Fulfillment\022:\n\013target_page\030\004 \001" + + "(\tB#\372A \n\036dialogflow.googleapis.com/PageH" + + "\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036dialogflow." + + "googleapis.com/FlowH\000B\010\n\006target\"\210\001\n\020List" + + "PagesRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036di" + + "alogflow.googleapis.com/Page\022\025\n\rlanguage" + + "_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_t" + + "oken\030\004 \001(\t\"`\n\021ListPagesResponse\0222\n\005pages" + + "\030\001 \003(\0132#.google.cloud.dialogflow.cx.v3.P" + + "age\022\027\n\017next_page_token\030\002 \001(\t\"]\n\016GetPageR" + + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow" + + ".googleapis.com/Page\022\025\n\rlanguage_code\030\002 " + + "\001(\t\"\232\001\n\021CreatePageRequest\0226\n\006parent\030\001 \001(" + + "\tB&\340A\002\372A \022\036dialogflow.googleapis.com/Pag" + + "e\0226\n\004page\030\002 \001(\0132#.google.cloud.dialogflo" + + "w.cx.v3.PageB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t" + + "\"\223\001\n\021UpdatePageRequest\0226\n\004page\030\001 \001(\0132#.g" + + "oogle.cloud.dialogflow.cx.v3.PageB\003\340A\002\022\025" + + "\n\rlanguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001" + + "(\0132\032.google.protobuf.FieldMask\"X\n\021Delete" + + "PageRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialo" + + "gflow.googleapis.com/Page\022\r\n\005force\030\002 \001(\010" + + "\"\321\002\n\032KnowledgeConnectorSettings\022\017\n\007enabl" + + "ed\030\001 \001(\010\022G\n\023trigger_fulfillment\030\003 \001(\0132*." + + "google.cloud.dialogflow.cx.v3.Fulfillmen" + + "t\022:\n\013target_page\030\004 \001(\tB#\372A \n\036dialogflow." + + "googleapis.com/PageH\000\022:\n\013target_flow\030\005 \001" + + "(\tB#\372A \n\036dialogflow.googleapis.com/FlowH" + + "\000\022W\n\026data_store_connections\030\006 \003(\01322.goog" + + "le.cloud.dialogflow.cx.v3.DataStoreConne" + + "ctionB\003\340A\001B\010\n\006target2\224\010\n\005Pages\022\273\001\n\tListP" + + "ages\022/.google.cloud.dialogflow.cx.v3.Lis" + + "tPagesRequest\0320.google.cloud.dialogflow." + + "cx.v3.ListPagesResponse\"K\332A\006parent\202\323\344\223\002<" + + "\022:/v3/{parent=projects/*/locations/*/age" + + "nts/*/flows/*}/pages\022\250\001\n\007GetPage\022-.googl" + + "e.cloud.dialogflow.cx.v3.GetPageRequest\032" + + "#.google.cloud.dialogflow.cx.v3.Page\"I\332A" + + "\004name\202\323\344\223\002<\022:/v3/{name=projects/*/locati" + + "ons/*/agents/*/flows/*/pages/*}\022\273\001\n\nCrea" + + "tePage\0220.google.cloud.dialogflow.cx.v3.C" + + "reatePageRequest\032#.google.cloud.dialogfl" + + "ow.cx.v3.Page\"V\332A\013parent,page\202\323\344\223\002B\":/v3" + + "/{parent=projects/*/locations/*/agents/*" + + "/flows/*}/pages:\004page\022\305\001\n\nUpdatePage\0220.g" + + "oogle.cloud.dialogflow.cx.v3.UpdatePageR" + + "equest\032#.google.cloud.dialogflow.cx.v3.P" + + "age\"`\332A\020page,update_mask\202\323\344\223\002G2?/v3/{pag" + + "e.name=projects/*/locations/*/agents/*/f" + + "lows/*/pages/*}:\004page\022\241\001\n\nDeletePage\0220.g" + + "oogle.cloud.dialogflow.cx.v3.DeletePageR" + + "equest\032\026.google.protobuf.Empty\"I\332A\004name\202" + + "\323\344\223\002<*:/v3/{name=projects/*/locations/*/" + + "agents/*/flows/*/pages/*}\032x\312A\031dialogflow" + + ".googleapis.com\322AYhttps://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/dialogflowB\257\001\n!com.goog" + + "le.cloud.dialogflow.cx.v3B\tPageProtoP\001Z1" + + "cloud.google.com/go/dialogflow/cx/apiv3/" + + "cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogf" + + "low.Cx.V3\352\002!Google::Cloud::Dialogflow::C" + + "X::V3b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -230,6 +231,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "DisplayName", + "Description", "EntryFulfillment", "Form", "TransitionRouteGroups", diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java index f0f8b6f60975..a9a424fb5f16 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryInput.java @@ -34,6 +34,8 @@ * 4. An event to be triggered. * * 5. DTMF digits to invoke an intent and fill in parameter value. + * + * 6. The results of a tool executed by the client. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3.QueryInput} @@ -701,6 +703,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 4. An event to be triggered. * * 5. DTMF digits to invoke an intent and fill in parameter value. + * + * 6. The results of a tool executed by the client. * * * Protobuf type {@code google.cloud.dialogflow.cx.v3.QueryInput} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java index fe533c1fb67a..fc4f99e50359 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParameters.java @@ -873,7 +873,7 @@ public com.google.protobuf.ByteString getChannelBytes() { * * *
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -892,7 +892,7 @@ public boolean hasSessionTtl() {
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -911,7 +911,7 @@ public com.google.protobuf.Duration getSessionTtl() {
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -4158,7 +4158,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4176,7 +4176,7 @@ public boolean hasSessionTtl() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4200,7 +4200,7 @@ public com.google.protobuf.Duration getSessionTtl() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4226,7 +4226,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration value) {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4249,7 +4249,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4280,7 +4280,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4303,7 +4303,7 @@ public Builder clearSessionTtl() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4321,7 +4321,7 @@ public com.google.protobuf.Duration.Builder getSessionTtlBuilder() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4343,7 +4343,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java
index 0b08c81aaa1c..abfeb10e7bcf 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryParametersOrBuilder.java
@@ -622,7 +622,7 @@ java.lang.String getWebhookHeadersOrDefault(
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -638,7 +638,7 @@ java.lang.String getWebhookHeadersOrDefault(
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -654,7 +654,7 @@ java.lang.String getWebhookHeadersOrDefault(
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java
index 59ed9832ecd4..96670a046f01 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResult.java
@@ -41,6 +41,10 @@ private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) {
   private QueryResult() {
     languageCode_ = "";
     responseMessages_ = java.util.Collections.emptyList();
+    webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList();
+    webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
+    webhookLatencies_ = java.util.Collections.emptyList();
+    webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList();
     webhookStatuses_ = java.util.Collections.emptyList();
     webhookPayloads_ = java.util.Collections.emptyList();
   }
@@ -711,6 +715,269 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMes
     return responseMessages_.get(index);
   }
 
+  public static final int WEBHOOK_IDS_FIELD_NUMBER = 25;
+
+  @SuppressWarnings("serial")
+  private com.google.protobuf.LazyStringArrayList webhookIds_ =
+      com.google.protobuf.LazyStringArrayList.emptyList();
+  /**
+   *
+   *
+   * 
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + public com.google.protobuf.ProtocolStringList getWebhookIdsList() { + return webhookIds_; + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + public int getWebhookIdsCount() { + return webhookIds_.size(); + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + public java.lang.String getWebhookIds(int index) { + return webhookIds_.get(index); + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { + return webhookIds_.getByteString(index); + } + + public static final int WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { + return webhookDisplayNames_; + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + public int getWebhookDisplayNamesCount() { + return webhookDisplayNames_.size(); + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + public java.lang.String getWebhookDisplayNames(int index) { + return webhookDisplayNames_.get(index); + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { + return webhookDisplayNames_.getByteString(index); + } + + public static final int WEBHOOK_LATENCIES_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private java.util.List webhookLatencies_; + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public java.util.List getWebhookLatenciesList() { + return webhookLatencies_; + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public java.util.List + getWebhookLatenciesOrBuilderList() { + return webhookLatencies_; + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public int getWebhookLatenciesCount() { + return webhookLatencies_.size(); + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public com.google.protobuf.Duration getWebhookLatencies(int index) { + return webhookLatencies_.get(index); + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { + return webhookLatencies_.get(index); + } + + public static final int WEBHOOK_TAGS_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList webhookTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + public com.google.protobuf.ProtocolStringList getWebhookTagsList() { + return webhookTags_; + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + public int getWebhookTagsCount() { + return webhookTags_.size(); + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + public java.lang.String getWebhookTags(int index) { + return webhookTags_.get(index); + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { + return webhookTags_.getByteString(index); + } + public static final int WEBHOOK_STATUSES_FIELD_NUMBER = 13; @SuppressWarnings("serial") @@ -924,6 +1191,62 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() : currentPage_; } + public static final int CURRENT_FLOW_FIELD_NUMBER = 31; + private com.google.cloud.dialogflow.cx.v3.Flow currentFlow_; + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return Whether the currentFlow field is set. + */ + @java.lang.Override + public boolean hasCurrentFlow() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return The currentFlow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.Flow getCurrentFlow() { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance() + : currentFlow_; + } + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getCurrentFlowOrBuilder() { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance() + : currentFlow_; + } + public static final int INTENT_FIELD_NUMBER = 8; private com.google.cloud.dialogflow.cx.v3.Intent intent_; /** @@ -941,13 +1264,13 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return Whether the intent field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasIntent() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -964,7 +1287,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return The intent. */ @java.lang.Override @@ -1016,7 +1339,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=967 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1040,7 +1363,7 @@ public float getIntentDetectionConfidence() { */ @java.lang.Override public boolean hasMatch() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1102,7 +1425,7 @@ public com.google.cloud.dialogflow.cx.v3.MatchOrBuilder getMatchOrBuilder() { */ @java.lang.Override public boolean hasDiagnosticInfo() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1188,7 +1511,7 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { */ @java.lang.Override public boolean hasSentimentAnalysisResult() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * @@ -1251,7 +1574,7 @@ public com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult getSentimentAna */ @java.lang.Override public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -1346,13 +1669,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getCurrentPage()); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(8, getIntent()); } if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { output.writeFloat(9, intentDetectionConfidence_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(10, getDiagnosticInfo()); } if (queryCase_ == 11) { @@ -1367,18 +1690,34 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryCase_ == 14) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, query_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(15, getMatch()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(17, getSentimentAnalysisResult()); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { output.writeMessage(21, getAdvancedSettings()); } if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } + for (int i = 0; i < webhookIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, webhookIds_.getRaw(i)); + } + for (int i = 0; i < webhookDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 26, webhookDisplayNames_.getRaw(i)); + } + for (int i = 0; i < webhookLatencies_.size(); i++) { + output.writeMessage(27, webhookLatencies_.get(i)); + } + for (int i = 0; i < webhookTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, webhookTags_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(31, getCurrentFlow()); + } if (allowAnswerFeedback_ != false) { output.writeBool(32, allowAnswerFeedback_); } @@ -1409,13 +1748,13 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCurrentPage()); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getIntent()); } if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, intentDetectionConfidence_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDiagnosticInfo()); } if (queryCase_ == 11) { @@ -1430,15 +1769,15 @@ public int getSerializedSize() { if (queryCase_ == 14) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, query_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMatch()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getSentimentAnalysisResult()); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getAdvancedSettings()); } if (queryCase_ == 23) { @@ -1446,6 +1785,37 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dialogflow.cx.v3.DtmfInput) query_); } + { + int dataSize = 0; + for (int i = 0; i < webhookIds_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookIds_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < webhookDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookDisplayNamesList().size(); + } + for (int i = 0; i < webhookLatencies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(27, webhookLatencies_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < webhookTags_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookTagsList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getCurrentFlow()); + } if (allowAnswerFeedback_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(32, allowAnswerFeedback_); } @@ -1471,12 +1841,20 @@ public boolean equals(final java.lang.Object obj) { if (!getParameters().equals(other.getParameters())) return false; } if (!getResponseMessagesList().equals(other.getResponseMessagesList())) return false; + if (!getWebhookIdsList().equals(other.getWebhookIdsList())) return false; + if (!getWebhookDisplayNamesList().equals(other.getWebhookDisplayNamesList())) return false; + if (!getWebhookLatenciesList().equals(other.getWebhookLatenciesList())) return false; + if (!getWebhookTagsList().equals(other.getWebhookTagsList())) return false; if (!getWebhookStatusesList().equals(other.getWebhookStatusesList())) return false; if (!getWebhookPayloadsList().equals(other.getWebhookPayloadsList())) return false; if (hasCurrentPage() != other.hasCurrentPage()) return false; if (hasCurrentPage()) { if (!getCurrentPage().equals(other.getCurrentPage())) return false; } + if (hasCurrentFlow() != other.hasCurrentFlow()) return false; + if (hasCurrentFlow()) { + if (!getCurrentFlow().equals(other.getCurrentFlow())) return false; + } if (hasIntent() != other.hasIntent()) return false; if (hasIntent()) { if (!getIntent().equals(other.getIntent())) return false; @@ -1541,6 +1919,22 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getResponseMessagesList().hashCode(); } + if (getWebhookIdsCount() > 0) { + hash = (37 * hash) + WEBHOOK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getWebhookIdsList().hashCode(); + } + if (getWebhookDisplayNamesCount() > 0) { + hash = (37 * hash) + WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getWebhookDisplayNamesList().hashCode(); + } + if (getWebhookLatenciesCount() > 0) { + hash = (37 * hash) + WEBHOOK_LATENCIES_FIELD_NUMBER; + hash = (53 * hash) + getWebhookLatenciesList().hashCode(); + } + if (getWebhookTagsCount() > 0) { + hash = (37 * hash) + WEBHOOK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getWebhookTagsList().hashCode(); + } if (getWebhookStatusesCount() > 0) { hash = (37 * hash) + WEBHOOK_STATUSES_FIELD_NUMBER; hash = (53 * hash) + getWebhookStatusesList().hashCode(); @@ -1553,6 +1947,10 @@ public int hashCode() { hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER; hash = (53 * hash) + getCurrentPage().hashCode(); } + if (hasCurrentFlow()) { + hash = (37 * hash) + CURRENT_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getCurrentFlow().hashCode(); + } if (hasIntent()) { hash = (37 * hash) + INTENT_FIELD_NUMBER; hash = (53 * hash) + getIntent().hashCode(); @@ -1743,9 +2141,11 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getParametersFieldBuilder(); getResponseMessagesFieldBuilder(); + getWebhookLatenciesFieldBuilder(); getWebhookStatusesFieldBuilder(); getWebhookPayloadsFieldBuilder(); getCurrentPageFieldBuilder(); + getCurrentFlowFieldBuilder(); getIntentFieldBuilder(); getMatchFieldBuilder(); getDiagnosticInfoFieldBuilder(); @@ -1774,25 +2174,40 @@ public Builder clear() { responseMessagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); + webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (webhookLatenciesBuilder_ == null) { + webhookLatencies_ = java.util.Collections.emptyList(); + } else { + webhookLatencies_ = null; + webhookLatenciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); } else { webhookStatuses_ = null; webhookStatusesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); } else { webhookPayloads_ = null; webhookPayloadsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); currentPage_ = null; if (currentPageBuilder_ != null) { currentPageBuilder_.dispose(); currentPageBuilder_ = null; } + currentFlow_ = null; + if (currentFlowBuilder_ != null) { + currentFlowBuilder_.dispose(); + currentFlowBuilder_ = null; + } intent_ = null; if (intentBuilder_ != null) { intentBuilder_.dispose(); @@ -1868,19 +2283,28 @@ private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3.QueryR } else { result.responseMessages_ = responseMessagesBuilder_.build(); } + if (webhookLatenciesBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + webhookLatencies_ = java.util.Collections.unmodifiableList(webhookLatencies_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.webhookLatencies_ = webhookLatencies_; + } else { + result.webhookLatencies_ = webhookLatenciesBuilder_.build(); + } if (webhookStatusesBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { webhookStatuses_ = java.util.Collections.unmodifiableList(webhookStatuses_); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); } result.webhookStatuses_ = webhookStatuses_; } else { result.webhookStatuses_ = webhookStatusesBuilder_.build(); } if (webhookPayloadsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { webhookPayloads_ = java.util.Collections.unmodifiableList(webhookPayloads_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); } result.webhookPayloads_ = webhookPayloads_; } else { @@ -1898,40 +2322,57 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3.QueryResult result) result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { + webhookIds_.makeImmutable(); + result.webhookIds_ = webhookIds_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + webhookDisplayNames_.makeImmutable(); + result.webhookDisplayNames_ = webhookDisplayNames_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + webhookTags_.makeImmutable(); + result.webhookTags_ = webhookTags_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { result.currentPage_ = currentPageBuilder_ == null ? currentPage_ : currentPageBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); + if (((from_bitField0_ & 0x00008000) != 0)) { + result.currentFlow_ = + currentFlowBuilder_ == null ? currentFlow_ : currentFlowBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { + result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00020000) != 0)) { result.intentDetectionConfidence_ = intentDetectionConfidence_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.match_ = matchBuilder_ == null ? match_ : matchBuilder_.build(); - to_bitField0_ |= 0x00000008; + to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.diagnosticInfo_ = diagnosticInfoBuilder_ == null ? diagnosticInfo_ : diagnosticInfoBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { result.sentimentAnalysisResult_ = sentimentAnalysisResultBuilder_ == null ? sentimentAnalysisResult_ : sentimentAnalysisResultBuilder_.build(); - to_bitField0_ |= 0x00000020; + to_bitField0_ |= 0x00000040; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00200000) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); - to_bitField0_ |= 0x00000040; + to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.allowAnswerFeedback_ = allowAnswerFeedback_; } result.bitField0_ |= to_bitField0_; @@ -2025,11 +2466,68 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { } } } + if (!other.webhookIds_.isEmpty()) { + if (webhookIds_.isEmpty()) { + webhookIds_ = other.webhookIds_; + bitField0_ |= 0x00000100; + } else { + ensureWebhookIdsIsMutable(); + webhookIds_.addAll(other.webhookIds_); + } + onChanged(); + } + if (!other.webhookDisplayNames_.isEmpty()) { + if (webhookDisplayNames_.isEmpty()) { + webhookDisplayNames_ = other.webhookDisplayNames_; + bitField0_ |= 0x00000200; + } else { + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.addAll(other.webhookDisplayNames_); + } + onChanged(); + } + if (webhookLatenciesBuilder_ == null) { + if (!other.webhookLatencies_.isEmpty()) { + if (webhookLatencies_.isEmpty()) { + webhookLatencies_ = other.webhookLatencies_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.addAll(other.webhookLatencies_); + } + onChanged(); + } + } else { + if (!other.webhookLatencies_.isEmpty()) { + if (webhookLatenciesBuilder_.isEmpty()) { + webhookLatenciesBuilder_.dispose(); + webhookLatenciesBuilder_ = null; + webhookLatencies_ = other.webhookLatencies_; + bitField0_ = (bitField0_ & ~0x00000400); + webhookLatenciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWebhookLatenciesFieldBuilder() + : null; + } else { + webhookLatenciesBuilder_.addAllMessages(other.webhookLatencies_); + } + } + } + if (!other.webhookTags_.isEmpty()) { + if (webhookTags_.isEmpty()) { + webhookTags_ = other.webhookTags_; + bitField0_ |= 0x00000800; + } else { + ensureWebhookTagsIsMutable(); + webhookTags_.addAll(other.webhookTags_); + } + onChanged(); + } if (webhookStatusesBuilder_ == null) { if (!other.webhookStatuses_.isEmpty()) { if (webhookStatuses_.isEmpty()) { webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); } else { ensureWebhookStatusesIsMutable(); webhookStatuses_.addAll(other.webhookStatuses_); @@ -2042,7 +2540,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { webhookStatusesBuilder_.dispose(); webhookStatusesBuilder_ = null; webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); webhookStatusesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookStatusesFieldBuilder() @@ -2056,7 +2554,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { if (!other.webhookPayloads_.isEmpty()) { if (webhookPayloads_.isEmpty()) { webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); } else { ensureWebhookPayloadsIsMutable(); webhookPayloads_.addAll(other.webhookPayloads_); @@ -2069,7 +2567,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { webhookPayloadsBuilder_.dispose(); webhookPayloadsBuilder_ = null; webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); webhookPayloadsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookPayloadsFieldBuilder() @@ -2082,6 +2580,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.QueryResult other) { if (other.hasCurrentPage()) { mergeCurrentPage(other.getCurrentPage()); } + if (other.hasCurrentFlow()) { + mergeCurrentFlow(other.getCurrentFlow()); + } if (other.hasIntent()) { mergeIntent(other.getIntent()); } @@ -2216,25 +2717,25 @@ public Builder mergeFrom( case 58: { input.readMessage(getCurrentPageFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; break; } // case 58 case 66: { input.readMessage(getIntentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; break; } // case 66 case 77: { intentDetectionConfidence_ = input.readFloat(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00020000; break; } // case 77 case 82: { input.readMessage(getDiagnosticInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; break; } // case 82 case 90: @@ -2273,21 +2774,21 @@ public Builder mergeFrom( case 122: { input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; break; } // case 122 case 138: { input.readMessage( getSentimentAnalysisResultFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00100000; break; } // case 138 case 170: { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00200000; break; } // case 170 case 186: @@ -2296,10 +2797,49 @@ public Builder mergeFrom( queryCase_ = 23; break; } // case 186 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookIdsIsMutable(); + webhookIds_.add(s); + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(s); + break; + } // case 210 + case 218: + { + com.google.protobuf.Duration m = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(m); + } else { + webhookLatenciesBuilder_.addMessage(m); + } + break; + } // case 218 + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookTagsIsMutable(); + webhookTags_.add(s); + break; + } // case 234 + case 250: + { + input.readMessage(getCurrentFlowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 250 case 256: { allowAnswerFeedback_ = input.readBool(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00400000; break; } // case 256 default: @@ -3882,96 +4422,970 @@ public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMes * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + */ + public java.util.List + getResponseMessagesOrBuilderList() { + if (responseMessagesBuilder_ != null) { + return responseMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responseMessages_); + } + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder() { + return getResponseMessagesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + */ + public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder( + int index) { + return getResponseMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + */ + public java.util.List + getResponseMessagesBuilderList() { + return getResponseMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder> + getResponseMessagesFieldBuilder() { + if (responseMessagesBuilder_ == null) { + responseMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.ResponseMessage, + com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>( + responseMessages_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + responseMessages_ = null; + } + return responseMessagesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList webhookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookIdsIsMutable() { + if (!webhookIds_.isModifiable()) { + webhookIds_ = new com.google.protobuf.LazyStringArrayList(webhookIds_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + public com.google.protobuf.ProtocolStringList getWebhookIdsList() { + webhookIds_.makeImmutable(); + return webhookIds_; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + public int getWebhookIdsCount() { + return webhookIds_.size(); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + public java.lang.String getWebhookIds(int index) { + return webhookIds_.get(index); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { + return webhookIds_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index to set the value at. + * @param value The webhookIds to set. + * @return This builder for chaining. + */ + public Builder setWebhookIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookIdsIsMutable(); + webhookIds_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param value The webhookIds to add. + * @return This builder for chaining. + */ + public Builder addWebhookIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookIdsIsMutable(); + webhookIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param values The webhookIds to add. + * @return This builder for chaining. + */ + public Builder addAllWebhookIds(java.lang.Iterable values) { + ensureWebhookIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookIds_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return This builder for chaining. + */ + public Builder clearWebhookIds() { + webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param value The bytes of the webhookIds to add. + * @return This builder for chaining. + */ + public Builder addWebhookIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWebhookIdsIsMutable(); + webhookIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookDisplayNamesIsMutable() { + if (!webhookDisplayNames_.isModifiable()) { + webhookDisplayNames_ = new com.google.protobuf.LazyStringArrayList(webhookDisplayNames_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { + webhookDisplayNames_.makeImmutable(); + return webhookDisplayNames_; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + public int getWebhookDisplayNamesCount() { + return webhookDisplayNames_.size(); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + public java.lang.String getWebhookDisplayNames(int index) { + return webhookDisplayNames_.get(index); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { + return webhookDisplayNames_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index to set the value at. + * @param value The webhookDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setWebhookDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param value The webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addWebhookDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param values The webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllWebhookDisplayNames(java.lang.Iterable values) { + ensureWebhookDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookDisplayNames_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return This builder for chaining. + */ + public Builder clearWebhookDisplayNames() { + webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param value The bytes of the webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addWebhookDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List webhookLatencies_ = + java.util.Collections.emptyList(); + + private void ensureWebhookLatenciesIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + webhookLatencies_ = + new java.util.ArrayList(webhookLatencies_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + webhookLatenciesBuilder_; + + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List getWebhookLatenciesList() { + if (webhookLatenciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webhookLatencies_); + } else { + return webhookLatenciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public int getWebhookLatenciesCount() { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.size(); + } else { + return webhookLatenciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration getWebhookLatencies(int index) { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.get(index); + } else { + return webhookLatenciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder setWebhookLatencies(int index, com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.set(index, value); + onChanged(); + } else { + webhookLatenciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder setWebhookLatencies( + int index, com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.set(index, builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(value); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(int index, com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(index, value); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies( + int index, com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(index, builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addAllWebhookLatencies( + java.lang.Iterable values) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookLatencies_); + onChanged(); + } else { + webhookLatenciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder clearWebhookLatencies() { + if (webhookLatenciesBuilder_ == null) { + webhookLatencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + webhookLatenciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder removeWebhookLatencies(int index) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.remove(index); + onChanged(); + } else { + webhookLatenciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder getWebhookLatenciesBuilder(int index) { + return getWebhookLatenciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.get(index); + } else { + return webhookLatenciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List + getWebhookLatenciesOrBuilderList() { + if (webhookLatenciesBuilder_ != null) { + return webhookLatenciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webhookLatencies_); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder() { + return getWebhookLatenciesFieldBuilder() + .addBuilder(com.google.protobuf.Duration.getDefaultInstance()); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder(int index) { + return getWebhookLatenciesFieldBuilder() + .addBuilder(index, com.google.protobuf.Duration.getDefaultInstance()); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List getWebhookLatenciesBuilderList() { + return getWebhookLatenciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWebhookLatenciesFieldBuilder() { + if (webhookLatenciesBuilder_ == null) { + webhookLatenciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + webhookLatencies_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + webhookLatencies_ = null; + } + return webhookLatenciesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList webhookTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookTagsIsMutable() { + if (!webhookTags_.isModifiable()) { + webhookTags_ = new com.google.protobuf.LazyStringArrayList(webhookTags_); + } + bitField0_ |= 0x00000800; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + public com.google.protobuf.ProtocolStringList getWebhookTagsList() { + webhookTags_.makeImmutable(); + return webhookTags_; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + public int getWebhookTagsCount() { + return webhookTags_.size(); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + public java.lang.String getWebhookTags(int index) { + return webhookTags_.get(index); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { + return webhookTags_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index to set the value at. + * @param value The webhookTags to set. + * @return This builder for chaining. + */ + public Builder setWebhookTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookTagsIsMutable(); + webhookTags_.set(index, value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * repeated string webhook_tags = 29; + * + * @param value The webhookTags to add. + * @return This builder for chaining. */ - public java.util.List - getResponseMessagesOrBuilderList() { - if (responseMessagesBuilder_ != null) { - return responseMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responseMessages_); + public Builder addWebhookTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureWebhookTagsIsMutable(); + webhookTags_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * repeated string webhook_tags = 29; + * + * @param values The webhookTags to add. + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder() { - return getResponseMessagesFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); + public Builder addAllWebhookTags(java.lang.Iterable values) { + ensureWebhookTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookTags_); + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * repeated string webhook_tags = 29; + * + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addResponseMessagesBuilder( - int index) { - return getResponseMessagesFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance()); + public Builder clearWebhookTags() { + webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + ; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage response_messages = 4; + * repeated string webhook_tags = 29; + * + * @param value The bytes of the webhookTags to add. + * @return This builder for chaining. */ - public java.util.List - getResponseMessagesBuilderList() { - return getResponseMessagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder> - getResponseMessagesFieldBuilder() { - if (responseMessagesBuilder_ == null) { - responseMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3.ResponseMessage, - com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>( - responseMessages_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - responseMessages_ = null; + public Builder addWebhookTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return responseMessagesBuilder_; + checkByteStringIsUtf8(value); + ensureWebhookTagsIsMutable(); + webhookTags_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; } private java.util.List webhookStatuses_ = java.util.Collections.emptyList(); private void ensureWebhookStatusesIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { + if (!((bitField0_ & 0x00001000) != 0)) { webhookStatuses_ = new java.util.ArrayList(webhookStatuses_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00001000; } } @@ -4182,7 +5596,7 @@ public Builder addAllWebhookStatuses( public Builder clearWebhookStatuses() { if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { webhookStatusesBuilder_.clear(); @@ -4302,7 +5716,7 @@ public java.util.List getWebhookStatusesBuilderLi com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( webhookStatuses_, - ((bitField0_ & 0x00000100) != 0), + ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); webhookStatuses_ = null; @@ -4314,9 +5728,9 @@ public java.util.List getWebhookStatusesBuilderLi java.util.Collections.emptyList(); private void ensureWebhookPayloadsIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { + if (!((bitField0_ & 0x00002000) != 0)) { webhookPayloads_ = new java.util.ArrayList(webhookPayloads_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00002000; } } @@ -4564,7 +5978,7 @@ public Builder addAllWebhookPayloads( public Builder clearWebhookPayloads() { if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); } else { webhookPayloadsBuilder_.clear(); @@ -4707,7 +6121,7 @@ public java.util.List getWebhookPayloadsBuil com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( webhookPayloads_, - ((bitField0_ & 0x00000200) != 0), + ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); webhookPayloads_ = null; @@ -4735,7 +6149,7 @@ public java.util.List getWebhookPayloadsBuil * @return Whether the currentPage field is set. */ public boolean hasCurrentPage() { - return ((bitField0_ & 0x00000400) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -4779,7 +6193,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { } else { currentPageBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4800,7 +6214,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder bui } else { currentPageBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -4817,7 +6231,7 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3.Page.Builder bui */ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { if (currentPageBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) + if (((bitField0_ & 0x00004000) != 0) && currentPage_ != null && currentPage_ != com.google.cloud.dialogflow.cx.v3.Page.getDefaultInstance()) { getCurrentPageBuilder().mergeFrom(value); @@ -4828,7 +6242,7 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { currentPageBuilder_.mergeFrom(value); } if (currentPage_ != null) { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -4845,7 +6259,7 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3.Page value) { * .google.cloud.dialogflow.cx.v3.Page current_page = 7; */ public Builder clearCurrentPage() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00004000); currentPage_ = null; if (currentPageBuilder_ != null) { currentPageBuilder_.dispose(); @@ -4866,7 +6280,7 @@ public Builder clearCurrentPage() { * .google.cloud.dialogflow.cx.v3.Page current_page = 7; */ public com.google.cloud.dialogflow.cx.v3.Page.Builder getCurrentPageBuilder() { - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; onChanged(); return getCurrentPageFieldBuilder().getBuilder(); } @@ -4918,6 +6332,209 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() return currentPageBuilder_; } + private com.google.cloud.dialogflow.cx.v3.Flow currentFlow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder> + currentFlowBuilder_; + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return Whether the currentFlow field is set. + */ + public boolean hasCurrentFlow() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return The currentFlow. + */ + public com.google.cloud.dialogflow.cx.v3.Flow getCurrentFlow() { + if (currentFlowBuilder_ == null) { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance() + : currentFlow_; + } else { + return currentFlowBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { + if (currentFlowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentFlow_ = value; + } else { + currentFlowBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow.Builder builderForValue) { + if (currentFlowBuilder_ == null) { + currentFlow_ = builderForValue.build(); + } else { + currentFlowBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public Builder mergeCurrentFlow(com.google.cloud.dialogflow.cx.v3.Flow value) { + if (currentFlowBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && currentFlow_ != null + && currentFlow_ != com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance()) { + getCurrentFlowBuilder().mergeFrom(value); + } else { + currentFlow_ = value; + } + } else { + currentFlowBuilder_.mergeFrom(value); + } + if (currentFlow_ != null) { + bitField0_ |= 0x00008000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public Builder clearCurrentFlow() { + bitField0_ = (bitField0_ & ~0x00008000); + currentFlow_ = null; + if (currentFlowBuilder_ != null) { + currentFlowBuilder_.dispose(); + currentFlowBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public com.google.cloud.dialogflow.cx.v3.Flow.Builder getCurrentFlowBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getCurrentFlowFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + public com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getCurrentFlowOrBuilder() { + if (currentFlowBuilder_ != null) { + return currentFlowBuilder_.getMessageOrBuilder(); + } else { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3.Flow.getDefaultInstance() + : currentFlow_; + } + } + /** + * + * + *
+     * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder> + getCurrentFlowFieldBuilder() { + if (currentFlowBuilder_ == null) { + currentFlowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3.Flow, + com.google.cloud.dialogflow.cx.v3.Flow.Builder, + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder>( + getCurrentFlow(), getParentForChildren(), isClean()); + currentFlow_ = null; + } + return currentFlowBuilder_; + } + private com.google.cloud.dialogflow.cx.v3.Intent intent_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.Intent, @@ -4939,12 +6556,12 @@ public com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder() * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return Whether the intent field is set. */ @java.lang.Deprecated public boolean hasIntent() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4961,7 +6578,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return The intent. */ @java.lang.Deprecated @@ -4998,7 +6615,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { } else { intentBuilder_.setMessage(value); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5023,7 +6640,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builde } else { intentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5044,7 +6661,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3.Intent.Builder builde @java.lang.Deprecated public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { if (intentBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) + if (((bitField0_ & 0x00010000) != 0) && intent_ != null && intent_ != com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance()) { getIntentBuilder().mergeFrom(value); @@ -5055,7 +6672,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { intentBuilder_.mergeFrom(value); } if (intent_ != null) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -5076,7 +6693,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3.Intent value) { */ @java.lang.Deprecated public Builder clearIntent() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00010000); intent_ = null; if (intentBuilder_ != null) { intentBuilder_.dispose(); @@ -5101,7 +6718,7 @@ public Builder clearIntent() { */ @java.lang.Deprecated public com.google.cloud.dialogflow.cx.v3.Intent.Builder getIntentBuilder() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return getIntentFieldBuilder().getBuilder(); } @@ -5179,7 +6796,7 @@ public com.google.cloud.dialogflow.cx.v3.IntentOrBuilder getIntentOrBuilder() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=967 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5205,7 +6822,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=967 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5213,7 +6830,7 @@ public float getIntentDetectionConfidence() { public Builder setIntentDetectionConfidence(float value) { intentDetectionConfidence_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5235,12 +6852,12 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=967 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearIntentDetectionConfidence() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00020000); intentDetectionConfidence_ = 0F; onChanged(); return this; @@ -5264,7 +6881,7 @@ public Builder clearIntentDetectionConfidence() { * @return Whether the match field is set. */ public boolean hasMatch() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -5304,7 +6921,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match value) { } else { matchBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5323,7 +6940,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match.Builder builderF } else { matchBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5338,7 +6955,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3.Match.Builder builderF */ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { if (matchBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00040000) != 0) && match_ != null && match_ != com.google.cloud.dialogflow.cx.v3.Match.getDefaultInstance()) { getMatchBuilder().mergeFrom(value); @@ -5349,7 +6966,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { matchBuilder_.mergeFrom(value); } if (match_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -5364,7 +6981,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3.Match value) { * .google.cloud.dialogflow.cx.v3.Match match = 15; */ public Builder clearMatch() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00040000); match_ = null; if (matchBuilder_ != null) { matchBuilder_.dispose(); @@ -5383,7 +7000,7 @@ public Builder clearMatch() { * .google.cloud.dialogflow.cx.v3.Match match = 15; */ public com.google.cloud.dialogflow.cx.v3.Match.Builder getMatchBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return getMatchFieldBuilder().getBuilder(); } @@ -5465,7 +7082,7 @@ public com.google.cloud.dialogflow.cx.v3.MatchOrBuilder getMatchOrBuilder() { * @return Whether the diagnosticInfo field is set. */ public boolean hasDiagnosticInfo() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -5537,7 +7154,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { } else { diagnosticInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5572,7 +7189,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa } else { diagnosticInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5603,7 +7220,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa */ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { if (diagnosticInfoBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00080000) != 0) && diagnosticInfo_ != null && diagnosticInfo_ != com.google.protobuf.Struct.getDefaultInstance()) { getDiagnosticInfoBuilder().mergeFrom(value); @@ -5614,7 +7231,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { diagnosticInfoBuilder_.mergeFrom(value); } if (diagnosticInfo_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -5645,7 +7262,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { * .google.protobuf.Struct diagnostic_info = 10; */ public Builder clearDiagnosticInfo() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00080000); diagnosticInfo_ = null; if (diagnosticInfoBuilder_ != null) { diagnosticInfoBuilder_.dispose(); @@ -5680,7 +7297,7 @@ public Builder clearDiagnosticInfo() { * .google.protobuf.Struct diagnostic_info = 10; */ public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return getDiagnosticInfoFieldBuilder().getBuilder(); } @@ -5782,7 +7399,7 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * @return Whether the sentimentAnalysisResult field is set. */ public boolean hasSentimentAnalysisResult() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00100000) != 0); } /** * @@ -5831,7 +7448,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5855,7 +7472,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00100000; onChanged(); return this; } @@ -5875,7 +7492,7 @@ public Builder setSentimentAnalysisResult( public Builder mergeSentimentAnalysisResult( com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult value) { if (sentimentAnalysisResultBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00100000) != 0) && sentimentAnalysisResult_ != null && sentimentAnalysisResult_ != com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.getDefaultInstance()) { @@ -5887,7 +7504,7 @@ public Builder mergeSentimentAnalysisResult( sentimentAnalysisResultBuilder_.mergeFrom(value); } if (sentimentAnalysisResult_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00100000; onChanged(); } return this; @@ -5906,7 +7523,7 @@ public Builder mergeSentimentAnalysisResult( * */ public Builder clearSentimentAnalysisResult() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00100000); sentimentAnalysisResult_ = null; if (sentimentAnalysisResultBuilder_ != null) { sentimentAnalysisResultBuilder_.dispose(); @@ -5930,7 +7547,7 @@ public Builder clearSentimentAnalysisResult() { */ public com.google.cloud.dialogflow.cx.v3.SentimentAnalysisResult.Builder getSentimentAnalysisResultBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00100000; onChanged(); return getSentimentAnalysisResultFieldBuilder().getBuilder(); } @@ -6009,7 +7626,7 @@ public Builder clearSentimentAnalysisResult() { * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -6057,7 +7674,7 @@ public Builder setAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSet } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6081,7 +7698,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -6100,7 +7717,7 @@ public Builder setAdvancedSettings( */ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00200000) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3.AdvancedSettings.getDefaultInstance()) { @@ -6112,7 +7729,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00200000; onChanged(); } return this; @@ -6131,7 +7748,7 @@ public Builder mergeAdvancedSettings(com.google.cloud.dialogflow.cx.v3.AdvancedS * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00200000); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -6154,7 +7771,7 @@ public Builder clearAdvancedSettings() { * .google.cloud.dialogflow.cx.v3.AdvancedSettings advanced_settings = 21; */ public com.google.cloud.dialogflow.cx.v3.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00200000; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -6244,7 +7861,7 @@ public boolean getAllowAnswerFeedback() { public Builder setAllowAnswerFeedback(boolean value) { allowAnswerFeedback_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6261,7 +7878,7 @@ public Builder setAllowAnswerFeedback(boolean value) { * @return This builder for chaining. */ public Builder clearAllowAnswerFeedback() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00400000); allowAnswerFeedback_ = false; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java index 27599c583953..1c61a08c3edd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/QueryResultOrBuilder.java @@ -405,6 +405,211 @@ public interface QueryResultOrBuilder com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOrBuilder( int index); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + java.util.List getWebhookIdsList(); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + int getWebhookIdsCount(); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + java.lang.String getWebhookIds(int index); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + com.google.protobuf.ByteString getWebhookIdsBytes(int index); + + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + java.util.List getWebhookDisplayNamesList(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + int getWebhookDisplayNamesCount(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + java.lang.String getWebhookDisplayNames(int index); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index); + + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + java.util.List getWebhookLatenciesList(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + com.google.protobuf.Duration getWebhookLatencies(int index); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + int getWebhookLatenciesCount(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + java.util.List + getWebhookLatenciesOrBuilderList(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index); + + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + java.util.List getWebhookTagsList(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + int getWebhookTagsCount(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + java.lang.String getWebhookTags(int index); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + com.google.protobuf.ByteString getWebhookTagsBytes(int index); + /** * * @@ -563,6 +768,47 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr */ com.google.cloud.dialogflow.cx.v3.PageOrBuilder getCurrentPageOrBuilder(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return Whether the currentFlow field is set. + */ + boolean hasCurrentFlow(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + * + * @return The currentFlow. + */ + com.google.cloud.dialogflow.cx.v3.Flow getCurrentFlow(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3.Flow current_flow = 31; + */ + com.google.cloud.dialogflow.cx.v3.FlowOrBuilder getCurrentFlowOrBuilder(); + /** * * @@ -578,7 +824,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -598,7 +844,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * .google.cloud.dialogflow.cx.v3.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3/session.proto;l=919 + * google/cloud/dialogflow/cx/v3/session.proto;l=956 * @return The intent. */ @java.lang.Deprecated @@ -638,7 +884,7 @@ com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getResponseMessagesOr * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=930 + * deprecated. See google/cloud/dialogflow/cx/v3/session.proto;l=967 * @return The intentDetectionConfidence. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java index a375ca2a7352..0097de57e941 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SessionProto.java @@ -160,259 +160,273 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "roto\032\031google/api/resource.proto\0325google/" + "cloud/dialogflow/cx/v3/advanced_settings" + ".proto\0320google/cloud/dialogflow/cx/v3/au" - + "dio_config.proto\032*google/cloud/dialogflo" - + "w/cx/v3/intent.proto\032(google/cloud/dialo" - + "gflow/cx/v3/page.proto\0324google/cloud/dia" - + "logflow/cx/v3/response_message.proto\0327go" - + "ogle/cloud/dialogflow/cx/v3/session_enti" - + "ty_type.proto\032\036google/protobuf/duration." - + "proto\032 google/protobuf/field_mask.proto\032" - + "\034google/protobuf/struct.proto\032\027google/rp" - + "c/status.proto\032\030google/type/latlng.proto" - + "\"\324\002\n\016AnswerFeedback\022I\n\006rating\030\001 \001(\01624.go" - + "ogle.cloud.dialogflow.cx.v3.AnswerFeedba" - + "ck.RatingB\003\340A\001\022V\n\rrating_reason\030\002 \001(\0132:." + + "dio_config.proto\032(google/cloud/dialogflo" + + "w/cx/v3/flow.proto\032*google/cloud/dialogf" + + "low/cx/v3/intent.proto\032(google/cloud/dia" + + "logflow/cx/v3/page.proto\0324google/cloud/d" + + "ialogflow/cx/v3/response_message.proto\0327" + + "google/cloud/dialogflow/cx/v3/session_en" + + "tity_type.proto\032\036google/protobuf/duratio" + + "n.proto\032 google/protobuf/field_mask.prot" + + "o\032\034google/protobuf/struct.proto\032\027google/" + + "rpc/status.proto\032\030google/type/latlng.pro" + + "to\"\324\002\n\016AnswerFeedback\022I\n\006rating\030\001 \001(\01624." + "google.cloud.dialogflow.cx.v3.AnswerFeed" - + "back.RatingReasonB\003\340A\001\022\032\n\rcustom_rating\030" - + "\003 \001(\tB\003\340A\001\032A\n\014RatingReason\022\032\n\rreason_lab" - + "els\030\003 \003(\tB\003\340A\001\022\025\n\010feedback\030\002 \001(\tB\003\340A\001\"@\n" - + "\006Rating\022\026\n\022RATING_UNSPECIFIED\020\000\022\r\n\tTHUMB" - + "S_UP\020\001\022\017\n\013THUMBS_DOWN\020\002\"\366\001\n\033SubmitAnswer" - + "FeedbackRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A#" - + "\n!dialogflow.googleapis.com/Session\022\030\n\013r" - + "esponse_id\030\002 \001(\tB\003\340A\002\022K\n\017answer_feedback" - + "\030\003 \001(\0132-.google.cloud.dialogflow.cx.v3.A" - + "nswerFeedbackB\003\340A\002\0224\n\013update_mask\030\004 \001(\0132" - + "\032.google.protobuf.FieldMaskB\003\340A\001\"\253\002\n\023Det" - + "ectIntentRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372A" - + "#\n!dialogflow.googleapis.com/Session\022D\n\014" - + "query_params\030\002 \001(\0132..google.cloud.dialog" - + "flow.cx.v3.QueryParameters\022C\n\013query_inpu" - + "t\030\003 \001(\0132).google.cloud.dialogflow.cx.v3." - + "QueryInputB\003\340A\002\022M\n\023output_audio_config\030\004" - + " \001(\01320.google.cloud.dialogflow.cx.v3.Out" - + "putAudioConfig\"\216\003\n\024DetectIntentResponse\022" - + "\023\n\013response_id\030\001 \001(\t\022@\n\014query_result\030\002 \001" - + "(\0132*.google.cloud.dialogflow.cx.v3.Query" - + "Result\022\024\n\014output_audio\030\004 \001(\014\022M\n\023output_a" - + "udio_config\030\005 \001(\01320.google.cloud.dialogf" - + "low.cx.v3.OutputAudioConfig\022W\n\rresponse_" - + "type\030\006 \001(\0162@.google.cloud.dialogflow.cx." - + "v3.DetectIntentResponse.ResponseType\022\032\n\022" - + "allow_cancellation\030\007 \001(\010\"E\n\014ResponseType" - + "\022\035\n\031RESPONSE_TYPE_UNSPECIFIED\020\000\022\013\n\007PARTI" - + "AL\020\001\022\t\n\005FINAL\020\002\"\361\002\n\034StreamingDetectInten" - + "tRequest\0227\n\007session\030\001 \001(\tB&\372A#\n!dialogfl" - + "ow.googleapis.com/Session\022D\n\014query_param" - + "s\030\002 \001(\0132..google.cloud.dialogflow.cx.v3." - + "QueryParameters\022C\n\013query_input\030\003 \001(\0132).g" - + "oogle.cloud.dialogflow.cx.v3.QueryInputB" - + "\003\340A\002\022M\n\023output_audio_config\030\004 \001(\01320.goog" - + "le.cloud.dialogflow.cx.v3.OutputAudioCon" - + "fig\022\037\n\027enable_partial_response\030\005 \001(\010\022\035\n\025" - + "enable_debugging_info\030\010 \001(\010\"\260\007\n\036CloudCon" - + "versationDebuggingInfo\022\031\n\021audio_data_chu" - + "nks\030\001 \001(\005\0229\n\026result_end_time_offset\030\002 \001(" - + "\0132\031.google.protobuf.Duration\0227\n\024first_au" - + "dio_duration\030\003 \001(\0132\031.google.protobuf.Dur" - + "ation\022\030\n\020single_utterance\030\005 \001(\010\022C\n speec" - + "h_partial_results_end_times\030\006 \003(\0132\031.goog" - + "le.protobuf.Duration\022A\n\036speech_final_res" - + "ults_end_times\030\007 \003(\0132\031.google.protobuf.D" - + "uration\022\031\n\021partial_responses\030\010 \001(\005\022,\n$sp" - + "eaker_id_passive_latency_ms_offset\030\t \001(\005" - + "\022\037\n\027bargein_event_triggered\030\n \001(\010\022\037\n\027spe" - + "ech_single_utterance\030\013 \001(\010\022=\n\032dtmf_parti" - + "al_results_times\030\014 \003(\0132\031.google.protobuf" - + ".Duration\022;\n\030dtmf_final_results_times\030\r " - + "\003(\0132\031.google.protobuf.Duration\022C\n single" - + "_utterance_end_time_offset\030\016 \001(\0132\031.googl" - + "e.protobuf.Duration\0224\n\021no_speech_timeout" - + "\030\017 \001(\0132\031.google.protobuf.Duration\0226\n\023end" - + "pointing_timeout\030\023 \001(\0132\031.google.protobuf" - + ".Duration\022\025\n\ris_input_text\030\020 \001(\010\022@\n\035clie" - + "nt_half_close_time_offset\030\021 \001(\0132\031.google" - + ".protobuf.Duration\022J\n\'client_half_close_" - + "streaming_time_offset\030\022 \001(\0132\031.google.pro" - + "tobuf.Duration\"\262\002\n\035StreamingDetectIntent" - + "Response\022W\n\022recognition_result\030\001 \001(\01329.g" - + "oogle.cloud.dialogflow.cx.v3.StreamingRe" - + "cognitionResultH\000\022U\n\026detect_intent_respo" - + "nse\030\002 \001(\01323.google.cloud.dialogflow.cx.v" - + "3.DetectIntentResponseH\000\022U\n\016debugging_in" - + "fo\030\004 \001(\0132=.google.cloud.dialogflow.cx.v3" - + ".CloudConversationDebuggingInfoB\n\n\010respo" - + "nse\"\266\003\n\032StreamingRecognitionResult\022[\n\014me" - + "ssage_type\030\001 \001(\0162E.google.cloud.dialogfl" - + "ow.cx.v3.StreamingRecognitionResult.Mess" - + "ageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030" - + "\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability\030\006" - + " \001(\002\022G\n\020speech_word_info\030\007 \003(\0132-.google." - + "cloud.dialogflow.cx.v3.SpeechWordInfo\0224\n" - + "\021speech_end_offset\030\010 \001(\0132\031.google.protob" - + "uf.Duration\022\025\n\rlanguage_code\030\n \001(\t\"X\n\013Me" - + "ssageType\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020\000\022" - + "\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_UTTERAN" - + "CE\020\002\"\213\006\n\017QueryParameters\022\021\n\ttime_zone\030\001 " - + "\001(\t\022)\n\014geo_location\030\002 \001(\0132\023.google.type." - + "LatLng\022N\n\024session_entity_types\030\003 \003(\01320.g" - + "oogle.cloud.dialogflow.cx.v3.SessionEnti" - + "tyType\022(\n\007payload\030\004 \001(\0132\027.google.protobu" - + "f.Struct\022+\n\nparameters\030\005 \001(\0132\027.google.pr" - + "otobuf.Struct\0229\n\014current_page\030\006 \001(\tB#\372A " - + "\n\036dialogflow.googleapis.com/Page\022\027\n\017disa" - + "ble_webhook\030\007 \001(\010\022$\n\034analyze_query_text_" - + "sentiment\030\010 \001(\010\022[\n\017webhook_headers\030\n \003(\013" - + "2B.google.cloud.dialogflow.cx.v3.QueryPa" - + "rameters.WebhookHeadersEntry\022=\n\rflow_ver" - + "sions\030\016 \003(\tB&\372A#\n!dialogflow.googleapis." - + "com/Version\022\017\n\007channel\030\017 \001(\t\0223\n\013session_" - + "ttl\030\020 \001(\0132\031.google.protobuf.DurationB\003\340A" - + "\001\0227\n\021end_user_metadata\030\022 \001(\0132\027.google.pr" - + "otobuf.StructB\003\340A\001\022G\n\rsearch_config\030\024 \001(" - + "\0132+.google.cloud.dialogflow.cx.v3.Search" - + "ConfigB\003\340A\001\0325\n\023WebhookHeadersEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\232\001\n\014SearchCon" - + "fig\022C\n\013boost_specs\030\001 \003(\0132).google.cloud." - + "dialogflow.cx.v3.BoostSpecsB\003\340A\001\022E\n\014filt" - + "er_specs\030\002 \003(\0132*.google.cloud.dialogflow" - + ".cx.v3.FilterSpecsB\003\340A\001\"\256\001\n\tBoostSpec\022_\n" - + "\025condition_boost_specs\030\001 \003(\0132;.google.cl" - + "oud.dialogflow.cx.v3.BoostSpec.Condition" - + "BoostSpecB\003\340A\001\032@\n\022ConditionBoostSpec\022\026\n\t" - + "condition\030\001 \001(\tB\003\340A\001\022\022\n\005boost\030\002 \001(\002B\003\340A\001" - + "\"\220\001\n\nBoostSpecs\022E\n\013data_stores\030\001 \003(\tB0\340A" - + "\001\372A*\n(discoveryengine.googleapis.com/Dat" - + "aStore\022;\n\004spec\030\002 \003(\0132(.google.cloud.dial" - + "ogflow.cx.v3.BoostSpecB\003\340A\001\"i\n\013FilterSpe" - + "cs\022E\n\013data_stores\030\001 \003(\tB0\340A\001\372A*\n(discove" - + "ryengine.googleapis.com/DataStore\022\023\n\006fil" - + "ter\030\002 \001(\tB\003\340A\001\"\333\002\n\nQueryInput\0228\n\004text\030\002 " - + "\001(\0132(.google.cloud.dialogflow.cx.v3.Text" - + "InputH\000\022<\n\006intent\030\003 \001(\0132*.google.cloud.d" - + "ialogflow.cx.v3.IntentInputH\000\022:\n\005audio\030\005" - + " \001(\0132).google.cloud.dialogflow.cx.v3.Aud" - + "ioInputH\000\022:\n\005event\030\006 \001(\0132).google.cloud." - + "dialogflow.cx.v3.EventInputH\000\0228\n\004dtmf\030\007 " - + "\001(\0132(.google.cloud.dialogflow.cx.v3.Dtmf" - + "InputH\000\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007\n\005i" - + "nput\"\214\007\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022?\n\016" - + "trigger_intent\030\013 \001(\tB%\372A\"\n dialogflow.go" - + "ogleapis.com/IntentH\000\022\024\n\ntranscript\030\014 \001(" - + "\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\0228\n\004dtmf\030\027 \001" - + "(\0132(.google.cloud.dialogflow.cx.v3.DtmfI" - + "nputH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\nparamet" - + "ers\030\003 \001(\0132\027.google.protobuf.Struct\022I\n\021re" - + "sponse_messages\030\004 \003(\0132..google.cloud.dia" - + "logflow.cx.v3.ResponseMessage\022,\n\020webhook" - + "_statuses\030\r \003(\0132\022.google.rpc.Status\0221\n\020w" - + "ebhook_payloads\030\006 \003(\0132\027.google.protobuf." - + "Struct\0229\n\014current_page\030\007 \001(\0132#.google.cl" - + "oud.dialogflow.cx.v3.Page\0229\n\006intent\030\010 \001(" - + "\0132%.google.cloud.dialogflow.cx.v3.Intent" - + "B\002\030\001\022\'\n\033intent_detection_confidence\030\t \001(" - + "\002B\002\030\001\0223\n\005match\030\017 \001(\0132$.google.cloud.dial" - + "ogflow.cx.v3.Match\0220\n\017diagnostic_info\030\n " - + "\001(\0132\027.google.protobuf.Struct\022Y\n\031sentimen" - + "t_analysis_result\030\021 \001(\01326.google.cloud.d" - + "ialogflow.cx.v3.SentimentAnalysisResult\022" - + "J\n\021advanced_settings\030\025 \001(\0132/.google.clou" - + "d.dialogflow.cx.v3.AdvancedSettings\022\035\n\025a" - + "llow_answer_feedback\030 \001(\010B\007\n\005query\"\036\n\tT" - + "extInput\022\021\n\004text\030\001 \001(\tB\003\340A\002\"G\n\013IntentInp" - + "ut\0228\n\006intent\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.g" - + "oogleapis.com/Intent\"a\n\nAudioInput\022D\n\006co" - + "nfig\030\001 \001(\0132/.google.cloud.dialogflow.cx." - + "v3.InputAudioConfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"" - + "\033\n\nEventInput\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInpu" - + "t\022\016\n\006digits\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"" - + "\361\002\n\005Match\0225\n\006intent\030\001 \001(\0132%.google.cloud" - + ".dialogflow.cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022" - + "+\n\nparameters\030\002 \001(\0132\027.google.protobuf.St" - + "ruct\022\026\n\016resolved_input\030\003 \001(\t\022B\n\nmatch_ty" - + "pe\030\004 \001(\0162..google.cloud.dialogflow.cx.v3" - + ".Match.MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n" - + "\tMatchType\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n" - + "\n\006INTENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMET" - + "ER_FILLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005" - + "\022\t\n\005EVENT\020\006\"\376\001\n\022MatchIntentRequest\022:\n\007se" - + "ssion\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleap" - + "is.com/Session\022D\n\014query_params\030\002 \001(\0132..g" - + "oogle.cloud.dialogflow.cx.v3.QueryParame" - + "ters\022C\n\013query_input\030\003 \001(\0132).google.cloud" - + ".dialogflow.cx.v3.QueryInputB\003\340A\002\022!\n\031per" - + "sist_parameter_changes\030\005 \001(\010\"\220\002\n\023MatchIn" - + "tentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_" - + "intent\030\002 \001(\tB%\372A\"\n dialogflow.googleapis" - + ".com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rt" - + "rigger_event\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\0132$." - + "google.cloud.dialogflow.cx.v3.Match\0229\n\014c" - + "urrent_page\030\005 \001(\0132#.google.cloud.dialogf" - + "low.cx.v3.PageB\007\n\005query\"\353\001\n\024FulfillInten" - + "tRequest\022O\n\024match_intent_request\030\001 \001(\01321" - + ".google.cloud.dialogflow.cx.v3.MatchInte" - + "ntRequest\0223\n\005match\030\002 \001(\0132$.google.cloud." - + "dialogflow.cx.v3.Match\022M\n\023output_audio_c" - + "onfig\030\003 \001(\01320.google.cloud.dialogflow.cx" - + ".v3.OutputAudioConfig\"\323\001\n\025FulfillIntentR" - + "esponse\022\023\n\013response_id\030\001 \001(\t\022@\n\014query_re" - + "sult\030\002 \001(\0132*.google.cloud.dialogflow.cx." - + "v3.QueryResult\022\024\n\014output_audio\030\003 \001(\014\022M\n\023" - + "output_audio_config\030\004 \001(\01320.google.cloud" - + ".dialogflow.cx.v3.OutputAudioConfig\";\n\027S" - + "entimentAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n" - + "\tmagnitude\030\002 \001(\0022\242\013\n\010Sessions\022\246\002\n\014Detect" - + "Intent\0222.google.cloud.dialogflow.cx.v3.D" - + "etectIntentRequest\0323.google.cloud.dialog" - + "flow.cx.v3.DetectIntentResponse\"\254\001\202\323\344\223\002\245" - + "\001\"E/v3/{session=projects/*/locations/*/a" - + "gents/*/sessions/*}:detectIntent:\001*ZY\"T/" - + "v3/{session=projects/*/locations/*/agent" - + "s/*/environments/*/sessions/*}:detectInt" - + "ent:\001*\022\230\001\n\025StreamingDetectIntent\022;.googl" - + "e.cloud.dialogflow.cx.v3.StreamingDetect" - + "IntentRequest\032<.google.cloud.dialogflow." - + "cx.v3.StreamingDetectIntentResponse\"\000(\0010" - + "\001\022\241\002\n\013MatchIntent\0221.google.cloud.dialogf" - + "low.cx.v3.MatchIntentRequest\0322.google.cl" - + "oud.dialogflow.cx.v3.MatchIntentResponse" - + "\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=projects/*/loca" - + "tions/*/agents/*/sessions/*}:matchIntent" - + ":\001*ZX\"S/v3/{session=projects/*/locations" - + "/*/agents/*/environments/*/sessions/*}:m" - + "atchIntent:\001*\022\325\002\n\rFulfillIntent\0223.google" - + ".cloud.dialogflow.cx.v3.FulfillIntentReq" - + "uest\0324.google.cloud.dialogflow.cx.v3.Ful" - + "fillIntentResponse\"\330\001\202\323\344\223\002\321\001\"[/v3/{match" - + "_intent_request.session=projects/*/locat" - + "ions/*/agents/*/sessions/*}:fulfillInten" - + "t:\001*Zo\"j/v3/{match_intent_request.sessio" - + "n=projects/*/locations/*/agents/*/enviro" - + "nments/*/sessions/*}:fulfillIntent:\001*\022\333\001" - + "\n\024SubmitAnswerFeedback\022:.google.cloud.di" - + "alogflow.cx.v3.SubmitAnswerFeedbackReque" - + "st\032-.google.cloud.dialogflow.cx.v3.Answe" - + "rFeedback\"X\202\323\344\223\002R\"M/v3/{session=projects" - + "/*/locations/*/agents/*/sessions/*}:subm" - + "itAnswerFeedback:\001*\032x\312A\031dialogflow.googl" - + "eapis.com\322AYhttps://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/dialogflowB\323\004\n!com.google.clo" - + "ud.dialogflow.cx.v3B\014SessionProtoP\001Z1clo" - + "ud.google.com/go/dialogflow/cx/apiv3/cxp" - + "b;cxpb\370\001\001\242\002\002DF\252\002\035Google.Cloud.Dialogflow" - + ".Cx.V3\352\002!Google::Cloud::Dialogflow::CX::" - + "V3\352A\324\001\n!dialogflow.googleapis.com/Sessio" - + "n\022Iprojects/{project}/locations/{locatio" - + "n}/agents/{agent}/sessions/{session}\022dpr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}/environments/{environment}/" - + "sessions/{session}\352A\305\001\n(discoveryengine." - + "googleapis.com/DataStore\022?projects/{proj" - + "ect}/locations/{location}/dataStores/{da" - + "ta_store}\022Xprojects/{project}/locations/" - + "{location}/collections/{collection}/data" - + "Stores/{data_store}b\006proto3" + + "back.RatingB\003\340A\001\022V\n\rrating_reason\030\002 \001(\0132" + + ":.google.cloud.dialogflow.cx.v3.AnswerFe" + + "edback.RatingReasonB\003\340A\001\022\032\n\rcustom_ratin" + + "g\030\003 \001(\tB\003\340A\001\032A\n\014RatingReason\022\032\n\rreason_l" + + "abels\030\003 \003(\tB\003\340A\001\022\025\n\010feedback\030\002 \001(\tB\003\340A\001\"" + + "@\n\006Rating\022\026\n\022RATING_UNSPECIFIED\020\000\022\r\n\tTHU" + + "MBS_UP\020\001\022\017\n\013THUMBS_DOWN\020\002\"\366\001\n\033SubmitAnsw" + + "erFeedbackRequest\022:\n\007session\030\001 \001(\tB)\340A\002\372" + + "A#\n!dialogflow.googleapis.com/Session\022\030\n" + + "\013response_id\030\002 \001(\tB\003\340A\002\022K\n\017answer_feedba" + + "ck\030\003 \001(\0132-.google.cloud.dialogflow.cx.v3" + + ".AnswerFeedbackB\003\340A\002\0224\n\013update_mask\030\004 \001(" + + "\0132\032.google.protobuf.FieldMaskB\003\340A\001\"\253\002\n\023D" + + "etectIntentRequest\022:\n\007session\030\001 \001(\tB)\340A\002" + + "\372A#\n!dialogflow.googleapis.com/Session\022D" + + "\n\014query_params\030\002 \001(\0132..google.cloud.dial" + + "ogflow.cx.v3.QueryParameters\022C\n\013query_in" + + "put\030\003 \001(\0132).google.cloud.dialogflow.cx.v" + + "3.QueryInputB\003\340A\002\022M\n\023output_audio_config" + + "\030\004 \001(\01320.google.cloud.dialogflow.cx.v3.O" + + "utputAudioConfig\"\216\003\n\024DetectIntentRespons" + + "e\022\023\n\013response_id\030\001 \001(\t\022@\n\014query_result\030\002" + + " \001(\0132*.google.cloud.dialogflow.cx.v3.Que" + + "ryResult\022\024\n\014output_audio\030\004 \001(\014\022M\n\023output" + + "_audio_config\030\005 \001(\01320.google.cloud.dialo" + + "gflow.cx.v3.OutputAudioConfig\022W\n\rrespons" + + "e_type\030\006 \001(\0162@.google.cloud.dialogflow.c" + + "x.v3.DetectIntentResponse.ResponseType\022\032" + + "\n\022allow_cancellation\030\007 \001(\010\"E\n\014ResponseTy" + + "pe\022\035\n\031RESPONSE_TYPE_UNSPECIFIED\020\000\022\013\n\007PAR" + + "TIAL\020\001\022\t\n\005FINAL\020\002\"\361\002\n\034StreamingDetectInt" + + "entRequest\0227\n\007session\030\001 \001(\tB&\372A#\n!dialog" + + "flow.googleapis.com/Session\022D\n\014query_par" + + "ams\030\002 \001(\0132..google.cloud.dialogflow.cx.v" + + "3.QueryParameters\022C\n\013query_input\030\003 \001(\0132)" + + ".google.cloud.dialogflow.cx.v3.QueryInpu" + + "tB\003\340A\002\022M\n\023output_audio_config\030\004 \001(\01320.go" + + "ogle.cloud.dialogflow.cx.v3.OutputAudioC" + + "onfig\022\037\n\027enable_partial_response\030\005 \001(\010\022\035" + + "\n\025enable_debugging_info\030\010 \001(\010\"\260\007\n\036CloudC" + + "onversationDebuggingInfo\022\031\n\021audio_data_c" + + "hunks\030\001 \001(\005\0229\n\026result_end_time_offset\030\002 " + + "\001(\0132\031.google.protobuf.Duration\0227\n\024first_" + + "audio_duration\030\003 \001(\0132\031.google.protobuf.D" + + "uration\022\030\n\020single_utterance\030\005 \001(\010\022C\n spe" + + "ech_partial_results_end_times\030\006 \003(\0132\031.go" + + "ogle.protobuf.Duration\022A\n\036speech_final_r" + + "esults_end_times\030\007 \003(\0132\031.google.protobuf" + + ".Duration\022\031\n\021partial_responses\030\010 \001(\005\022,\n$" + + "speaker_id_passive_latency_ms_offset\030\t \001" + + "(\005\022\037\n\027bargein_event_triggered\030\n \001(\010\022\037\n\027s" + + "peech_single_utterance\030\013 \001(\010\022=\n\032dtmf_par" + + "tial_results_times\030\014 \003(\0132\031.google.protob" + + "uf.Duration\022;\n\030dtmf_final_results_times\030" + + "\r \003(\0132\031.google.protobuf.Duration\022C\n sing" + + "le_utterance_end_time_offset\030\016 \001(\0132\031.goo" + + "gle.protobuf.Duration\0224\n\021no_speech_timeo" + + "ut\030\017 \001(\0132\031.google.protobuf.Duration\0226\n\023e" + + "ndpointing_timeout\030\023 \001(\0132\031.google.protob" + + "uf.Duration\022\025\n\ris_input_text\030\020 \001(\010\022@\n\035cl" + + "ient_half_close_time_offset\030\021 \001(\0132\031.goog" + + "le.protobuf.Duration\022J\n\'client_half_clos" + + "e_streaming_time_offset\030\022 \001(\0132\031.google.p" + + "rotobuf.Duration\"\262\002\n\035StreamingDetectInte" + + "ntResponse\022W\n\022recognition_result\030\001 \001(\01329" + + ".google.cloud.dialogflow.cx.v3.Streaming" + + "RecognitionResultH\000\022U\n\026detect_intent_res" + + "ponse\030\002 \001(\01323.google.cloud.dialogflow.cx" + + ".v3.DetectIntentResponseH\000\022U\n\016debugging_" + + "info\030\004 \001(\0132=.google.cloud.dialogflow.cx." + + "v3.CloudConversationDebuggingInfoB\n\n\010res" + + "ponse\"\266\003\n\032StreamingRecognitionResult\022[\n\014" + + "message_type\030\001 \001(\0162E.google.cloud.dialog" + + "flow.cx.v3.StreamingRecognitionResult.Me" + + "ssageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_fina" + + "l\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability" + + "\030\006 \001(\002\022G\n\020speech_word_info\030\007 \003(\0132-.googl" + + "e.cloud.dialogflow.cx.v3.SpeechWordInfo\022" + + "4\n\021speech_end_offset\030\010 \001(\0132\031.google.prot" + + "obuf.Duration\022\025\n\rlanguage_code\030\n \001(\t\"X\n\013" + + "MessageType\022\034\n\030MESSAGE_TYPE_UNSPECIFIED\020" + + "\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_UTTER" + + "ANCE\020\002\"\213\006\n\017QueryParameters\022\021\n\ttime_zone\030" + + "\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.google.typ" + + "e.LatLng\022N\n\024session_entity_types\030\003 \003(\01320" + + ".google.cloud.dialogflow.cx.v3.SessionEn" + + "tityType\022(\n\007payload\030\004 \001(\0132\027.google.proto" + + "buf.Struct\022+\n\nparameters\030\005 \001(\0132\027.google." + + "protobuf.Struct\0229\n\014current_page\030\006 \001(\tB#\372" + + "A \n\036dialogflow.googleapis.com/Page\022\027\n\017di" + + "sable_webhook\030\007 \001(\010\022$\n\034analyze_query_tex" + + "t_sentiment\030\010 \001(\010\022[\n\017webhook_headers\030\n \003" + + "(\0132B.google.cloud.dialogflow.cx.v3.Query" + + "Parameters.WebhookHeadersEntry\022=\n\rflow_v" + + "ersions\030\016 \003(\tB&\372A#\n!dialogflow.googleapi" + + "s.com/Version\022\017\n\007channel\030\017 \001(\t\0223\n\013sessio" + + "n_ttl\030\020 \001(\0132\031.google.protobuf.DurationB\003" + + "\340A\001\0227\n\021end_user_metadata\030\022 \001(\0132\027.google." + + "protobuf.StructB\003\340A\001\022G\n\rsearch_config\030\024 " + + "\001(\0132+.google.cloud.dialogflow.cx.v3.Sear" + + "chConfigB\003\340A\001\0325\n\023WebhookHeadersEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\232\001\n\014SearchC" + + "onfig\022C\n\013boost_specs\030\001 \003(\0132).google.clou" + + "d.dialogflow.cx.v3.BoostSpecsB\003\340A\001\022E\n\014fi" + + "lter_specs\030\002 \003(\0132*.google.cloud.dialogfl" + + "ow.cx.v3.FilterSpecsB\003\340A\001\"\256\001\n\tBoostSpec\022" + + "_\n\025condition_boost_specs\030\001 \003(\0132;.google." + + "cloud.dialogflow.cx.v3.BoostSpec.Conditi" + + "onBoostSpecB\003\340A\001\032@\n\022ConditionBoostSpec\022\026" + + "\n\tcondition\030\001 \001(\tB\003\340A\001\022\022\n\005boost\030\002 \001(\002B\003\340" + + "A\001\"\220\001\n\nBoostSpecs\022E\n\013data_stores\030\001 \003(\tB0" + + "\340A\001\372A*\n(discoveryengine.googleapis.com/D" + + "ataStore\022;\n\004spec\030\002 \003(\0132(.google.cloud.di" + + "alogflow.cx.v3.BoostSpecB\003\340A\001\"i\n\013FilterS" + + "pecs\022E\n\013data_stores\030\001 \003(\tB0\340A\001\372A*\n(disco" + + "veryengine.googleapis.com/DataStore\022\023\n\006f" + + "ilter\030\002 \001(\tB\003\340A\001\"\333\002\n\nQueryInput\0228\n\004text\030" + + "\002 \001(\0132(.google.cloud.dialogflow.cx.v3.Te" + + "xtInputH\000\022<\n\006intent\030\003 \001(\0132*.google.cloud" + + ".dialogflow.cx.v3.IntentInputH\000\022:\n\005audio" + + "\030\005 \001(\0132).google.cloud.dialogflow.cx.v3.A" + + "udioInputH\000\022:\n\005event\030\006 \001(\0132).google.clou" + + "d.dialogflow.cx.v3.EventInputH\000\0228\n\004dtmf\030" + + "\007 \001(\0132(.google.cloud.dialogflow.cx.v3.Dt" + + "mfInputH\000\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007\n" + + "\005input\"\307\010\n\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022?" + + "\n\016trigger_intent\030\013 \001(\tB%\372A\"\n dialogflow." + + "googleapis.com/IntentH\000\022\024\n\ntranscript\030\014 " + + "\001(\tH\000\022\027\n\rtrigger_event\030\016 \001(\tH\000\0228\n\004dtmf\030\027" + + " \001(\0132(.google.cloud.dialogflow.cx.v3.Dtm" + + "fInputH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\nparam" + + "eters\030\003 \001(\0132\027.google.protobuf.Struct\022I\n\021" + + "response_messages\030\004 \003(\0132..google.cloud.d" + + "ialogflow.cx.v3.ResponseMessage\022\023\n\013webho" + + "ok_ids\030\031 \003(\t\022\035\n\025webhook_display_names\030\032 " + + "\003(\t\0224\n\021webhook_latencies\030\033 \003(\0132\031.google." + + "protobuf.Duration\022\024\n\014webhook_tags\030\035 \003(\t\022" + + ",\n\020webhook_statuses\030\r \003(\0132\022.google.rpc.S" + + "tatus\0221\n\020webhook_payloads\030\006 \003(\0132\027.google" + + ".protobuf.Struct\0229\n\014current_page\030\007 \001(\0132#" + + ".google.cloud.dialogflow.cx.v3.Page\0229\n\014c" + + "urrent_flow\030\037 \001(\0132#.google.cloud.dialogf" + + "low.cx.v3.Flow\0229\n\006intent\030\010 \001(\0132%.google." + + "cloud.dialogflow.cx.v3.IntentB\002\030\001\022\'\n\033int" + + "ent_detection_confidence\030\t \001(\002B\002\030\001\0223\n\005ma" + + "tch\030\017 \001(\0132$.google.cloud.dialogflow.cx.v" + + "3.Match\0220\n\017diagnostic_info\030\n \001(\0132\027.googl" + + "e.protobuf.Struct\022Y\n\031sentiment_analysis_" + + "result\030\021 \001(\01326.google.cloud.dialogflow.c" + + "x.v3.SentimentAnalysisResult\022J\n\021advanced" + + "_settings\030\025 \001(\0132/.google.cloud.dialogflo" + + "w.cx.v3.AdvancedSettings\022\035\n\025allow_answer" + + "_feedback\030 \001(\010B\007\n\005query\"\036\n\tTextInput\022\021\n" + + "\004text\030\001 \001(\tB\003\340A\002\"G\n\013IntentInput\0228\n\006inten" + + "t\030\001 \001(\tB(\340A\002\372A\"\n dialogflow.googleapis.c" + + "om/Intent\"a\n\nAudioInput\022D\n\006config\030\001 \001(\0132" + + "/.google.cloud.dialogflow.cx.v3.InputAud" + + "ioConfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInp" + + "ut\022\r\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits" + + "\030\001 \001(\t\022\024\n\014finish_digit\030\002 \001(\t\"\361\002\n\005Match\0225" + + "\n\006intent\030\001 \001(\0132%.google.cloud.dialogflow" + + ".cx.v3.Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparamete" + + "rs\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n\016res" + + "olved_input\030\003 \001(\t\022B\n\nmatch_type\030\004 \001(\0162.." + + "google.cloud.dialogflow.cx.v3.Match.Matc" + + "hType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchType\022" + + "\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020\001\022" + + "\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILLING\020" + + "\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT\020\006" + + "\"\376\001\n\022MatchIntentRequest\022:\n\007session\030\001 \001(\t" + + "B)\340A\002\372A#\n!dialogflow.googleapis.com/Sess" + + "ion\022D\n\014query_params\030\002 \001(\0132..google.cloud" + + ".dialogflow.cx.v3.QueryParameters\022C\n\013que" + + "ry_input\030\003 \001(\0132).google.cloud.dialogflow" + + ".cx.v3.QueryInputB\003\340A\002\022!\n\031persist_parame" + + "ter_changes\030\005 \001(\010\"\220\002\n\023MatchIntentRespons" + + "e\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030\002 \001(" + + "\tB%\372A\"\n dialogflow.googleapis.com/Intent" + + "H\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\rtrigger_even" + + "t\030\006 \001(\tH\000\0225\n\007matches\030\004 \003(\0132$.google.clou" + + "d.dialogflow.cx.v3.Match\0229\n\014current_page" + + "\030\005 \001(\0132#.google.cloud.dialogflow.cx.v3.P" + + "ageB\007\n\005query\"\353\001\n\024FulfillIntentRequest\022O\n" + + "\024match_intent_request\030\001 \001(\01321.google.clo" + + "ud.dialogflow.cx.v3.MatchIntentRequest\0223" + + "\n\005match\030\002 \001(\0132$.google.cloud.dialogflow." + + "cx.v3.Match\022M\n\023output_audio_config\030\003 \001(\013" + + "20.google.cloud.dialogflow.cx.v3.OutputA" + + "udioConfig\"\323\001\n\025FulfillIntentResponse\022\023\n\013" + + "response_id\030\001 \001(\t\022@\n\014query_result\030\002 \001(\0132" + + "*.google.cloud.dialogflow.cx.v3.QueryRes" + + "ult\022\024\n\014output_audio\030\003 \001(\014\022M\n\023output_audi" + + "o_config\030\004 \001(\01320.google.cloud.dialogflow" + + ".cx.v3.OutputAudioConfig\";\n\027SentimentAna" + + "lysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmagnitude\030" + + "\002 \001(\0022\372\r\n\010Sessions\022\246\002\n\014DetectIntent\0222.go" + + "ogle.cloud.dialogflow.cx.v3.DetectIntent" + + "Request\0323.google.cloud.dialogflow.cx.v3." + + "DetectIntentResponse\"\254\001\202\323\344\223\002\245\001\"E/v3/{ses" + + "sion=projects/*/locations/*/agents/*/ses" + + "sions/*}:detectIntent:\001*ZY\"T/v3/{session" + + "=projects/*/locations/*/agents/*/environ" + + "ments/*/sessions/*}:detectIntent:\001*\022\325\002\n\033" + + "ServerStreamingDetectIntent\0222.google.clo" + + "ud.dialogflow.cx.v3.DetectIntentRequest\032" + + "3.google.cloud.dialogflow.cx.v3.DetectIn" + + "tentResponse\"\312\001\202\323\344\223\002\303\001\"T/v3/{session=pro" + + "jects/*/locations/*/agents/*/sessions/*}" + + ":serverStreamingDetectIntent:\001*Zh\"c/v3/{" + + "session=projects/*/locations/*/agents/*/" + + "environments/*/sessions/*}:serverStreami" + + "ngDetectIntent:\001*0\001\022\230\001\n\025StreamingDetectI" + + "ntent\022;.google.cloud.dialogflow.cx.v3.St" + + "reamingDetectIntentRequest\032<.google.clou" + + "d.dialogflow.cx.v3.StreamingDetectIntent" + + "Response\"\000(\0010\001\022\241\002\n\013MatchIntent\0221.google." + + "cloud.dialogflow.cx.v3.MatchIntentReques" + + "t\0322.google.cloud.dialogflow.cx.v3.MatchI" + + "ntentResponse\"\252\001\202\323\344\223\002\243\001\"D/v3/{session=pr" + + "ojects/*/locations/*/agents/*/sessions/*" + + "}:matchIntent:\001*ZX\"S/v3/{session=project" + + "s/*/locations/*/agents/*/environments/*/" + + "sessions/*}:matchIntent:\001*\022\325\002\n\rFulfillIn" + + "tent\0223.google.cloud.dialogflow.cx.v3.Ful" + + "fillIntentRequest\0324.google.cloud.dialogf" + + "low.cx.v3.FulfillIntentResponse\"\330\001\202\323\344\223\002\321" + + "\001\"[/v3/{match_intent_request.session=pro" + + "jects/*/locations/*/agents/*/sessions/*}" + + ":fulfillIntent:\001*Zo\"j/v3/{match_intent_r" + + "equest.session=projects/*/locations/*/ag" + + "ents/*/environments/*/sessions/*}:fulfil" + + "lIntent:\001*\022\333\001\n\024SubmitAnswerFeedback\022:.go" + + "ogle.cloud.dialogflow.cx.v3.SubmitAnswer" + + "FeedbackRequest\032-.google.cloud.dialogflo" + + "w.cx.v3.AnswerFeedback\"X\202\323\344\223\002R\"M/v3/{ses" + + "sion=projects/*/locations/*/agents/*/ses" + + "sions/*}:submitAnswerFeedback:\001*\032x\312A\031dia" + + "logflow.googleapis.com\322AYhttps://www.goo" + + "gleapis.com/auth/cloud-platform,https://" + + "www.googleapis.com/auth/dialogflowB\323\004\n!c" + + "om.google.cloud.dialogflow.cx.v3B\014Sessio" + + "nProtoP\001Z1cloud.google.com/go/dialogflow" + + "/cx/apiv3/cxpb;cxpb\370\001\001\242\002\002DF\252\002\035Google.Clo" + + "ud.Dialogflow.Cx.V3\352\002!Google::Cloud::Dia" + + "logflow::CX::V3\352A\324\001\n!dialogflow.googleap" + + "is.com/Session\022Iprojects/{project}/locat" + + "ions/{location}/agents/{agent}/sessions/" + + "{session}\022dprojects/{project}/locations/" + + "{location}/agents/{agent}/environments/{" + + "environment}/sessions/{session}\352A\305\001\n(dis" + + "coveryengine.googleapis.com/DataStore\022?p" + + "rojects/{project}/locations/{location}/d" + + "ataStores/{data_store}\022Xprojects/{projec" + + "t}/locations/{location}/collections/{col" + + "lection}/dataStores/{data_store}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -424,6 +438,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(), @@ -635,9 +650,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", "Parameters", "ResponseMessages", + "WebhookIds", + "WebhookDisplayNames", + "WebhookLatencies", + "WebhookTags", "WebhookStatuses", "WebhookPayloads", "CurrentPage", + "CurrentFlow", "Intent", "IntentDetectionConfidence", "Match", @@ -757,6 +777,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.AudioConfigProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3.FlowProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3.ResponseMessageProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechModelVariant.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechModelVariant.java index 3bc150edcfac..77535ff40167 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechModelVariant.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/SpeechModelVariant.java @@ -53,10 +53,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu *
    * Use the best available variant of the [Speech
    * model][InputAudioConfig.model] that the caller is eligible for.
-   *
-   * Please see the [Dialogflow
-   * docs](https://cloud.google.com/dialogflow/docs/data-logging) for
-   * how to make your project eligible for enhanced models.
    * 
* * USE_BEST_AVAILABLE = 1; @@ -88,11 +84,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu * The [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * describes which models have enhanced variants. - * - * * If the API caller isn't eligible for enhanced models, Dialogflow returns - * an error. Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) - * for how to make your project eligible. *
* * USE_ENHANCED = 3; @@ -118,10 +109,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu *
    * Use the best available variant of the [Speech
    * model][InputAudioConfig.model] that the caller is eligible for.
-   *
-   * Please see the [Dialogflow
-   * docs](https://cloud.google.com/dialogflow/docs/data-logging) for
-   * how to make your project eligible for enhanced models.
    * 
* * USE_BEST_AVAILABLE = 1; @@ -153,11 +140,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu * The [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * describes which models have enhanced variants. - * - * * If the API caller isn't eligible for enhanced models, Dialogflow returns - * an error. Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) - * for how to make your project eligible. *
* * USE_ENHANCED = 3; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java index 6873d63ef93a..90419e2c1f05 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/StreamingRecognitionResult.java @@ -136,9 +136,9 @@ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Event indicates that the server has detected the end of the user's speech
-     * utterance and expects no additional speech. Therefore, the server will
-     * not process additional audio (although it may subsequently return
+     * This event indicates that the server has detected the end of the user's
+     * speech utterance and expects no additional speech. Therefore, the server
+     * will not process additional audio (although it may subsequently return
      * additional results). The client should stop sending additional audio
      * data, half-close the gRPC connection, and wait for any additional results
      * until the server closes the gRPC connection. This message is only sent if
@@ -176,9 +176,9 @@ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum {
      *
      *
      * 
-     * Event indicates that the server has detected the end of the user's speech
-     * utterance and expects no additional speech. Therefore, the server will
-     * not process additional audio (although it may subsequently return
+     * This event indicates that the server has detected the end of the user's
+     * speech utterance and expects no additional speech. Therefore, the server
+     * will not process additional audio (although it may subsequently return
      * additional results). The client should stop sending additional audio
      * data, half-close the gRPC connection, and wait for any additional results
      * until the server closes the gRPC connection. This message is only sent if
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInput.java
index 1bb1c4a036da..8d6140a807de 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInput.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInput.java
@@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    *
    * 
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -95,8 +94,7 @@ public java.lang.String getText() { * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -462,8 +460,7 @@ public Builder mergeFrom( * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -485,8 +482,7 @@ public java.lang.String getText() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -508,8 +504,7 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -530,8 +525,7 @@ public Builder setText(java.lang.String value) { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -548,8 +542,7 @@ public Builder clearText() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInputOrBuilder.java index c9e74dc48fee..7250e9ed1b0e 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/TextInputOrBuilder.java @@ -28,8 +28,7 @@ public interface TextInputOrBuilder * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -41,8 +40,7 @@ public interface TextInputOrBuilder * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto index 9a937500c125..b83c9c393199 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/agent.proto @@ -303,7 +303,8 @@ message Agent { // Immutable. Name of the start flow in this agent. A start flow will be // automatically created when the agent is created, and can only be deleted by // deleting the agent. Format: `projects//locations//agents//flows/`. + // ID>/agents//flows/`. Currently only the default start + // flow with id "00000000-0000-0000-0000-000000000000" is allowed. string start_flow = 16 [ (google.api.field_behavior) = IMMUTABLE, (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto index 84f5052f7587..fdeb750a360a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/audio_config.proto @@ -97,10 +97,6 @@ enum SpeechModelVariant { // Use the best available variant of the [Speech // model][InputAudioConfig.model] that the caller is eligible for. - // - // Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) for - // how to make your project eligible for enhanced models. USE_BEST_AVAILABLE = 1; // Use standard model variant even if an enhanced model is available. See the @@ -118,11 +114,6 @@ enum SpeechModelVariant { // The [Cloud Speech // documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) // describes which models have enhanced variants. - // - // * If the API caller isn't eligible for enhanced models, Dialogflow returns - // an error. Please see the [Dialogflow - // docs](https://cloud.google.com/dialogflow/docs/data-logging) - // for how to make your project eligible. USE_ENHANCED = 3; } @@ -212,28 +203,10 @@ message InputAudioConfig { // for more details. repeated string phrase_hints = 4; - // Optional. Which Speech model to select for the given request. Select the - // model best suited to your domain to get best results. If a model is not - // explicitly specified, then Dialogflow auto-selects a model based on other - // parameters in the InputAudioConfig and Agent settings. - // If enhanced speech model is enabled for the agent and an enhanced - // version of the specified model for the language does not exist, then the - // speech is recognized using the standard version of the specified model. - // Refer to - // [Cloud Speech API - // documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) - // for more details. - // If you specify a model, the following models typically have the best - // performance: - // - // - phone_call (best for Agent Assist and telephony) - // - latest_short (best for Dialogflow non-telephony) - // - command_and_search - // - // Leave this field unspecified to use - // [Agent Speech - // settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) - // for model selection. + // Optional. Which Speech model to select for the given request. + // For more information, see + // [Speech + // models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models). string model = 7; // Optional. Which variant of the [Speech @@ -252,6 +225,12 @@ message InputAudioConfig { // Configuration of barge-in behavior during the streaming of input audio. BargeInConfig barge_in_config = 15; + + // If `true`, the request will opt out for STT conformer model migration. + // This field will be deprecated once force migration takes place in June + // 2024. Please refer to [Dialogflow CX Speech model + // migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration). + bool opt_out_conformer_model_migration = 26; } // Gender of the voice as described in diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto index c4b805eafb20..e78dd93eb6e5 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/changelog.proto @@ -153,4 +153,7 @@ message Changelog { // The timestamp of the change. google.protobuf.Timestamp create_time = 4; + + // The affected language code of the change. + string language_code = 14; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto index c3f6d2f3d69f..7730dd546da8 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/entity_type.proto @@ -20,6 +20,8 @@ import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3/inline.proto"; +import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; @@ -94,6 +96,32 @@ service EntityTypes { }; option (google.api.method_signature) = "parent"; } + + // Exports the selected entity types. + rpc ExportEntityTypes(ExportEntityTypesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportEntityTypesResponse" + metadata_type: "ExportEntityTypesMetadata" + }; + } + + // Imports the specified entitytypes into the agent. + rpc ImportEntityTypes(ImportEntityTypesRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3/{parent=projects/*/locations/*/agents/*}/entityTypes:import" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ImportEntityTypesResponse" + metadata_type: "ImportEntityTypesMetadata" + }; + } } // Entities are extracted from user input and represent parameters that are @@ -230,6 +258,202 @@ message EntityType { bool redact = 9; } +// The request message for +// [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes]. +message ExportEntityTypesRequest { + // Data format of the exported entity types. + enum DataFormat { + // Unspecified format. Treated as `BLOB`. + DATA_FORMAT_UNSPECIFIED = 0; + + // EntityTypes will be exported as raw bytes. + BLOB = 1; + + // EntityTypes will be exported in JSON Package format. + JSON_PACKAGE = 5; + } + + // Required. The name of the parent agent to export entity types. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The name of the entity types to export. + // Format: `projects//locations//agents//entityTypes/`. + repeated string entity_types = 2 [(google.api.field_behavior) = REQUIRED]; + + // The destination to export. + oneof destination { + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the entity + // types to. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string entity_types_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The option to return the serialized entity types inline. + bool entity_types_content_inline = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The data format of the exported entity types. If not specified, + // `BLOB` is assumed. + DataFormat data_format = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language to retrieve the entity type for. The following + // fields are language dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, all language dependent fields will be retrieved. + // [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes]. +message ExportEntityTypesResponse { + // Exported entity types can be either in cloud storage or local download. + oneof exported_entity_types { + // The URI to a file containing the exported entity types. This field is + // populated only if `entity_types_uri` is specified in + // [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + string entity_types_uri = 1; + + // Uncompressed byte content for entity types. This field is populated only + // if `entity_types_content_inline` is set to true in + // [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest]. + InlineDestination entity_types_content = 2; + } +} + +// Metadata returned for the +// [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ExportEntityTypes] +// long running operation. +message ExportEntityTypesMetadata {} + +// The request message for +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes]. +message ImportEntityTypesRequest { + // Merge option when display name conflicts exist during import. + enum MergeOption { + // Unspecified. If used, system uses REPORT_CONFLICT as default. + MERGE_OPTION_UNSPECIFIED = 0; + + // Replace the original entity type in the agent with the new entity type + // when display name conflicts exist. + REPLACE = 1; + + // Merge the original entity type with the new entity type when display name + // conflicts exist. + MERGE = 2; + + // Create new entity types with new display names to differentiate them from + // the existing entity types when display name conflicts exist. + RENAME = 3; + + // Report conflict information if display names conflict is detected. + // Otherwise, import entity types. + REPORT_CONFLICT = 4; + + // Keep the original entity type and discard the conflicting new entity type + // when display name conflicts exist. + KEEP = 5; + } + + // Required. The agent to import the entity types into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entity types to import. + oneof entity_types { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import entity types from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string entity_types_uri = 2; + + // Uncompressed byte content of entity types. + InlineSource entity_types_content = 3; + } + + // Required. Merge option for importing entity types. + MergeOption merge_option = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The target entity type to import into. + // Format: `projects//locations//agents//entity_types/`. + // If set, there should be only one entity type included in + // [entity_types][google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest.entity_types], + // of which the type should match the type of the target entity type. All + // [entities][google.cloud.dialogflow.cx.v3.EntityType.entities] in the + // imported entity type will be added to the target entity type. + string target_entity_type = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; +} + +// The response message for +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes]. +message ImportEntityTypesResponse { + // Conflicting resources detected during the import process. Only filled when + // [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the + // request and there are conflicts in the display names. + message ConflictingResources { + // Display names of conflicting entity types. + repeated string entity_type_display_names = 1; + + // Display names of conflicting entities. + repeated string entity_display_names = 2; + } + + // The unique identifier of the imported entity types. + // Format: `projects//locations//agents//entity_types/`. + repeated string entity_types = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + }]; + + // Info which resources have conflicts when + // [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + // is set in ImportEntityTypesRequest. + ConflictingResources conflicting_resources = 2; +} + +// Metadata returned for the +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ImportEntityTypes] +// long running operation. +message ImportEntityTypesMetadata {} + // The request message for // [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3.EntityTypes.ListEntityTypes]. message ListEntityTypesRequest { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto index 389c1da72358..b2601f12ac10 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3/src/main/proto/google/cloud/dialogflow/cx/v3/generative_settings.proto @@ -83,6 +83,10 @@ message GenerativeSettings { // Agent scope, e.g. "Example company website", "internal Example // company website for employees", "manual of car owner". string agent_scope = 5; + + // Whether to disable fallback to Data Store search results (in case the LLM + // couldn't pick a proper answer). Per default the feature is enabled. + bool disable_data_store_fallback = 8; } // Format: `projects//locations//agents/ + * Action performed by end user or Dialogflow agent in the conversation. + *
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Action} + */ +public final class Action extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Action) + ActionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Action.newBuilder() to construct. + private Action(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Action() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Action(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Action.class, + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder.class); + } + + private int actionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object action_; + + public enum ActionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_UTTERANCE(1), + AGENT_UTTERANCE(2), + TOOL_USE(3), + PLAYBOOK_INVOCATION(4), + FLOW_INVOCATION(5), + ACTION_NOT_SET(0); + private final int value; + + private ActionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ActionCase valueOf(int value) { + return forNumber(value); + } + + public static ActionCase forNumber(int value) { + switch (value) { + case 1: + return USER_UTTERANCE; + case 2: + return AGENT_UTTERANCE; + case 3: + return TOOL_USE; + case 4: + return PLAYBOOK_INVOCATION; + case 5: + return FLOW_INVOCATION; + case 0: + return ACTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public static final int USER_UTTERANCE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + @java.lang.Override + public boolean hasUserUtterance() { + return actionCase_ == 1; + } + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getUserUtterance() { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder getUserUtteranceOrBuilder() { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + + public static final int AGENT_UTTERANCE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + @java.lang.Override + public boolean hasAgentUtterance() { + return actionCase_ == 2; + } + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getAgentUtterance() { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder + getAgentUtteranceOrBuilder() { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + + public static final int TOOL_USE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + @java.lang.Override + public boolean hasToolUse() { + return actionCase_ == 3; + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse getToolUse() { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder getToolUseOrBuilder() { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + + public static final int PLAYBOOK_INVOCATION_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + @java.lang.Override + public boolean hasPlaybookInvocation() { + return actionCase_ == 4; + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getPlaybookInvocation() { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder + getPlaybookInvocationOrBuilder() { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + + public static final int FLOW_INVOCATION_FIELD_NUMBER = 5; + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + @java.lang.Override + public boolean hasFlowInvocation() { + return actionCase_ == 5; + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getFlowInvocation() { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder + getFlowInvocationOrBuilder() { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (actionCase_ == 1) { + output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_); + } + if (actionCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_); + } + if (actionCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_); + } + if (actionCase_ == 4) { + output.writeMessage(4, (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_); + } + if (actionCase_ == 5) { + output.writeMessage(5, (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (actionCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_); + } + if (actionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_); + } + if (actionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_); + } + if (actionCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_); + } + if (actionCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Action)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Action other = + (com.google.cloud.dialogflow.cx.v3beta1.Action) obj; + + if (!getActionCase().equals(other.getActionCase())) return false; + switch (actionCase_) { + case 1: + if (!getUserUtterance().equals(other.getUserUtterance())) return false; + break; + case 2: + if (!getAgentUtterance().equals(other.getAgentUtterance())) return false; + break; + case 3: + if (!getToolUse().equals(other.getToolUse())) return false; + break; + case 4: + if (!getPlaybookInvocation().equals(other.getPlaybookInvocation())) return false; + break; + case 5: + if (!getFlowInvocation().equals(other.getFlowInvocation())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (actionCase_) { + case 1: + hash = (37 * hash) + USER_UTTERANCE_FIELD_NUMBER; + hash = (53 * hash) + getUserUtterance().hashCode(); + break; + case 2: + hash = (37 * hash) + AGENT_UTTERANCE_FIELD_NUMBER; + hash = (53 * hash) + getAgentUtterance().hashCode(); + break; + case 3: + hash = (37 * hash) + TOOL_USE_FIELD_NUMBER; + hash = (53 * hash) + getToolUse().hashCode(); + break; + case 4: + hash = (37 * hash) + PLAYBOOK_INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInvocation().hashCode(); + break; + case 5: + hash = (37 * hash) + FLOW_INVOCATION_FIELD_NUMBER; + hash = (53 * hash) + getFlowInvocation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Action prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Action performed by end user or Dialogflow agent in the conversation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Action} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Action) + com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Action_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Action.class, + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Action.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (userUtteranceBuilder_ != null) { + userUtteranceBuilder_.clear(); + } + if (agentUtteranceBuilder_ != null) { + agentUtteranceBuilder_.clear(); + } + if (toolUseBuilder_ != null) { + toolUseBuilder_.clear(); + } + if (playbookInvocationBuilder_ != null) { + playbookInvocationBuilder_.clear(); + } + if (flowInvocationBuilder_ != null) { + flowInvocationBuilder_.clear(); + } + actionCase_ = 0; + action_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Action getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Action.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Action build() { + com.google.cloud.dialogflow.cx.v3beta1.Action result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Action buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Action result = + new com.google.cloud.dialogflow.cx.v3beta1.Action(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Action result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Action result) { + result.actionCase_ = actionCase_; + result.action_ = this.action_; + if (actionCase_ == 1 && userUtteranceBuilder_ != null) { + result.action_ = userUtteranceBuilder_.build(); + } + if (actionCase_ == 2 && agentUtteranceBuilder_ != null) { + result.action_ = agentUtteranceBuilder_.build(); + } + if (actionCase_ == 3 && toolUseBuilder_ != null) { + result.action_ = toolUseBuilder_.build(); + } + if (actionCase_ == 4 && playbookInvocationBuilder_ != null) { + result.action_ = playbookInvocationBuilder_.build(); + } + if (actionCase_ == 5 && flowInvocationBuilder_ != null) { + result.action_ = flowInvocationBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Action) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Action) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Action other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Action.getDefaultInstance()) return this; + switch (other.getActionCase()) { + case USER_UTTERANCE: + { + mergeUserUtterance(other.getUserUtterance()); + break; + } + case AGENT_UTTERANCE: + { + mergeAgentUtterance(other.getAgentUtterance()); + break; + } + case TOOL_USE: + { + mergeToolUse(other.getToolUse()); + break; + } + case PLAYBOOK_INVOCATION: + { + mergePlaybookInvocation(other.getPlaybookInvocation()); + break; + } + case FLOW_INVOCATION: + { + mergeFlowInvocation(other.getFlowInvocation()); + break; + } + case ACTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUserUtteranceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getAgentUtteranceFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getToolUseFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getPlaybookInvocationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 4; + break; + } // case 34 + case 42: + { + input.readMessage(getFlowInvocationFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int actionCase_ = 0; + private java.lang.Object action_; + + public ActionCase getActionCase() { + return ActionCase.forNumber(actionCase_); + } + + public Builder clearAction() { + actionCase_ = 0; + action_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance, + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder> + userUtteranceBuilder_; + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + @java.lang.Override + public boolean hasUserUtterance() { + return actionCase_ == 1; + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getUserUtterance() { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } else { + if (actionCase_ == 1) { + return userUtteranceBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserUtterance(com.google.cloud.dialogflow.cx.v3beta1.UserUtterance value) { + if (userUtteranceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + userUtteranceBuilder_.setMessage(value); + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUserUtterance( + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder builderForValue) { + if (userUtteranceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + userUtteranceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUserUtterance(com.google.cloud.dialogflow.cx.v3beta1.UserUtterance value) { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1 + && action_ + != com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 1) { + userUtteranceBuilder_.mergeFrom(value); + } else { + userUtteranceBuilder_.setMessage(value); + } + } + actionCase_ = 1; + return this; + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUserUtterance() { + if (userUtteranceBuilder_ == null) { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 1) { + actionCase_ = 0; + action_ = null; + } + userUtteranceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder getUserUtteranceBuilder() { + return getUserUtteranceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder + getUserUtteranceOrBuilder() { + if ((actionCase_ == 1) && (userUtteranceBuilder_ != null)) { + return userUtteranceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Agent obtained a message from the customer.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance, + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder> + getUserUtteranceFieldBuilder() { + if (userUtteranceBuilder_ == null) { + if (!(actionCase_ == 1)) { + action_ = com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + userUtteranceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance, + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 1; + onChanged(); + return userUtteranceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder> + agentUtteranceBuilder_; + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + @java.lang.Override + public boolean hasAgentUtterance() { + return actionCase_ == 2; + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getAgentUtterance() { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } else { + if (actionCase_ == 2) { + return agentUtteranceBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentUtterance(com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance value) { + if (agentUtteranceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + agentUtteranceBuilder_.setMessage(value); + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAgentUtterance( + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder builderForValue) { + if (agentUtteranceBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + agentUtteranceBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAgentUtterance( + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance value) { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2 + && action_ + != com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 2) { + agentUtteranceBuilder_.mergeFrom(value); + } else { + agentUtteranceBuilder_.setMessage(value); + } + } + actionCase_ = 2; + return this; + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAgentUtterance() { + if (agentUtteranceBuilder_ == null) { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 2) { + actionCase_ = 0; + action_ = null; + } + agentUtteranceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder + getAgentUtteranceBuilder() { + return getAgentUtteranceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder + getAgentUtteranceOrBuilder() { + if ((actionCase_ == 2) && (agentUtteranceBuilder_ != null)) { + return agentUtteranceBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed by the agent as a message.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder> + getAgentUtteranceFieldBuilder() { + if (agentUtteranceBuilder_ == null) { + if (!(actionCase_ == 2)) { + action_ = com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + agentUtteranceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 2; + onChanged(); + return agentUtteranceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolUse, + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder> + toolUseBuilder_; + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + @java.lang.Override + public boolean hasToolUse() { + return actionCase_ == 3; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse getToolUse() { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } else { + if (actionCase_ == 3) { + return toolUseBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolUse(com.google.cloud.dialogflow.cx.v3beta1.ToolUse value) { + if (toolUseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + toolUseBuilder_.setMessage(value); + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setToolUse( + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder builderForValue) { + if (toolUseBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + toolUseBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeToolUse(com.google.cloud.dialogflow.cx.v3beta1.ToolUse value) { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3 + && action_ != com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 3) { + toolUseBuilder_.mergeFrom(value); + } else { + toolUseBuilder_.setMessage(value); + } + } + actionCase_ = 3; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearToolUse() { + if (toolUseBuilder_ == null) { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 3) { + actionCase_ = 0; + action_ = null; + } + toolUseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder getToolUseBuilder() { + return getToolUseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder getToolUseOrBuilder() { + if ((actionCase_ == 3) && (toolUseBuilder_ != null)) { + return toolUseBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by calling a plugin
+     * tool.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolUse, + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder> + getToolUseFieldBuilder() { + if (toolUseBuilder_ == null) { + if (!(actionCase_ == 3)) { + action_ = com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + toolUseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolUse, + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 3; + onChanged(); + return toolUseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder> + playbookInvocationBuilder_; + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + @java.lang.Override + public boolean hasPlaybookInvocation() { + return actionCase_ == 4; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getPlaybookInvocation() { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } else { + if (actionCase_ == 4) { + return playbookInvocationBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInvocation( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation value) { + if (playbookInvocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + playbookInvocationBuilder_.setMessage(value); + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInvocation( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder builderForValue) { + if (playbookInvocationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + playbookInvocationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInvocation( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation value) { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4 + && action_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 4) { + playbookInvocationBuilder_.mergeFrom(value); + } else { + playbookInvocationBuilder_.setMessage(value); + } + } + actionCase_ = 4; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInvocation() { + if (playbookInvocationBuilder_ == null) { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 4) { + actionCase_ = 0; + action_ = null; + } + playbookInvocationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder + getPlaybookInvocationBuilder() { + return getPlaybookInvocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder + getPlaybookInvocationOrBuilder() { + if ((actionCase_ == 4) && (playbookInvocationBuilder_ != null)) { + return playbookInvocationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a child
+     * playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder> + getPlaybookInvocationFieldBuilder() { + if (playbookInvocationBuilder_ == null) { + if (!(actionCase_ == 4)) { + action_ = com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + playbookInvocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 4; + onChanged(); + return playbookInvocationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder> + flowInvocationBuilder_; + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + @java.lang.Override + public boolean hasFlowInvocation() { + return actionCase_ == 5; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getFlowInvocation() { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } else { + if (actionCase_ == 5) { + return flowInvocationBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowInvocation(com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation value) { + if (flowInvocationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + onChanged(); + } else { + flowInvocationBuilder_.setMessage(value); + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFlowInvocation( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder builderForValue) { + if (flowInvocationBuilder_ == null) { + action_ = builderForValue.build(); + onChanged(); + } else { + flowInvocationBuilder_.setMessage(builderForValue.build()); + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFlowInvocation( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation value) { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5 + && action_ + != com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance()) { + action_ = + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_) + .mergeFrom(value) + .buildPartial(); + } else { + action_ = value; + } + onChanged(); + } else { + if (actionCase_ == 5) { + flowInvocationBuilder_.mergeFrom(value); + } else { + flowInvocationBuilder_.setMessage(value); + } + } + actionCase_ = 5; + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFlowInvocation() { + if (flowInvocationBuilder_ == null) { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + onChanged(); + } + } else { + if (actionCase_ == 5) { + actionCase_ = 0; + action_ = null; + } + flowInvocationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder + getFlowInvocationBuilder() { + return getFlowInvocationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder + getFlowInvocationOrBuilder() { + if ((actionCase_ == 5) && (flowInvocationBuilder_ != null)) { + return flowInvocationBuilder_.getMessageOrBuilder(); + } else { + if (actionCase_ == 5) { + return (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_; + } + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Optional. Action performed on behalf of the agent by invoking a CX flow.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder> + getFlowInvocationFieldBuilder() { + if (flowInvocationBuilder_ == null) { + if (!(actionCase_ == 5)) { + action_ = com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + flowInvocationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) action_, + getParentForChildren(), + isClean()); + action_ = null; + } + actionCase_ = 5; + onChanged(); + return flowInvocationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Action) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Action) + private static final com.google.cloud.dialogflow.cx.v3beta1.Action DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Action(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Action getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Action parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Action getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionOrBuilder.java new file mode 100644 index 000000000000..3b2216db6a83 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionOrBuilder.java @@ -0,0 +1,240 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ActionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Action) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the userUtterance field is set. + */ + boolean hasUserUtterance(); + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The userUtterance. + */ + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getUserUtterance(); + /** + * + * + *
+   * Optional. Agent obtained a message from the customer.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.UserUtterance user_utterance = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder getUserUtteranceOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the agentUtterance field is set. + */ + boolean hasAgentUtterance(); + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The agentUtterance. + */ + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getAgentUtterance(); + /** + * + * + *
+   * Optional. Action performed by the agent as a message.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.AgentUtterance agent_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder getAgentUtteranceOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the toolUse field is set. + */ + boolean hasToolUse(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The toolUse. + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolUse getToolUse(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by calling a plugin
+   * tool.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ToolUse tool_use = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder getToolUseOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInvocation field is set. + */ + boolean hasPlaybookInvocation(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInvocation. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getPlaybookInvocation(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a child
+   * playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation playbook_invocation = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder + getPlaybookInvocationOrBuilder(); + + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the flowInvocation field is set. + */ + boolean hasFlowInvocation(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The flowInvocation. + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getFlowInvocation(); + /** + * + * + *
+   * Optional. Action performed on behalf of the agent by invoking a CX flow.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.FlowInvocation flow_invocation = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder getFlowInvocationOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.Action.ActionCase getActionCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java new file mode 100644 index 000000000000..2cb6c07850df --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameter.java @@ -0,0 +1,896 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Parameter associated with action.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ActionParameter} + */ +public final class ActionParameter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + ActionParameterOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActionParameter.newBuilder() to construct. + private ActionParameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActionParameter() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActionParameter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.class, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. Name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.Value value_; + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.Value getValue() { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ActionParameter)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter other = + (com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) obj; + + if (!getName().equals(other.getName())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Parameter associated with action.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ActionParameter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.class, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getValueFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter build() { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result = + new com.google.cloud.dialogflow.cx.v3beta1.ActionParameter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = valueBuilder_ == null ? value_ : valueBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ActionParameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + valueBuilder_; + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + public com.google.protobuf.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + } else { + valueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeValue(com.google.protobuf.Value value) { + if (valueBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && value_ != null + && value_ != com.google.protobuf.Value.getDefaultInstance()) { + getValueBuilder().mergeFrom(value); + } else { + value_ = value; + } + } else { + valueBuilder_.mergeFrom(value); + } + if (value_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = null; + if (valueBuilder_ != null) { + valueBuilder_.dispose(); + valueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Value.Builder getValueBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; + } + } + /** + * + * + *
+     * Required. Value of the parameter.
+     * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Value, + com.google.protobuf.Value.Builder, + com.google.protobuf.ValueOrBuilder>(getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + private static final com.google.cloud.dialogflow.cx.v3beta1.ActionParameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ActionParameter(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActionParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java new file mode 100644 index 000000000000..07cad2338f5c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ActionParameterOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ActionParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ActionParameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The value. + */ + com.google.protobuf.Value getValue(); + /** + * + * + *
+   * Required. Value of the parameter.
+   * 
+ * + * .google.protobuf.Value value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.ValueOrBuilder getValueOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java index e4039123207a..61a79b692d72 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Agent.java @@ -59,6 +59,7 @@ private Agent() { description_ = ""; avatarUri_ = ""; startFlow_ = ""; + startPlaybook_ = ""; securitySettings_ = ""; } @@ -4389,14 +4390,17 @@ public com.google.cloud.dialogflow.cx.v3beta1.SpeechToTextSettings getSpeechToTe * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
+   * Optional. Name of the start flow in this agent. A start flow will be
    * automatically created when the agent is created, and can only be deleted by
    * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The startFlow. @@ -4417,14 +4421,17 @@ public java.lang.String getStartFlow() { * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
+   * Optional. Name of the start flow in this agent. A start flow will be
    * automatically created when the agent is created, and can only be deleted by
    * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for startFlow. @@ -4442,6 +4449,77 @@ public com.google.protobuf.ByteString getStartFlowBytes() { } } + public static final int START_PLAYBOOK_FIELD_NUMBER = 39; + + @SuppressWarnings("serial") + private volatile java.lang.Object startPlaybook_ = ""; + /** + * + * + *
+   * Optional. Name of the start playbook in this agent. A start playbook will
+   * be automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
+   * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The startPlaybook. + */ + @java.lang.Override + public java.lang.String getStartPlaybook() { + java.lang.Object ref = startPlaybook_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startPlaybook_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Name of the start playbook in this agent. A start playbook will
+   * be automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
+   * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for startPlaybook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStartPlaybookBytes() { + java.lang.Object ref = startPlaybook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int SECURITY_SETTINGS_FIELD_NUMBER = 17; @SuppressWarnings("serial") @@ -4514,7 +4592,7 @@ public com.google.protobuf.ByteString getSecuritySettingsBytes() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=342 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -4917,6 +4995,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(38, getAnswerFeedbackSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startPlaybook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 39, startPlaybook_); + } getUnknownFields().writeTo(output); } @@ -4990,6 +5071,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getAnswerFeedbackSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(startPlaybook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, startPlaybook_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -5019,6 +5103,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSpeechToTextSettings().equals(other.getSpeechToTextSettings())) return false; } if (!getStartFlow().equals(other.getStartFlow())) return false; + if (!getStartPlaybook().equals(other.getStartPlaybook())) return false; if (!getSecuritySettings().equals(other.getSecuritySettings())) return false; if (getEnableStackdriverLogging() != other.getEnableStackdriverLogging()) return false; if (getEnableSpellCorrection() != other.getEnableSpellCorrection()) return false; @@ -5076,6 +5161,8 @@ public int hashCode() { } hash = (37 * hash) + START_FLOW_FIELD_NUMBER; hash = (53 * hash) + getStartFlow().hashCode(); + hash = (37 * hash) + START_PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getStartPlaybook().hashCode(); hash = (37 * hash) + SECURITY_SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSecuritySettings().hashCode(); hash = (37 * hash) + ENABLE_STACKDRIVER_LOGGING_FIELD_NUMBER; @@ -5282,6 +5369,7 @@ public Builder clear() { speechToTextSettingsBuilder_ = null; } startFlow_ = ""; + startPlaybook_ = ""; securitySettings_ = ""; enableStackdriverLogging_ = false; enableSpellCorrection_ = false; @@ -5381,44 +5469,47 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Agent result) result.startFlow_ = startFlow_; } if (((from_bitField0_ & 0x00000200) != 0)) { - result.securitySettings_ = securitySettings_; + result.startPlaybook_ = startPlaybook_; } if (((from_bitField0_ & 0x00000400) != 0)) { - result.enableStackdriverLogging_ = enableStackdriverLogging_; + result.securitySettings_ = securitySettings_; } if (((from_bitField0_ & 0x00000800) != 0)) { - result.enableSpellCorrection_ = enableSpellCorrection_; + result.enableStackdriverLogging_ = enableStackdriverLogging_; } if (((from_bitField0_ & 0x00001000) != 0)) { - result.locked_ = locked_; + result.enableSpellCorrection_ = enableSpellCorrection_; } if (((from_bitField0_ & 0x00002000) != 0)) { + result.locked_ = locked_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00008000) != 0)) { result.gitIntegrationSettings_ = gitIntegrationSettingsBuilder_ == null ? gitIntegrationSettings_ : gitIntegrationSettingsBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { result.textToSpeechSettings_ = textToSpeechSettingsBuilder_ == null ? textToSpeechSettings_ : textToSpeechSettingsBuilder_.build(); to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00020000) != 0)) { result.genAppBuilderSettings_ = genAppBuilderSettingsBuilder_ == null ? genAppBuilderSettings_ : genAppBuilderSettingsBuilder_.build(); to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.answerFeedbackSettings_ = answerFeedbackSettingsBuilder_ == null ? answerFeedbackSettings_ @@ -5521,9 +5612,14 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Agent other) { bitField0_ |= 0x00000100; onChanged(); } + if (!other.getStartPlaybook().isEmpty()) { + startPlaybook_ = other.startPlaybook_; + bitField0_ |= 0x00000200; + onChanged(); + } if (!other.getSecuritySettings().isEmpty()) { securitySettings_ = other.securitySettings_; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); } if (other.getEnableStackdriverLogging() != false) { @@ -5635,62 +5731,68 @@ public Builder mergeFrom( case 138: { securitySettings_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; break; } // case 138 case 144: { enableStackdriverLogging_ = input.readBool(); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; break; } // case 144 case 160: { enableSpellCorrection_ = input.readBool(); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; break; } // case 160 case 178: { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; break; } // case 178 case 216: { locked_ = input.readBool(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; break; } // case 216 case 242: { input.readMessage( getGitIntegrationSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; break; } // case 242 case 250: { input.readMessage( getTextToSpeechSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; break; } // case 250 case 266: { input.readMessage( getGenAppBuilderSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; break; } // case 266 case 306: { input.readMessage( getAnswerFeedbackSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; break; } // case 306 + case 314: + { + startPlaybook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 314 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -6836,14 +6938,17 @@ public Builder clearSpeechToTextSettings() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
+     * Optional. Name of the start flow in this agent. A start flow will be
      * automatically created when the agent is created, and can only be deleted by
      * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The startFlow. @@ -6863,14 +6968,17 @@ public java.lang.String getStartFlow() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
+     * Optional. Name of the start flow in this agent. A start flow will be
      * automatically created when the agent is created, and can only be deleted by
      * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for startFlow. @@ -6890,14 +6998,17 @@ public com.google.protobuf.ByteString getStartFlowBytes() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
+     * Optional. Name of the start flow in this agent. A start flow will be
      * automatically created when the agent is created, and can only be deleted by
      * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The startFlow to set. @@ -6916,14 +7027,17 @@ public Builder setStartFlow(java.lang.String value) { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
+     * Optional. Name of the start flow in this agent. A start flow will be
      * automatically created when the agent is created, and can only be deleted by
      * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return This builder for chaining. @@ -6938,14 +7052,17 @@ public Builder clearStartFlow() { * * *
-     * Immutable. Name of the start flow in this agent. A start flow will be
+     * Optional. Name of the start flow in this agent. A start flow will be
      * automatically created when the agent is created, and can only be deleted by
      * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-     * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+     * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+     * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
      * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @param value The bytes for startFlow to set. @@ -6962,6 +7079,162 @@ public Builder setStartFlowBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object startPlaybook_ = ""; + /** + * + * + *
+     * Optional. Name of the start playbook in this agent. A start playbook will
+     * be automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
+     * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The startPlaybook. + */ + public java.lang.String getStartPlaybook() { + java.lang.Object ref = startPlaybook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + startPlaybook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Name of the start playbook in this agent. A start playbook will
+     * be automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
+     * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for startPlaybook. + */ + public com.google.protobuf.ByteString getStartPlaybookBytes() { + java.lang.Object ref = startPlaybook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + startPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Name of the start playbook in this agent. A start playbook will
+     * be automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
+     * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The startPlaybook to set. + * @return This builder for chaining. + */ + public Builder setStartPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + startPlaybook_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the start playbook in this agent. A start playbook will
+     * be automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
+     * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearStartPlaybook() { + startPlaybook_ = getDefaultInstance().getStartPlaybook(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the start playbook in this agent. A start playbook will
+     * be automatically created when the agent is created, and can only be deleted
+     * by deleting the agent.
+     * Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+     * default playbook with id
+     * "00000000-0000-0000-0000-000000000000" is allowed.
+     *
+     * Only one of `start_flow` or `start_playbook` should be set, but not both.
+     * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for startPlaybook to set. + * @return This builder for chaining. + */ + public Builder setStartPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + startPlaybook_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + private java.lang.Object securitySettings_ = ""; /** * @@ -7033,7 +7306,7 @@ public Builder setSecuritySettings(java.lang.String value) { throw new NullPointerException(); } securitySettings_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -7053,7 +7326,7 @@ public Builder setSecuritySettings(java.lang.String value) { */ public Builder clearSecuritySettings() { securitySettings_ = getDefaultInstance().getSecuritySettings(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -7078,7 +7351,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); securitySettings_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -7097,7 +7370,7 @@ public Builder setSecuritySettingsBytes(com.google.protobuf.ByteString value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=342 * @return The enableStackdriverLogging. */ @java.lang.Override @@ -7118,7 +7391,7 @@ public boolean getEnableStackdriverLogging() { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=342 * @param value The enableStackdriverLogging to set. * @return This builder for chaining. */ @@ -7126,7 +7399,7 @@ public boolean getEnableStackdriverLogging() { public Builder setEnableStackdriverLogging(boolean value) { enableStackdriverLogging_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -7143,12 +7416,12 @@ public Builder setEnableStackdriverLogging(boolean value) { * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=342 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearEnableStackdriverLogging() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); enableStackdriverLogging_ = false; onChanged(); return this; @@ -7187,7 +7460,7 @@ public boolean getEnableSpellCorrection() { public Builder setEnableSpellCorrection(boolean value) { enableSpellCorrection_ = value; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -7204,7 +7477,7 @@ public Builder setEnableSpellCorrection(boolean value) { * @return This builder for chaining. */ public Builder clearEnableSpellCorrection() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00001000); enableSpellCorrection_ = false; onChanged(); return this; @@ -7243,7 +7516,7 @@ public boolean getLocked() { public Builder setLocked(boolean value) { locked_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00002000; onChanged(); return this; } @@ -7260,7 +7533,7 @@ public Builder setLocked(boolean value) { * @return This builder for chaining. */ public Builder clearLocked() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00002000); locked_ = false; onChanged(); return this; @@ -7285,7 +7558,7 @@ public Builder clearLocked() { * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00004000) != 0); } /** * @@ -7328,7 +7601,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -7349,7 +7622,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return this; } @@ -7366,7 +7639,7 @@ public Builder setAdvancedSettings( public Builder mergeAdvancedSettings( com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00004000) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { @@ -7378,7 +7651,7 @@ public Builder mergeAdvancedSettings( advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); } return this; @@ -7394,7 +7667,7 @@ public Builder mergeAdvancedSettings( * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 22; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00004000); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -7415,7 +7688,7 @@ public Builder clearAdvancedSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00004000; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -7487,7 +7760,7 @@ public Builder clearAdvancedSettings() { * @return Whether the gitIntegrationSettings field is set. */ public boolean hasGitIntegrationSettings() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00008000) != 0); } /** * @@ -7534,7 +7807,7 @@ public Builder setGitIntegrationSettings( } else { gitIntegrationSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -7557,7 +7830,7 @@ public Builder setGitIntegrationSettings( } else { gitIntegrationSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -7575,7 +7848,7 @@ public Builder setGitIntegrationSettings( public Builder mergeGitIntegrationSettings( com.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings value) { if (gitIntegrationSettingsBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00008000) != 0) && gitIntegrationSettings_ != null && gitIntegrationSettings_ != com.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings @@ -7588,7 +7861,7 @@ public Builder mergeGitIntegrationSettings( gitIntegrationSettingsBuilder_.mergeFrom(value); } if (gitIntegrationSettings_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -7605,7 +7878,7 @@ public Builder mergeGitIntegrationSettings( *
*/ public Builder clearGitIntegrationSettings() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00008000); gitIntegrationSettings_ = null; if (gitIntegrationSettingsBuilder_ != null) { gitIntegrationSettingsBuilder_.dispose(); @@ -7627,7 +7900,7 @@ public Builder clearGitIntegrationSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.Agent.GitIntegrationSettings.Builder getGitIntegrationSettingsBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00008000; onChanged(); return getGitIntegrationSettingsFieldBuilder().getBuilder(); } @@ -7701,7 +7974,7 @@ public Builder clearGitIntegrationSettings() { * @return Whether the textToSpeechSettings field is set. */ public boolean hasTextToSpeechSettings() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -7746,7 +8019,7 @@ public Builder setTextToSpeechSettings( } else { textToSpeechSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -7768,7 +8041,7 @@ public Builder setTextToSpeechSettings( } else { textToSpeechSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -7786,7 +8059,7 @@ public Builder setTextToSpeechSettings( public Builder mergeTextToSpeechSettings( com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings value) { if (textToSpeechSettingsBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00010000) != 0) && textToSpeechSettings_ != null && textToSpeechSettings_ != com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings @@ -7799,7 +8072,7 @@ public Builder mergeTextToSpeechSettings( textToSpeechSettingsBuilder_.mergeFrom(value); } if (textToSpeechSettings_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -7816,7 +8089,7 @@ public Builder mergeTextToSpeechSettings( * */ public Builder clearTextToSpeechSettings() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00010000); textToSpeechSettings_ = null; if (textToSpeechSettingsBuilder_ != null) { textToSpeechSettingsBuilder_.dispose(); @@ -7838,7 +8111,7 @@ public Builder clearTextToSpeechSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.TextToSpeechSettings.Builder getTextToSpeechSettingsBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00010000; onChanged(); return getTextToSpeechSettingsFieldBuilder().getBuilder(); } @@ -7912,7 +8185,7 @@ public Builder clearTextToSpeechSettings() { * @return Whether the genAppBuilderSettings field is set. */ public boolean hasGenAppBuilderSettings() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00020000) != 0); } /** * @@ -7959,7 +8232,7 @@ public Builder setGenAppBuilderSettings( } else { genAppBuilderSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -7982,7 +8255,7 @@ public Builder setGenAppBuilderSettings( } else { genAppBuilderSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -8000,7 +8273,7 @@ public Builder setGenAppBuilderSettings( public Builder mergeGenAppBuilderSettings( com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings value) { if (genAppBuilderSettingsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00020000) != 0) && genAppBuilderSettings_ != null && genAppBuilderSettings_ != com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings @@ -8013,7 +8286,7 @@ public Builder mergeGenAppBuilderSettings( genAppBuilderSettingsBuilder_.mergeFrom(value); } if (genAppBuilderSettings_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); } return this; @@ -8030,7 +8303,7 @@ public Builder mergeGenAppBuilderSettings( * */ public Builder clearGenAppBuilderSettings() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00020000); genAppBuilderSettings_ = null; if (genAppBuilderSettingsBuilder_ != null) { genAppBuilderSettingsBuilder_.dispose(); @@ -8052,7 +8325,7 @@ public Builder clearGenAppBuilderSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.Agent.GenAppBuilderSettings.Builder getGenAppBuilderSettingsBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00020000; onChanged(); return getGenAppBuilderSettingsFieldBuilder().getBuilder(); } @@ -8127,7 +8400,7 @@ public Builder clearGenAppBuilderSettings() { * @return Whether the answerFeedbackSettings field is set. */ public boolean hasAnswerFeedbackSettings() { - return ((bitField0_ & 0x00020000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -8174,7 +8447,7 @@ public Builder setAnswerFeedbackSettings( } else { answerFeedbackSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -8197,7 +8470,7 @@ public Builder setAnswerFeedbackSettings( } else { answerFeedbackSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -8215,7 +8488,7 @@ public Builder setAnswerFeedbackSettings( public Builder mergeAnswerFeedbackSettings( com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings value) { if (answerFeedbackSettingsBuilder_ == null) { - if (((bitField0_ & 0x00020000) != 0) + if (((bitField0_ & 0x00040000) != 0) && answerFeedbackSettings_ != null && answerFeedbackSettings_ != com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings @@ -8228,7 +8501,7 @@ public Builder mergeAnswerFeedbackSettings( answerFeedbackSettingsBuilder_.mergeFrom(value); } if (answerFeedbackSettings_ != null) { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -8245,7 +8518,7 @@ public Builder mergeAnswerFeedbackSettings( * */ public Builder clearAnswerFeedbackSettings() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00040000); answerFeedbackSettings_ = null; if (answerFeedbackSettingsBuilder_ != null) { answerFeedbackSettingsBuilder_.dispose(); @@ -8267,7 +8540,7 @@ public Builder clearAnswerFeedbackSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.Agent.AnswerFeedbackSettings.Builder getAnswerFeedbackSettingsBuilder() { - bitField0_ |= 0x00020000; + bitField0_ |= 0x00040000; onChanged(); return getAnswerFeedbackSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java index 8a48dcccdf92..bc1f0127268b 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentOrBuilder.java @@ -312,14 +312,17 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
+   * Optional. Name of the start flow in this agent. A start flow will be
    * automatically created when the agent is created, and can only be deleted by
    * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The startFlow. @@ -329,20 +332,68 @@ public interface AgentOrBuilder * * *
-   * Immutable. Name of the start flow in this agent. A start flow will be
+   * Optional. Name of the start flow in this agent. A start flow will be
    * automatically created when the agent is created, and can only be deleted by
    * deleting the agent. Format: `projects/<Project ID>/locations/<Location
-   * ID>/agents/<Agent ID>/flows/<Flow ID>`.
+   * ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
+   * flow with id "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
    * 
* * - * string start_flow = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } + * string start_flow = 16 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } * * * @return The bytes for startFlow. */ com.google.protobuf.ByteString getStartFlowBytes(); + /** + * + * + *
+   * Optional. Name of the start playbook in this agent. A start playbook will
+   * be automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
+   * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The startPlaybook. + */ + java.lang.String getStartPlaybook(); + /** + * + * + *
+   * Optional. Name of the start playbook in this agent. A start playbook will
+   * be automatically created when the agent is created, and can only be deleted
+   * by deleting the agent.
+   * Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/playbooks/<Playbook ID>`. Currently only the
+   * default playbook with id
+   * "00000000-0000-0000-0000-000000000000" is allowed.
+   *
+   * Only one of `start_flow` or `start_playbook` should be set, but not both.
+   * 
+ * + * + * string start_playbook = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for startPlaybook. + */ + com.google.protobuf.ByteString getStartPlaybookBytes(); + /** * * @@ -387,7 +438,7 @@ public interface AgentOrBuilder * bool enable_stackdriver_logging = 18 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.Agent.enable_stackdriver_logging is deprecated. - * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=323 + * See google/cloud/dialogflow/cx/v3beta1/agent.proto;l=342 * @return The enableStackdriverLogging. */ @java.lang.Deprecated diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java index 410031bbc901..1a23c7c696e4 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentProto.java @@ -140,175 +140,177 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pty.proto\032 google/protobuf/field_mask.pr" + "oto\032\034google/protobuf/struct.proto\"8\n\024Spe" + "echToTextSettings\022 \n\030enable_speech_adapt" - + "ation\030\001 \001(\010\"\327\013\n\005Agent\022\014\n\004name\030\001 \001(\t\022\031\n\014d" + + "ation\030\001 \001(\010\"\233\014\n\005Agent\022\014\n\004name\030\001 \001(\t\022\031\n\014d" + "isplay_name\030\002 \001(\tB\003\340A\002\022%\n\025default_langua" + "ge_code\030\003 \001(\tB\006\340A\002\340A\005\022 \n\030supported_langu" + "age_codes\030\004 \003(\t\022\026\n\ttime_zone\030\005 \001(\tB\003\340A\002\022" + "\023\n\013description\030\006 \001(\t\022\022\n\navatar_uri\030\007 \001(\t" + "\022Y\n\027speech_to_text_settings\030\r \001(\01328.goog" + "le.cloud.dialogflow.cx.v3beta1.SpeechToT" - + "extSettings\022:\n\nstart_flow\030\020 \001(\tB&\340A\005\372A \n" - + "\036dialogflow.googleapis.com/Flow\022J\n\021secur" - + "ity_settings\030\021 \001(\tB/\372A,\n*dialogflow.goog" - + "leapis.com/SecuritySettings\022&\n\032enable_st" - + "ackdriver_logging\030\022 \001(\010B\002\030\001\022\037\n\027enable_sp" - + "ell_correction\030\024 \001(\010\022\016\n\006locked\030\033 \001(\010\022O\n\021" - + "advanced_settings\030\026 \001(\01324.google.cloud.d" - + "ialogflow.cx.v3beta1.AdvancedSettings\022b\n" - + "\030git_integration_settings\030\036 \001(\0132@.google" - + ".cloud.dialogflow.cx.v3beta1.Agent.GitIn" - + "tegrationSettings\022Y\n\027text_to_speech_sett" - + "ings\030\037 \001(\01328.google.cloud.dialogflow.cx." - + "v3beta1.TextToSpeechSettings\022f\n\030gen_app_" - + "builder_settings\030! \001(\0132?.google.cloud.di" - + "alogflow.cx.v3beta1.Agent.GenAppBuilderS" - + "ettingsH\000\210\001\001\022g\n\030answer_feedback_settings" - + "\030& \001(\0132@.google.cloud.dialogflow.cx.v3be" - + "ta1.Agent.AnswerFeedbackSettingsB\003\340A\001\032\225\002" - + "\n\026GitIntegrationSettings\022j\n\017github_setti" - + "ngs\030\001 \001(\0132O.google.cloud.dialogflow.cx.v" - + "3beta1.Agent.GitIntegrationSettings.Gith" - + "ubSettingsH\000\032\177\n\016GithubSettings\022\024\n\014displa" - + "y_name\030\001 \001(\t\022\026\n\016repository_uri\030\002 \001(\t\022\027\n\017" - + "tracking_branch\030\003 \001(\t\022\024\n\014access_token\030\004 " - + "\001(\t\022\020\n\010branches\030\005 \003(\tB\016\n\014git_settings\032,\n" - + "\025GenAppBuilderSettings\022\023\n\006engine\030\001 \001(\tB\003" - + "\340A\002\032=\n\026AnswerFeedbackSettings\022#\n\026enable_" - + "answer_feedback\030\001 \001(\010B\003\340A\001:\\\352AY\n\037dialogf" - + "low.googleapis.com/Agent\0226projects/{proj" - + "ect}/locations/{location}/agents/{agent}" - + "B\033\n\031_gen_app_builder_settings\"s\n\021ListAge" - + "ntsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dial" - + "ogflow.googleapis.com/Agent\022\021\n\tpage_size" - + "\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"h\n\022ListAgents" - + "Response\0229\n\006agents\030\001 \003(\0132).google.cloud." - + "dialogflow.cx.v3beta1.Agent\022\027\n\017next_page" - + "_token\030\002 \001(\t\"H\n\017GetAgentRequest\0225\n\004name\030" - + "\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleapis.com" - + "/Agent\"\214\001\n\022CreateAgentRequest\0227\n\006parent\030" - + "\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.googleapis.com" - + "/Agent\022=\n\005agent\030\002 \001(\0132).google.cloud.dia" - + "logflow.cx.v3beta1.AgentB\003\340A\002\"\204\001\n\022Update" - + "AgentRequest\022=\n\005agent\030\001 \001(\0132).google.clo" - + "ud.dialogflow.cx.v3beta1.AgentB\003\340A\002\022/\n\013u" - + "pdate_mask\030\002 \001(\0132\032.google.protobuf.Field" - + "Mask\"K\n\022DeleteAgentRequest\0225\n\004name\030\001 \001(\t" - + "B\'\340A\002\372A!\n\037dialogflow.googleapis.com/Agen" - + "t\"\242\004\n\022ExportAgentRequest\0225\n\004name\030\001 \001(\tB\'" - + "\340A\002\372A!\n\037dialogflow.googleapis.com/Agent\022" - + "\026\n\tagent_uri\030\002 \001(\tB\003\340A\001\022[\n\013data_format\030\003" - + " \001(\0162A.google.cloud.dialogflow.cx.v3beta" - + "1.ExportAgentRequest.DataFormatB\003\340A\001\022B\n\013" - + "environment\030\005 \001(\tB-\340A\001\372A\'\n%dialogflow.go" - + "ogleapis.com/Environment\022c\n\017git_destinat" - + "ion\030\006 \001(\0132E.google.cloud.dialogflow.cx.v" - + "3beta1.ExportAgentRequest.GitDestination" - + "B\003\340A\001\022-\n include_bigquery_export_setting" - + "s\030\007 \001(\010B\003\340A\001\032A\n\016GitDestination\022\027\n\017tracki" - + "ng_branch\030\001 \001(\t\022\026\n\016commit_message\030\002 \001(\t\"" - + "E\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED" - + "\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKAGE\020\004\"b\n\023Export" - + "AgentResponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\rag" - + "ent_content\030\002 \001(\014H\000\022\024\n\ncommit_sha\030\003 \001(\tH" - + "\000B\007\n\005agent\"\252\003\n\023RestoreAgentRequest\0225\n\004na" - + "me\030\001 \001(\tB\'\340A\002\372A!\n\037dialogflow.googleapis." - + "com/Agent\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_" - + "content\030\003 \001(\014H\000\022W\n\ngit_source\030\006 \001(\0132A.go" - + "ogle.cloud.dialogflow.cx.v3beta1.Restore" - + "AgentRequest.GitSourceH\000\022]\n\016restore_opti" - + "on\030\005 \001(\0162E.google.cloud.dialogflow.cx.v3" - + "beta1.RestoreAgentRequest.RestoreOption\032" - + "$\n\tGitSource\022\027\n\017tracking_branch\030\001 \001(\t\"G\n" - + "\rRestoreOption\022\036\n\032RESTORE_OPTION_UNSPECI" - + "FIED\020\000\022\010\n\004KEEP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"" - + "d\n\024ValidateAgentRequest\0225\n\004name\030\001 \001(\tB\'\340" - + "A\002\372A!\n\037dialogflow.googleapis.com/Agent\022\025" - + "\n\rlanguage_code\030\002 \001(\t\"\177\n\037GetAgentValidat" - + "ionResultRequest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/" - + "dialogflow.googleapis.com/AgentValidatio" - + "nResult\022\025\n\rlanguage_code\030\002 \001(\t\"\377\001\n\025Agent" - + "ValidationResult\022\014\n\004name\030\001 \001(\t\022Y\n\027flow_v" - + "alidation_results\030\002 \003(\01328.google.cloud.d" - + "ialogflow.cx.v3beta1.FlowValidationResul" - + "t:}\352Az\n/dialogflow.googleapis.com/AgentV" - + "alidationResult\022Gprojects/{project}/loca" - + "tions/{location}/agents/{agent}/validati" - + "onResult\"\203\001\n\034GetGenerativeSettingsReques" - + "t\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1dialogflow.goog" - + "leapis.com/AgentGenerativeSettings\022\032\n\rla" - + "nguage_code\030\002 \001(\tB\003\340A\002\"\261\001\n\037UpdateGenerat" - + "iveSettingsRequest\022X\n\023generative_setting" - + "s\030\001 \001(\01326.google.cloud.dialogflow.cx.v3b" - + "eta1.GenerativeSettingsB\003\340A\002\0224\n\013update_m" - + "ask\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340" - + "A\0012\270\023\n\006Agents\022\275\001\n\nListAgents\0225.google.cl" - + "oud.dialogflow.cx.v3beta1.ListAgentsRequ" - + "est\0326.google.cloud.dialogflow.cx.v3beta1" - + ".ListAgentsResponse\"@\332A\006parent\202\323\344\223\0021\022//v" - + "3beta1/{parent=projects/*/locations/*}/a" - + "gents\022\252\001\n\010GetAgent\0223.google.cloud.dialog" - + "flow.cx.v3beta1.GetAgentRequest\032).google" - + ".cloud.dialogflow.cx.v3beta1.Agent\">\332A\004n" - + "ame\202\323\344\223\0021\022//v3beta1/{name=projects/*/loc" - + "ations/*/agents/*}\022\277\001\n\013CreateAgent\0226.goo" - + "gle.cloud.dialogflow.cx.v3beta1.CreateAg" - + "entRequest\032).google.cloud.dialogflow.cx." - + "v3beta1.Agent\"M\332A\014parent,agent\202\323\344\223\0028\"//v" - + "3beta1/{parent=projects/*/locations/*}/a" - + "gents:\005agent\022\312\001\n\013UpdateAgent\0226.google.cl" - + "oud.dialogflow.cx.v3beta1.UpdateAgentReq" - + "uest\032).google.cloud.dialogflow.cx.v3beta" - + "1.Agent\"X\332A\021agent,update_mask\202\323\344\223\002>25/v3" - + "beta1/{agent.name=projects/*/locations/*" - + "/agents/*}:\005agent\022\235\001\n\013DeleteAgent\0226.goog" - + "le.cloud.dialogflow.cx.v3beta1.DeleteAge" - + "ntRequest\032\026.google.protobuf.Empty\">\332A\004na" - + "me\202\323\344\223\0021*//v3beta1/{name=projects/*/loca" - + "tions/*/agents/*}\022\327\001\n\013ExportAgent\0226.goog" - + "le.cloud.dialogflow.cx.v3beta1.ExportAge" - + "ntRequest\032\035.google.longrunning.Operation" - + "\"q\312A-\n\023ExportAgentResponse\022\026google.proto" - + "buf.Struct\202\323\344\223\002;\"6/v3beta1/{name=project" - + "s/*/locations/*/agents/*}:export:\001*\022\334\001\n\014" - + "RestoreAgent\0227.google.cloud.dialogflow.c" - + "x.v3beta1.RestoreAgentRequest\032\035.google.l" - + "ongrunning.Operation\"t\312A/\n\025google.protob" - + "uf.Empty\022\026google.protobuf.Struct\202\323\344\223\002<\"7" - + "/v3beta1/{name=projects/*/locations/*/ag" - + "ents/*}:restore:\001*\022\311\001\n\rValidateAgent\0228.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Valida" - + "teAgentRequest\0329.google.cloud.dialogflow" - + ".cx.v3beta1.AgentValidationResult\"C\202\323\344\223\002" - + "=\"8/v3beta1/{name=projects/*/locations/*" - + "/agents/*}:validate:\001*\022\353\001\n\030GetAgentValid" - + "ationResult\022C.google.cloud.dialogflow.cx" - + ".v3beta1.GetAgentValidationResultRequest" - + "\0329.google.cloud.dialogflow.cx.v3beta1.Ag" - + "entValidationResult\"O\332A\004name\202\323\344\223\002B\022@/v3b" - + "eta1/{name=projects/*/locations/*/agents" - + "/*/validationResult}\022\362\001\n\025GetGenerativeSe" - + "ttings\022@.google.cloud.dialogflow.cx.v3be" - + "ta1.GetGenerativeSettingsRequest\0326.googl" - + "e.cloud.dialogflow.cx.v3beta1.Generative" - + "Settings\"_\332A\022name,language_code\202\323\344\223\002D\022B/" + + "extSettings\022:\n\nstart_flow\030\020 \001(\tB&\340A\001\372A \n" + + "\036dialogflow.googleapis.com/Flow\022B\n\016start" + + "_playbook\030\' \001(\tB*\340A\001\372A$\n\"dialogflow.goog" + + "leapis.com/Playbook\022J\n\021security_settings" + + "\030\021 \001(\tB/\372A,\n*dialogflow.googleapis.com/S" + + "ecuritySettings\022&\n\032enable_stackdriver_lo" + + "gging\030\022 \001(\010B\002\030\001\022\037\n\027enable_spell_correcti" + + "on\030\024 \001(\010\022\016\n\006locked\030\033 \001(\010\022O\n\021advanced_set" + + "tings\030\026 \001(\01324.google.cloud.dialogflow.cx" + + ".v3beta1.AdvancedSettings\022b\n\030git_integra" + + "tion_settings\030\036 \001(\0132@.google.cloud.dialo" + + "gflow.cx.v3beta1.Agent.GitIntegrationSet" + + "tings\022Y\n\027text_to_speech_settings\030\037 \001(\01328" + + ".google.cloud.dialogflow.cx.v3beta1.Text" + + "ToSpeechSettings\022f\n\030gen_app_builder_sett" + + "ings\030! \001(\0132?.google.cloud.dialogflow.cx." + + "v3beta1.Agent.GenAppBuilderSettingsH\000\210\001\001" + + "\022g\n\030answer_feedback_settings\030& \001(\0132@.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Agent.An" + + "swerFeedbackSettingsB\003\340A\001\032\225\002\n\026GitIntegra" + + "tionSettings\022j\n\017github_settings\030\001 \001(\0132O." + + "google.cloud.dialogflow.cx.v3beta1.Agent" + + ".GitIntegrationSettings.GithubSettingsH\000" + + "\032\177\n\016GithubSettings\022\024\n\014display_name\030\001 \001(\t" + + "\022\026\n\016repository_uri\030\002 \001(\t\022\027\n\017tracking_bra" + + "nch\030\003 \001(\t\022\024\n\014access_token\030\004 \001(\t\022\020\n\010branc" + + "hes\030\005 \003(\tB\016\n\014git_settings\032,\n\025GenAppBuild" + + "erSettings\022\023\n\006engine\030\001 \001(\tB\003\340A\002\032=\n\026Answe" + + "rFeedbackSettings\022#\n\026enable_answer_feedb" + + "ack\030\001 \001(\010B\003\340A\001:\\\352AY\n\037dialogflow.googleap" + + "is.com/Agent\0226projects/{project}/locatio" + + "ns/{location}/agents/{agent}B\033\n\031_gen_app" + + "_builder_settings\"s\n\021ListAgentsRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037dialogflow.googl" + + "eapis.com/Agent\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"h\n\022ListAgentsResponse\0229\n\006" + + "agents\030\001 \003(\0132).google.cloud.dialogflow.c" + + "x.v3beta1.Agent\022\027\n\017next_page_token\030\002 \001(\t" + + "\"H\n\017GetAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A" + + "!\n\037dialogflow.googleapis.com/Agent\"\214\001\n\022C" + + "reateAgentRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A" + + "!\022\037dialogflow.googleapis.com/Agent\022=\n\005ag" + + "ent\030\002 \001(\0132).google.cloud.dialogflow.cx.v" + + "3beta1.AgentB\003\340A\002\"\204\001\n\022UpdateAgentRequest" + + "\022=\n\005agent\030\001 \001(\0132).google.cloud.dialogflo" + + "w.cx.v3beta1.AgentB\003\340A\002\022/\n\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMask\"K\n\022Dele" + + "teAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037di" + + "alogflow.googleapis.com/Agent\"\242\004\n\022Export" + + "AgentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dial" + + "ogflow.googleapis.com/Agent\022\026\n\tagent_uri" + + "\030\002 \001(\tB\003\340A\001\022[\n\013data_format\030\003 \001(\0162A.googl" + + "e.cloud.dialogflow.cx.v3beta1.ExportAgen" + + "tRequest.DataFormatB\003\340A\001\022B\n\013environment\030" + + "\005 \001(\tB-\340A\001\372A\'\n%dialogflow.googleapis.com" + + "/Environment\022c\n\017git_destination\030\006 \001(\0132E." + + "google.cloud.dialogflow.cx.v3beta1.Expor" + + "tAgentRequest.GitDestinationB\003\340A\001\022-\n inc" + + "lude_bigquery_export_settings\030\007 \001(\010B\003\340A\001" + + "\032A\n\016GitDestination\022\027\n\017tracking_branch\030\001 " + + "\001(\t\022\026\n\016commit_message\030\002 \001(\t\"E\n\nDataForma" + + "t\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\010\n\004BLOB\020\001" + + "\022\020\n\014JSON_PACKAGE\020\004\"b\n\023ExportAgentRespons" + + "e\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\ragent_content\030" + + "\002 \001(\014H\000\022\024\n\ncommit_sha\030\003 \001(\tH\000B\007\n\005agent\"\252" + + "\003\n\023RestoreAgentRequest\0225\n\004name\030\001 \001(\tB\'\340A" + + "\002\372A!\n\037dialogflow.googleapis.com/Agent\022\023\n" + + "\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(" + + "\014H\000\022W\n\ngit_source\030\006 \001(\0132A.google.cloud.d" + + "ialogflow.cx.v3beta1.RestoreAgentRequest" + + ".GitSourceH\000\022]\n\016restore_option\030\005 \001(\0162E.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Restor" + + "eAgentRequest.RestoreOption\032$\n\tGitSource" + + "\022\027\n\017tracking_branch\030\001 \001(\t\"G\n\rRestoreOpti" + + "on\022\036\n\032RESTORE_OPTION_UNSPECIFIED\020\000\022\010\n\004KE" + + "EP\020\001\022\014\n\010FALLBACK\020\002B\007\n\005agent\"d\n\024ValidateA" + + "gentRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037dialo" + + "gflow.googleapis.com/Agent\022\025\n\rlanguage_c" + + "ode\030\002 \001(\t\"\177\n\037GetAgentValidationResultReq" + + "uest\022E\n\004name\030\001 \001(\tB7\340A\002\372A1\n/dialogflow.g" + + "oogleapis.com/AgentValidationResult\022\025\n\rl" + + "anguage_code\030\002 \001(\t\"\377\001\n\025AgentValidationRe" + + "sult\022\014\n\004name\030\001 \001(\t\022Y\n\027flow_validation_re" + + "sults\030\002 \003(\01328.google.cloud.dialogflow.cx" + + ".v3beta1.FlowValidationResult:}\352Az\n/dial" + + "ogflow.googleapis.com/AgentValidationRes" + + "ult\022Gprojects/{project}/locations/{locat" + + "ion}/agents/{agent}/validationResult\"\203\001\n" + + "\034GetGenerativeSettingsRequest\022G\n\004name\030\001 " + + "\001(\tB9\340A\002\372A3\n1dialogflow.googleapis.com/A" + + "gentGenerativeSettings\022\032\n\rlanguage_code\030" + + "\002 \001(\tB\003\340A\002\"\261\001\n\037UpdateGenerativeSettingsR" + + "equest\022X\n\023generative_settings\030\001 \001(\01326.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Generat" + + "iveSettingsB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032." + + "google.protobuf.FieldMaskB\003\340A\0012\270\023\n\006Agent" + + "s\022\275\001\n\nListAgents\0225.google.cloud.dialogfl" + + "ow.cx.v3beta1.ListAgentsRequest\0326.google" + + ".cloud.dialogflow.cx.v3beta1.ListAgentsR" + + "esponse\"@\332A\006parent\202\323\344\223\0021\022//v3beta1/{pare" + + "nt=projects/*/locations/*}/agents\022\252\001\n\010Ge" + + "tAgent\0223.google.cloud.dialogflow.cx.v3be" + + "ta1.GetAgentRequest\032).google.cloud.dialo" + + "gflow.cx.v3beta1.Agent\">\332A\004name\202\323\344\223\0021\022//" + "v3beta1/{name=projects/*/locations/*/age" - + "nts/*/generativeSettings}\022\257\002\n\030UpdateGene" - + "rativeSettings\022C.google.cloud.dialogflow" - + ".cx.v3beta1.UpdateGenerativeSettingsRequ" - + "est\0326.google.cloud.dialogflow.cx.v3beta1" - + ".GenerativeSettings\"\225\001\332A\037generative_sett" - + "ings,update_mask\202\323\344\223\002m2V/v3beta1/{genera" - + "tive_settings.name=projects/*/locations/" - + "*/agents/*/generativeSettings}:\023generati" - + "ve_settings\032x\312A\031dialogflow.googleapis.co" - + "m\322AYhttps://www.googleapis.com/auth/clou" - + "d-platform,https://www.googleapis.com/au" - + "th/dialogflowB\304\001\n&com.google.cloud.dialo" - + "gflow.cx.v3beta1B\nAgentProtoP\001Z6cloud.go" - + "ogle.com/go/dialogflow/cx/apiv3beta1/cxp" - + "b;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow" - + ".Cx.V3Beta1\352\002&Google::Cloud::Dialogflow:" - + ":CX::V3beta1b\006proto3" + + "nts/*}\022\277\001\n\013CreateAgent\0226.google.cloud.di" + + "alogflow.cx.v3beta1.CreateAgentRequest\032)" + + ".google.cloud.dialogflow.cx.v3beta1.Agen" + + "t\"M\332A\014parent,agent\202\323\344\223\0028\"//v3beta1/{pare" + + "nt=projects/*/locations/*}/agents:\005agent" + + "\022\312\001\n\013UpdateAgent\0226.google.cloud.dialogfl" + + "ow.cx.v3beta1.UpdateAgentRequest\032).googl" + + "e.cloud.dialogflow.cx.v3beta1.Agent\"X\332A\021" + + "agent,update_mask\202\323\344\223\002>25/v3beta1/{agent" + + ".name=projects/*/locations/*/agents/*}:\005" + + "agent\022\235\001\n\013DeleteAgent\0226.google.cloud.dia" + + "logflow.cx.v3beta1.DeleteAgentRequest\032\026." + + "google.protobuf.Empty\">\332A\004name\202\323\344\223\0021*//v" + + "3beta1/{name=projects/*/locations/*/agen" + + "ts/*}\022\327\001\n\013ExportAgent\0226.google.cloud.dia" + + "logflow.cx.v3beta1.ExportAgentRequest\032\035." + + "google.longrunning.Operation\"q\312A-\n\023Expor" + + "tAgentResponse\022\026google.protobuf.Struct\202\323" + + "\344\223\002;\"6/v3beta1/{name=projects/*/location" + + "s/*/agents/*}:export:\001*\022\334\001\n\014RestoreAgent" + + "\0227.google.cloud.dialogflow.cx.v3beta1.Re" + + "storeAgentRequest\032\035.google.longrunning.O" + + "peration\"t\312A/\n\025google.protobuf.Empty\022\026go" + + "ogle.protobuf.Struct\202\323\344\223\002<\"7/v3beta1/{na" + + "me=projects/*/locations/*/agents/*}:rest" + + "ore:\001*\022\311\001\n\rValidateAgent\0228.google.cloud." + + "dialogflow.cx.v3beta1.ValidateAgentReque" + + "st\0329.google.cloud.dialogflow.cx.v3beta1." + + "AgentValidationResult\"C\202\323\344\223\002=\"8/v3beta1/" + + "{name=projects/*/locations/*/agents/*}:v" + + "alidate:\001*\022\353\001\n\030GetAgentValidationResult\022" + + "C.google.cloud.dialogflow.cx.v3beta1.Get" + + "AgentValidationResultRequest\0329.google.cl" + + "oud.dialogflow.cx.v3beta1.AgentValidatio" + + "nResult\"O\332A\004name\202\323\344\223\002B\022@/v3beta1/{name=p" + + "rojects/*/locations/*/agents/*/validatio" + + "nResult}\022\362\001\n\025GetGenerativeSettings\022@.goo" + + "gle.cloud.dialogflow.cx.v3beta1.GetGener" + + "ativeSettingsRequest\0326.google.cloud.dial" + + "ogflow.cx.v3beta1.GenerativeSettings\"_\332A" + + "\022name,language_code\202\323\344\223\002D\022B/v3beta1/{nam" + + "e=projects/*/locations/*/agents/*/genera" + + "tiveSettings}\022\257\002\n\030UpdateGenerativeSettin" + + "gs\022C.google.cloud.dialogflow.cx.v3beta1." + + "UpdateGenerativeSettingsRequest\0326.google" + + ".cloud.dialogflow.cx.v3beta1.GenerativeS" + + "ettings\"\225\001\332A\037generative_settings,update_" + + "mask\202\323\344\223\002m2V/v3beta1/{generative_setting" + + "s.name=projects/*/locations/*/agents/*/g" + + "enerativeSettings}:\023generative_settings\032" + + "x\312A\031dialogflow.googleapis.com\322AYhttps://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/dialogflo" + + "wB\304\001\n&com.google.cloud.dialogflow.cx.v3b" + + "eta1B\nAgentProtoP\001Z6cloud.google.com/go/" + + "dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002" + + "DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Beta1\352" + + "\002&Google::Cloud::Dialogflow::CX::V3beta1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -350,6 +352,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AvatarUri", "SpeechToTextSettings", "StartFlow", + "StartPlaybook", "SecuritySettings", "EnableStackdriverLogging", "EnableSpellCorrection", diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtterance.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtterance.java new file mode 100644 index 000000000000..034dd4f95b9c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtterance.java @@ -0,0 +1,626 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * AgentUtterance represents one message sent by the agent.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AgentUtterance} + */ +public final class AgentUtterance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.AgentUtterance) + AgentUtteranceOrBuilder { + private static final long serialVersionUID = 0L; + // Use AgentUtterance.newBuilder() to construct. + private AgentUtterance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AgentUtterance() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AgentUtterance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.class, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance other = + (com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) obj; + + if (!getText().equals(other.getText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * AgentUtterance represents one message sent by the agent.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.AgentUtterance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.AgentUtterance) + com.google.cloud.dialogflow.cx.v3beta1.AgentUtteranceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.class, + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance build() { + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance result = + new com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.AgentUtterance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.AgentUtterance) + private static final com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AgentUtterance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.AgentUtterance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtteranceOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtteranceOrBuilder.java new file mode 100644 index 000000000000..083af1421754 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentUtteranceOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface AgentUtteranceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.AgentUtterance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java index 24ec6d71a893..7a66fc582dfd 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AudioConfigProto.java @@ -80,7 +80,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "idence\030\004 \001(\002\"{\n\rBargeInConfig\0227\n\024no_barg" + "e_in_duration\030\001 \001(\0132\031.google.protobuf.Du" + "ration\0221\n\016total_duration\030\002 \001(\0132\031.google." - + "protobuf.Duration\"\361\002\n\020InputAudioConfig\022N" + + "protobuf.Duration\"\234\003\n\020InputAudioConfig\022N" + "\n\016audio_encoding\030\001 \001(\01621.google.cloud.di" + "alogflow.cx.v3beta1.AudioEncodingB\003\340A\002\022\031" + "\n\021sample_rate_hertz\030\002 \001(\005\022\030\n\020enable_word" @@ -89,54 +89,55 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".cloud.dialogflow.cx.v3beta1.SpeechModel" + "Variant\022\030\n\020single_utterance\030\010 \001(\010\022J\n\017bar" + "ge_in_config\030\017 \001(\01321.google.cloud.dialog" - + "flow.cx.v3beta1.BargeInConfig\"n\n\024VoiceSe" - + "lectionParams\022\014\n\004name\030\001 \001(\t\022H\n\013ssml_gend" - + "er\030\002 \001(\01623.google.cloud.dialogflow.cx.v3" - + "beta1.SsmlVoiceGender\"\273\001\n\026SynthesizeSpee" - + "chConfig\022\025\n\rspeaking_rate\030\001 \001(\001\022\r\n\005pitch" - + "\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(\001\022\032\n\022effect" - + "s_profile_id\030\005 \003(\t\022G\n\005voice\030\004 \001(\01328.goog" - + "le.cloud.dialogflow.cx.v3beta1.VoiceSele" - + "ctionParams\"\342\001\n\021OutputAudioConfig\022T\n\016aud" - + "io_encoding\030\001 \001(\01627.google.cloud.dialogf" - + "low.cx.v3beta1.OutputAudioEncodingB\003\340A\002\022" - + "\031\n\021sample_rate_hertz\030\002 \001(\005\022\\\n\030synthesize" - + "_speech_config\030\003 \001(\0132:.google.cloud.dial" - + "ogflow.cx.v3beta1.SynthesizeSpeechConfig" - + "\"\214\002\n\024TextToSpeechSettings\022x\n\031synthesize_" - + "speech_configs\030\001 \003(\0132U.google.cloud.dial" - + "ogflow.cx.v3beta1.TextToSpeechSettings.S" - + "ynthesizeSpeechConfigsEntry\032z\n\034Synthesiz" - + "eSpeechConfigsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005valu" - + "e\030\002 \001(\0132:.google.cloud.dialogflow.cx.v3b" - + "eta1.SynthesizeSpeechConfig:\0028\001*\373\001\n\rAudi" - + "oEncoding\022\036\n\032AUDIO_ENCODING_UNSPECIFIED\020" - + "\000\022\034\n\030AUDIO_ENCODING_LINEAR_16\020\001\022\027\n\023AUDIO" - + "_ENCODING_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MULAW" - + "\020\003\022\026\n\022AUDIO_ENCODING_AMR\020\004\022\031\n\025AUDIO_ENCO" - + "DING_AMR_WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_OPUS" - + "\020\006\022)\n%AUDIO_ENCODING_SPEEX_WITH_HEADER_B" - + "YTE\020\007*v\n\022SpeechModelVariant\022$\n SPEECH_MO" - + "DEL_VARIANT_UNSPECIFIED\020\000\022\026\n\022USE_BEST_AV" - + "AILABLE\020\001\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_ENHAN" - + "CED\020\003*\215\001\n\017SsmlVoiceGender\022!\n\035SSML_VOICE_" - + "GENDER_UNSPECIFIED\020\000\022\032\n\026SSML_VOICE_GENDE" - + "R_MALE\020\001\022\034\n\030SSML_VOICE_GENDER_FEMALE\020\002\022\035" - + "\n\031SSML_VOICE_GENDER_NEUTRAL\020\003*\354\001\n\023Output" - + "AudioEncoding\022%\n!OUTPUT_AUDIO_ENCODING_U" - + "NSPECIFIED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_LI" - + "NEAR_16\020\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3\020\002" - + "\022%\n!OUTPUT_AUDIO_ENCODING_MP3_64_KBPS\020\004\022" - + "\"\n\036OUTPUT_AUDIO_ENCODING_OGG_OPUS\020\003\022\037\n\033O" - + "UTPUT_AUDIO_ENCODING_MULAW\020\005B\242\002\n&com.goo" - + "gle.cloud.dialogflow.cx.v3beta1B\020AudioCo" - + "nfigProtoP\001Z6cloud.google.com/go/dialogf" - + "low/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Go" - + "ogle.Cloud.Dialogflow.Cx.V3Beta1\352\002&Googl" - + "e::Cloud::Dialogflow::CX::V3beta1\352AU\n\033au" - + "toml.googleapis.com/Model\0226projects/{pro" - + "ject}/locations/{location}/models/{model" - + "}b\006proto3" + + "flow.cx.v3beta1.BargeInConfig\022)\n!opt_out" + + "_conformer_model_migration\030\032 \001(\010\"n\n\024Voic" + + "eSelectionParams\022\014\n\004name\030\001 \001(\t\022H\n\013ssml_g" + + "ender\030\002 \001(\01623.google.cloud.dialogflow.cx" + + ".v3beta1.SsmlVoiceGender\"\273\001\n\026SynthesizeS" + + "peechConfig\022\025\n\rspeaking_rate\030\001 \001(\001\022\r\n\005pi" + + "tch\030\002 \001(\001\022\026\n\016volume_gain_db\030\003 \001(\001\022\032\n\022eff" + + "ects_profile_id\030\005 \003(\t\022G\n\005voice\030\004 \001(\01328.g" + + "oogle.cloud.dialogflow.cx.v3beta1.VoiceS" + + "electionParams\"\342\001\n\021OutputAudioConfig\022T\n\016" + + "audio_encoding\030\001 \001(\01627.google.cloud.dial" + + "ogflow.cx.v3beta1.OutputAudioEncodingB\003\340" + + "A\002\022\031\n\021sample_rate_hertz\030\002 \001(\005\022\\\n\030synthes" + + "ize_speech_config\030\003 \001(\0132:.google.cloud.d" + + "ialogflow.cx.v3beta1.SynthesizeSpeechCon" + + "fig\"\214\002\n\024TextToSpeechSettings\022x\n\031synthesi" + + "ze_speech_configs\030\001 \003(\0132U.google.cloud.d" + + "ialogflow.cx.v3beta1.TextToSpeechSetting" + + "s.SynthesizeSpeechConfigsEntry\032z\n\034Synthe" + + "sizeSpeechConfigsEntry\022\013\n\003key\030\001 \001(\t\022I\n\005v" + + "alue\030\002 \001(\0132:.google.cloud.dialogflow.cx." + + "v3beta1.SynthesizeSpeechConfig:\0028\001*\373\001\n\rA" + + "udioEncoding\022\036\n\032AUDIO_ENCODING_UNSPECIFI" + + "ED\020\000\022\034\n\030AUDIO_ENCODING_LINEAR_16\020\001\022\027\n\023AU" + + "DIO_ENCODING_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MU" + + "LAW\020\003\022\026\n\022AUDIO_ENCODING_AMR\020\004\022\031\n\025AUDIO_E" + + "NCODING_AMR_WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_O" + + "PUS\020\006\022)\n%AUDIO_ENCODING_SPEEX_WITH_HEADE" + + "R_BYTE\020\007*v\n\022SpeechModelVariant\022$\n SPEECH" + + "_MODEL_VARIANT_UNSPECIFIED\020\000\022\026\n\022USE_BEST" + + "_AVAILABLE\020\001\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_EN" + + "HANCED\020\003*\215\001\n\017SsmlVoiceGender\022!\n\035SSML_VOI" + + "CE_GENDER_UNSPECIFIED\020\000\022\032\n\026SSML_VOICE_GE" + + "NDER_MALE\020\001\022\034\n\030SSML_VOICE_GENDER_FEMALE\020" + + "\002\022\035\n\031SSML_VOICE_GENDER_NEUTRAL\020\003*\354\001\n\023Out" + + "putAudioEncoding\022%\n!OUTPUT_AUDIO_ENCODIN" + + "G_UNSPECIFIED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING" + + "_LINEAR_16\020\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP" + + "3\020\002\022%\n!OUTPUT_AUDIO_ENCODING_MP3_64_KBPS" + + "\020\004\022\"\n\036OUTPUT_AUDIO_ENCODING_OGG_OPUS\020\003\022\037" + + "\n\033OUTPUT_AUDIO_ENCODING_MULAW\020\005B\242\002\n&com." + + "google.cloud.dialogflow.cx.v3beta1B\020Audi" + + "oConfigProtoP\001Z6cloud.google.com/go/dial" + + "ogflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002" + + "\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&Go" + + "ogle::Cloud::Dialogflow::CX::V3beta1\352AU\n" + + "\033automl.googleapis.com/Model\0226projects/{" + + "project}/locations/{location}/models/{mo" + + "del}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -176,6 +177,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelVariant", "SingleUtterance", "BargeInConfig", + "OptOutConformerModelMigration", }); internal_static_google_cloud_dialogflow_cx_v3beta1_VoiceSelectionParams_descriptor = getDescriptor().getMessageTypes().get(3); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Changelog.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Changelog.java index 5df06f06e7db..643a6bcc318c 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Changelog.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Changelog.java @@ -45,6 +45,7 @@ private Changelog() { action_ = ""; type_ = ""; resource_ = ""; + languageCode_ = ""; } @java.lang.Override @@ -425,6 +426,57 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -460,6 +512,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, action_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, languageCode_); + } getUnknownFields().writeTo(output); } @@ -490,6 +545,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, action_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, languageCode_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -516,6 +574,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } + if (!getLanguageCode().equals(other.getLanguageCode())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,6 +602,8 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -702,6 +763,7 @@ public Builder clear() { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } + languageCode_ = ""; return this; } @@ -761,6 +823,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Changelog resu result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.languageCode_ = languageCode_; + } result.bitField0_ |= to_bitField0_; } @@ -843,6 +908,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Changelog other) if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000080; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -911,6 +981,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 90 + case 114: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 114 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1761,6 +1837,112 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * The affected language code of the change.
+     * 
+ * + * string language_code = 14; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogOrBuilder.java index be0277e6396d..6036bef79659 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogOrBuilder.java @@ -212,4 +212,29 @@ public interface ChangelogOrBuilder * .google.protobuf.Timestamp create_time = 4; */ com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The affected language code of the change.
+   * 
+ * + * string language_code = 14; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogProto.java index fbbbfe310d31..3b0a68da6406 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogProto.java @@ -67,33 +67,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "dialogflow.cx.v3beta1.Changelog\022\027\n\017next_" + "page_token\030\002 \001(\t\"P\n\023GetChangelogRequest\022" + "9\n\004name\030\001 \001(\tB+\340A\002\372A%\n#dialogflow.google" - + "apis.com/Changelog\"\235\002\n\tChangelog\022\014\n\004name" + + "apis.com/Changelog\"\264\002\n\tChangelog\022\014\n\004name" + "\030\001 \001(\t\022\022\n\nuser_email\030\002 \001(\t\022\024\n\014display_na" + "me\030\007 \001(\t\022\016\n\006action\030\013 \001(\t\022\014\n\004type\030\010 \001(\t\022\020" + "\n\010resource\030\003 \001(\t\022/\n\013create_time\030\004 \001(\0132\032." - + "google.protobuf.Timestamp:w\352At\n#dialogfl" - + "ow.googleapis.com/Changelog\022Mprojects/{p" - + "roject}/locations/{location}/agents/{age" - + "nt}/changelogs/{changelog}2\245\004\n\nChangelog" - + "s\022\326\001\n\016ListChangelogs\0229.google.cloud.dial" - + "ogflow.cx.v3beta1.ListChangelogsRequest\032" - + ":.google.cloud.dialogflow.cx.v3beta1.Lis" - + "tChangelogsResponse\"M\332A\006parent\202\323\344\223\002>\022\022\022\022 + * The request message for + * [Examples.CreateExample][google.cloud.dialogflow.cx.v3beta1.Examples.CreateExample]. + *
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest} + */ +public final class CreateExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) + CreateExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateExampleRequest.newBuilder() to construct. + private CreateExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateExampleRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXAMPLE_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Example example_; + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + @java.lang.Override + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getExample() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getExample()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExample()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasExample() != other.hasExample()) return false; + if (hasExample()) { + if (!getExample().equals(other.getExample())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasExample()) { + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Examples.CreateExample][google.cloud.dialogflow.cx.v3beta1.Examples.CreateExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExampleFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasExample()) { + mergeExample(other.getExample()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getExampleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create an example for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Example example_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + exampleBuilder_; + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + public boolean hasExample() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getExample() { + if (exampleBuilder_ == null) { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } else { + return exampleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (exampleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + example_ = value; + } else { + exampleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample( + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (exampleBuilder_ == null) { + example_ = builderForValue.build(); + } else { + exampleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExample(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (exampleBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && example_ != null + && example_ != com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()) { + getExampleBuilder().mergeFrom(value); + } else { + example_ = value; + } + } else { + exampleBuilder_.mergeFrom(value); + } + if (example_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExample() { + bitField0_ = (bitField0_ & ~0x00000002); + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder getExampleBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getExampleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder() { + if (exampleBuilder_ != null) { + return exampleBuilder_.getMessageOrBuilder(); + } else { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + } + /** + * + * + *
+     * Required. The example to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + getExampleFieldBuilder() { + if (exampleBuilder_ == null) { + exampleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder>( + getExample(), getParentForChildren(), isClean()); + example_ = null; + } + return exampleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateExampleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExampleRequestOrBuilder.java new file mode 100644 index 000000000000..d16dcc35d348 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateExampleRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreateExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The playbook to create an example for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + boolean hasExample(); + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + com.google.cloud.dialogflow.cx.v3beta1.Example getExample(); + /** + * + * + *
+   * Required. The example to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequest.java new file mode 100644 index 000000000000..382f80894891 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequest.java @@ -0,0 +1,957 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.CreatePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest} + */ +public final class CreatePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) + CreatePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePlaybookRequest.newBuilder() to construct. + private CreatePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePlaybookRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybook()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybook()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.CreatePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.CreatePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to create a playbook for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + playbookBuilder_; + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000002); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + } + /** + * + * + *
+     * Required. The playbook to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePlaybookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..6705bde4ffff --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreatePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to create a playbook for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook(); + /** + * + * + *
+   * Required. The playbook to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequest.java new file mode 100644 index 000000000000..c4d3e9829fc1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequest.java @@ -0,0 +1,978 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.CreatePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest} + */ +public final class CreatePlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) + CreatePlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreatePlaybookVersionRequest.newBuilder() to construct. + private CreatePlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreatePlaybookVersionRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreatePlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_VERSION_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbookVersion_; + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + @java.lang.Override + public boolean hasPlaybookVersion() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersion() { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder + getPlaybookVersionOrBuilder() { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybookVersion()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybookVersion()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasPlaybookVersion() != other.hasPlaybookVersion()) return false; + if (hasPlaybookVersion()) { + if (!getPlaybookVersion().equals(other.getPlaybookVersion())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasPlaybookVersion()) { + hash = (37 * hash) + PLAYBOOK_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookVersion().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.CreatePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookVersionFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + playbookVersion_ = null; + if (playbookVersionBuilder_ != null) { + playbookVersionBuilder_.dispose(); + playbookVersionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookVersion_ = + playbookVersionBuilder_ == null ? playbookVersion_ : playbookVersionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybookVersion()) { + mergePlaybookVersion(other.getPlaybookVersion()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPlaybookVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to create a version for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbookVersion_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder> + playbookVersionBuilder_; + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + public boolean hasPlaybookVersion() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersion() { + if (playbookVersionBuilder_ == null) { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } else { + return playbookVersionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion value) { + if (playbookVersionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookVersion_ = value; + } else { + playbookVersionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder builderForValue) { + if (playbookVersionBuilder_ == null) { + playbookVersion_ = builderForValue.build(); + } else { + playbookVersionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybookVersion( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion value) { + if (playbookVersionBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbookVersion_ != null + && playbookVersion_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance()) { + getPlaybookVersionBuilder().mergeFrom(value); + } else { + playbookVersion_ = value; + } + } else { + playbookVersionBuilder_.mergeFrom(value); + } + if (playbookVersion_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybookVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + playbookVersion_ = null; + if (playbookVersionBuilder_ != null) { + playbookVersionBuilder_.dispose(); + playbookVersionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder + getPlaybookVersionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookVersionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder + getPlaybookVersionOrBuilder() { + if (playbookVersionBuilder_ != null) { + return playbookVersionBuilder_.getMessageOrBuilder(); + } else { + return playbookVersion_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance() + : playbookVersion_; + } + } + /** + * + * + *
+     * Required. The playbook version to create.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder> + getPlaybookVersionFieldBuilder() { + if (playbookVersionBuilder_ == null) { + playbookVersionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder>( + getPlaybookVersion(), getParentForChildren(), isClean()); + playbookVersion_ = null; + } + return playbookVersionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreatePlaybookVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..5e0830391e8c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreatePlaybookVersionRequestOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreatePlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The playbook to create a version for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbookVersion field is set. + */ + boolean hasPlaybookVersion(); + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookVersion. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersion(); + /** + * + * + *
+   * Required. The playbook version to create.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_version = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder getPlaybookVersionOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequest.java new file mode 100644 index 000000000000..ed6f17a8120b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequest.java @@ -0,0 +1,948 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.CreateTool][google.cloud.dialogflow.cx.v3beta1.Tools.CreateTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateToolRequest} + */ +public final class CreateToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) + CreateToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateToolRequest.newBuilder() to construct. + private CreateToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateToolRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOL_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Tool tool_; + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() : tool_; + } + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() : tool_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getTool()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTool()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.CreateTool][google.cloud.dialogflow.cx.v3beta1.Tools.CreateTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.CreateToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasTool()) { + mergeTool(other.getTool()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getToolFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to create a Tool for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + toolBuilder_; + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() + : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000002); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() + : tool_; + } + } + /** + * + * + *
+     * Required. The Tool to be created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateToolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequestOrBuilder.java new file mode 100644 index 000000000000..7196f1bc76e1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/CreateToolRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface CreateToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.CreateToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to create a Tool for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool getTool(); + /** + * + * + *
+   * Required. The Tool to be created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequest.java new file mode 100644 index 000000000000..92b54d336858 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Examples.DeleteExample][google.cloud.dialogflow.cx.v3beta1.Examples.DeleteExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest} + */ +public final class DeleteExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) + DeleteExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteExampleRequest.newBuilder() to construct. + private DeleteExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteExampleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Examples.DeleteExample][google.cloud.dialogflow.cx.v3beta1.Examples.DeleteExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the example to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteExampleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequestOrBuilder.java new file mode 100644 index 000000000000..57fc2f389f56 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteExampleRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeleteExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the example to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequest.java new file mode 100644 index 000000000000..05321f2cfe25 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest} + */ +public final class DeletePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) + DeletePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePlaybookRequest.newBuilder() to construct. + private DeletePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePlaybookRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePlaybookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..24d8987165ff --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeletePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the playbook to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequest.java new file mode 100644 index 000000000000..2f53c78473cd --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequest.java @@ -0,0 +1,667 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest} + */ +public final class DeletePlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) + DeletePlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePlaybookVersionRequest.newBuilder() to construct. + private DeletePlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeletePlaybookVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeletePlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook version to delete.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePlaybookVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..87de97c4fc9c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeletePlaybookVersionRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeletePlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the playbook version to delete.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequest.java new file mode 100644 index 000000000000..41f8fb72c5d8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequest.java @@ -0,0 +1,773 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.DeleteTool][google.cloud.dialogflow.cx.v3beta1.Tools.DeleteTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest} + */ +public final class DeleteToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) + DeleteToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteToolRequest.newBuilder() to construct. + private DeleteToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteToolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FORCE_FIELD_NUMBER = 2; + private boolean force_ = false; + /** + * + * + *
+   * This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (force_ != false) { + output.writeBool(2, force_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (force_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, force_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (getForce() != other.getForce()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FORCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.DeleteTool][google.cloud.dialogflow.cx.v3beta1.Tools.DeleteTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + force_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.force_ = force_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getForce() != false) { + setForce(other.getForce()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + force_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Tool to be deleted.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean force_; + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @return The force. + */ + @java.lang.Override + public boolean getForce() { + return force_; + } + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @param value The force to set. + * @return This builder for chaining. + */ + public Builder setForce(boolean value) { + + force_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * This field has no effect for Tools not being used.
+     * For Tools that are used:
+     *
+     * *  If `force` is set to false, an error will be returned with message
+     *    indicating the referenced resources.
+     * *  If `force` is set to true, Dialogflow will remove the tool, as well
+     *    as any references to the tool.
+     * 
+ * + * bool force = 2; + * + * @return This builder for chaining. + */ + public Builder clearForce() { + bitField0_ = (bitField0_ & ~0x00000002); + force_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteToolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequestOrBuilder.java new file mode 100644 index 000000000000..9f1f4b453705 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/DeleteToolRequestOrBuilder.java @@ -0,0 +1,78 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface DeleteToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Tool to be deleted.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * This field has no effect for Tools not being used.
+   * For Tools that are used:
+   *
+   * *  If `force` is set to false, an error will be returned with message
+   *    indicating the referenced resources.
+   * *  If `force` is set to true, Dialogflow will remove the tool, as well
+   *    as any references to the tool.
+   * 
+ * + * bool force = 2; + * + * @return The force. + */ + boolean getForce(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java index 4808ab8cc943..0a9433cb75b6 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypeProto.java @@ -40,6 +40,34 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_EntityType_ExcludedPhrase_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_EntityType_ExcludedPhrase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -78,86 +106,137 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cx.v3beta1\032\034google/api/annotations.proto" + "\032\027google/api/client.proto\032\037google/api/fi" + "eld_behavior.proto\032\031google/api/resource." - + "proto\032\033google/protobuf/empty.proto\032 goog" - + "le/protobuf/field_mask.proto\"\256\006\n\nEntityT" - + "ype\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB" - + "\003\340A\002\022F\n\004kind\030\003 \001(\01623.google.cloud.dialog" - + "flow.cx.v3beta1.EntityType.KindB\003\340A\002\022]\n\023" - + "auto_expansion_mode\030\004 \001(\0162@.google.cloud" - + ".dialogflow.cx.v3beta1.EntityType.AutoEx" - + "pansionMode\022G\n\010entities\030\005 \003(\01325.google.c" - + "loud.dialogflow.cx.v3beta1.EntityType.En" - + "tity\022W\n\020excluded_phrases\030\006 \003(\0132=.google." - + "cloud.dialogflow.cx.v3beta1.EntityType.E" - + "xcludedPhrase\022\037\n\027enable_fuzzy_extraction" - + "\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Entity\022\022\n\005valu" - + "e\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\tB\003\340A\002\032$\n\016E" - + "xcludedPhrase\022\022\n\005value\030\001 \001(\tB\003\340A\002\"J\n\004Kin" - + "d\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KIND_MAP\020\001\022\r\n" - + "\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"Y\n\021AutoExp" - + "ansionMode\022#\n\037AUTO_EXPANSION_MODE_UNSPEC" - + "IFIED\020\000\022\037\n\033AUTO_EXPANSION_MODE_DEFAULT\020\001" - + ":{\352Ax\n$dialogflow.googleapis.com/EntityT" - + "ype\022Pprojects/{project}/locations/{locat" - + "ion}/agents/{agent}/entityTypes/{entity_" - + "type}\"\224\001\n\026ListEntityTypesRequest\022<\n\006pare" - + "nt\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.googleapis." - + "com/EntityType\022\025\n\rlanguage_code\030\002 \001(\t\022\021\n" - + "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"x\n\027" - + "ListEntityTypesResponse\022D\n\014entity_types\030" - + "\001 \003(\0132..google.cloud.dialogflow.cx.v3bet" - + "a1.EntityType\022\027\n\017next_page_token\030\002 \001(\t\"i" - + "\n\024GetEntityTypeRequest\022:\n\004name\030\001 \001(\tB,\340A" - + "\002\372A&\n$dialogflow.googleapis.com/EntityTy" - + "pe\022\025\n\rlanguage_code\030\002 \001(\t\"\270\001\n\027CreateEnti" - + "tyTypeRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$d" - + "ialogflow.googleapis.com/EntityType\022H\n\013e" - + "ntity_type\030\002 \001(\0132..google.cloud.dialogfl" - + "ow.cx.v3beta1.EntityTypeB\003\340A\002\022\025\n\rlanguag" - + "e_code\030\003 \001(\t\"\253\001\n\027UpdateEntityTypeRequest" - + "\022H\n\013entity_type\030\001 \001(\0132..google.cloud.dia" + + "proto\032/google/cloud/dialogflow/cx/v3beta" + + "1/inline.proto\032#google/longrunning/opera" + + "tions.proto\032\033google/protobuf/empty.proto" + + "\032 google/protobuf/field_mask.proto\"\256\006\n\nE" + + "ntityType\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030" + + "\002 \001(\tB\003\340A\002\022F\n\004kind\030\003 \001(\01623.google.cloud." + + "dialogflow.cx.v3beta1.EntityType.KindB\003\340" + + "A\002\022]\n\023auto_expansion_mode\030\004 \001(\0162@.google" + + ".cloud.dialogflow.cx.v3beta1.EntityType." + + "AutoExpansionMode\022G\n\010entities\030\005 \003(\01325.go" + + "ogle.cloud.dialogflow.cx.v3beta1.EntityT" + + "ype.Entity\022W\n\020excluded_phrases\030\006 \003(\0132=.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Entity" + + "Type.ExcludedPhrase\022\037\n\027enable_fuzzy_extr" + + "action\030\007 \001(\010\022\016\n\006redact\030\t \001(\010\0323\n\006Entity\022\022" + + "\n\005value\030\001 \001(\tB\003\340A\002\022\025\n\010synonyms\030\002 \003(\tB\003\340A" + + "\002\032$\n\016ExcludedPhrase\022\022\n\005value\030\001 \001(\tB\003\340A\002\"" + + "J\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000\022\014\n\010KIND_MA" + + "P\020\001\022\r\n\tKIND_LIST\020\002\022\017\n\013KIND_REGEXP\020\003\"Y\n\021A" + + "utoExpansionMode\022#\n\037AUTO_EXPANSION_MODE_" + + "UNSPECIFIED\020\000\022\037\n\033AUTO_EXPANSION_MODE_DEF" + + "AULT\020\001:{\352Ax\n$dialogflow.googleapis.com/E" + + "ntityType\022Pprojects/{project}/locations/" + + "{location}/agents/{agent}/entityTypes/{e" + + "ntity_type}\"\225\003\n\030ExportEntityTypesRequest" + + "\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.goo" + + "gleapis.com/EntityType\022\031\n\014entity_types\030\002" + + " \003(\tB\003\340A\002\022\037\n\020entity_types_uri\030\003 \001(\tB\003\340A\001" + + "H\000\022*\n\033entity_types_content_inline\030\004 \001(\010B" + + "\003\340A\001H\000\022a\n\013data_format\030\005 \001(\0162G.google.clo" + + "ud.dialogflow.cx.v3beta1.ExportEntityTyp" + + "esRequest.DataFormatB\003\340A\001\022\032\n\rlanguage_co" + + "de\030\006 \001(\tB\003\340A\001\"E\n\nDataFormat\022\033\n\027DATA_FORM" + + "AT_UNSPECIFIED\020\000\022\010\n\004BLOB\020\001\022\020\n\014JSON_PACKA" + + "GE\020\005B\r\n\013destination\"\247\001\n\031ExportEntityType" + + "sResponse\022\032\n\020entity_types_uri\030\001 \001(\tH\000\022U\n" + + "\024entity_types_content\030\002 \001(\01325.google.clo" + + "ud.dialogflow.cx.v3beta1.InlineDestinati" + + "onH\000B\027\n\025exported_entity_types\"\033\n\031ExportE" + + "ntityTypesMetadata\"\365\003\n\030ImportEntityTypes" + + "Request\022<\n\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogf" + + "low.googleapis.com/EntityType\022\032\n\020entity_" + + "types_uri\030\002 \001(\tH\000\022P\n\024entity_types_conten" + + "t\030\003 \001(\01320.google.cloud.dialogflow.cx.v3b" + + "eta1.InlineSourceH\000\022c\n\014merge_option\030\004 \001(" + + "\0162H.google.cloud.dialogflow.cx.v3beta1.I" + + "mportEntityTypesRequest.MergeOptionB\003\340A\002" + + "\022H\n\022target_entity_type\030\005 \001(\tB,\340A\001\372A&\n$di" + + "alogflow.googleapis.com/EntityType\"n\n\013Me" + + "rgeOption\022\034\n\030MERGE_OPTION_UNSPECIFIED\020\000\022" + + "\013\n\007REPLACE\020\001\022\t\n\005MERGE\020\002\022\n\n\006RENAME\020\003\022\023\n\017R" + + "EPORT_CONFLICT\020\004\022\010\n\004KEEP\020\005B\016\n\014entity_typ" + + "es\"\250\002\n\031ImportEntityTypesResponse\022?\n\014enti" + + "ty_types\030\001 \003(\tB)\372A&\n$dialogflow.googleap" + + "is.com/EntityType\022q\n\025conflicting_resourc" + + "es\030\002 \001(\0132R.google.cloud.dialogflow.cx.v3" + + "beta1.ImportEntityTypesResponse.Conflict" + + "ingResources\032W\n\024ConflictingResources\022!\n\031" + + "entity_type_display_names\030\001 \003(\t\022\034\n\024entit" + + "y_display_names\030\002 \003(\t\"\033\n\031ImportEntityTyp" + + "esMetadata\"\224\001\n\026ListEntityTypesRequest\022<\n" + + "\006parent\030\001 \001(\tB,\340A\002\372A&\022$dialogflow.google" + + "apis.com/EntityType\022\025\n\rlanguage_code\030\002 \001" + + "(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(" + + "\t\"x\n\027ListEntityTypesResponse\022D\n\014entity_t" + + "ypes\030\001 \003(\0132..google.cloud.dialogflow.cx." + + "v3beta1.EntityType\022\027\n\017next_page_token\030\002 " + + "\001(\t\"i\n\024GetEntityTypeRequest\022:\n\004name\030\001 \001(" + + "\tB,\340A\002\372A&\n$dialogflow.googleapis.com/Ent" + + "ityType\022\025\n\rlanguage_code\030\002 \001(\t\"\270\001\n\027Creat" + + "eEntityTypeRequest\022<\n\006parent\030\001 \001(\tB,\340A\002\372" + + "A&\022$dialogflow.googleapis.com/EntityType" + + "\022H\n\013entity_type\030\002 \001(\0132..google.cloud.dia" + "logflow.cx.v3beta1.EntityTypeB\003\340A\002\022\025\n\rla" - + "nguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032" - + ".google.protobuf.FieldMask\"d\n\027DeleteEnti" - + "tyTypeRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$dia" - + "logflow.googleapis.com/EntityType\022\r\n\005for" - + "ce\030\002 \001(\0102\315\t\n\013EntityTypes\022\307\001\n\rGetEntityTy" - + "pe\0228.google.cloud.dialogflow.cx.v3beta1." - + "GetEntityTypeRequest\032..google.cloud.dial" - + "ogflow.cx.v3beta1.EntityType\"L\332A\004name\202\323\344" - + "\223\002?\022=/v3beta1/{name=projects/*/locations" - + "/*/agents/*/entityTypes/*}\022\350\001\n\020CreateEnt" + + "nguage_code\030\003 \001(\t\"\253\001\n\027UpdateEntityTypeRe" + + "quest\022H\n\013entity_type\030\001 \001(\0132..google.clou" + + "d.dialogflow.cx.v3beta1.EntityTypeB\003\340A\002\022" + + "\025\n\rlanguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 " + + "\001(\0132\032.google.protobuf.FieldMask\"d\n\027Delet" + + "eEntityTypeRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&" + + "\n$dialogflow.googleapis.com/EntityType\022\r" + + "\n\005force\030\002 \001(\0102\311\r\n\013EntityTypes\022\307\001\n\rGetEnt" + + "ityType\0228.google.cloud.dialogflow.cx.v3b" + + "eta1.GetEntityTypeRequest\032..google.cloud" + + ".dialogflow.cx.v3beta1.EntityType\"L\332A\004na" + + "me\202\323\344\223\002?\022=/v3beta1/{name=projects/*/loca" + + "tions/*/agents/*/entityTypes/*}\022\350\001\n\020Crea" + + "teEntityType\022;.google.cloud.dialogflow.c" + + "x.v3beta1.CreateEntityTypeRequest\032..goog" + + "le.cloud.dialogflow.cx.v3beta1.EntityTyp" + + "e\"g\332A\022parent,entity_type\202\323\344\223\002L\"=/v3beta1" + + "/{parent=projects/*/locations/*/agents/*" + + "}/entityTypes:\013entity_type\022\371\001\n\020UpdateEnt" + "ityType\022;.google.cloud.dialogflow.cx.v3b" - + "eta1.CreateEntityTypeRequest\032..google.cl" - + "oud.dialogflow.cx.v3beta1.EntityType\"g\332A" - + "\022parent,entity_type\202\323\344\223\002L\"=/v3beta1/{par" - + "ent=projects/*/locations/*/agents/*}/ent" - + "ityTypes:\013entity_type\022\371\001\n\020UpdateEntityTy" - + "pe\022;.google.cloud.dialogflow.cx.v3beta1." - + "UpdateEntityTypeRequest\032..google.cloud.d" - + "ialogflow.cx.v3beta1.EntityType\"x\332A\027enti" - + "ty_type,update_mask\202\323\344\223\002X2I/v3beta1/{ent" - + "ity_type.name=projects/*/locations/*/age" - + "nts/*/entityTypes/*}:\013entity_type\022\265\001\n\020De" - + "leteEntityType\022;.google.cloud.dialogflow" - + ".cx.v3beta1.DeleteEntityTypeRequest\032\026.go" - + "ogle.protobuf.Empty\"L\332A\004name\202\323\344\223\002?*=/v3b" - + "eta1/{name=projects/*/locations/*/agents" - + "/*/entityTypes/*}\022\332\001\n\017ListEntityTypes\022:." - + "google.cloud.dialogflow.cx.v3beta1.ListE" - + "ntityTypesRequest\032;.google.cloud.dialogf" - + "low.cx.v3beta1.ListEntityTypesResponse\"N" - + "\332A\006parent\202\323\344\223\002?\022=/v3beta1/{parent=projec" - + "ts/*/locations/*/agents/*}/entityTypes\032x" - + "\312A\031dialogflow.googleapis.com\322AYhttps://w" - + "ww.googleapis.com/auth/cloud-platform,ht" - + "tps://www.googleapis.com/auth/dialogflow" - + "B\311\001\n&com.google.cloud.dialogflow.cx.v3be" - + "ta1B\017EntityTypeProtoP\001Z6cloud.google.com" - + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" - + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" - + "ta1\352\002&Google::Cloud::Dialogflow::CX::V3b" - + "eta1b\006proto3" + + "eta1.UpdateEntityTypeRequest\032..google.cl" + + "oud.dialogflow.cx.v3beta1.EntityType\"x\332A" + + "\027entity_type,update_mask\202\323\344\223\002X2I/v3beta1" + + "/{entity_type.name=projects/*/locations/" + + "*/agents/*/entityTypes/*}:\013entity_type\022\265" + + "\001\n\020DeleteEntityType\022;.google.cloud.dialo" + + "gflow.cx.v3beta1.DeleteEntityTypeRequest" + + "\032\026.google.protobuf.Empty\"L\332A\004name\202\323\344\223\002?*" + + "=/v3beta1/{name=projects/*/locations/*/a" + + "gents/*/entityTypes/*}\022\332\001\n\017ListEntityTyp" + + "es\022:.google.cloud.dialogflow.cx.v3beta1." + + "ListEntityTypesRequest\032;.google.cloud.di" + + "alogflow.cx.v3beta1.ListEntityTypesRespo" + + "nse\"N\332A\006parent\202\323\344\223\002?\022=/v3beta1/{parent=p" + + "rojects/*/locations/*/agents/*}/entityTy" + + "pes\022\373\001\n\021ExportEntityTypes\022<.google.cloud" + + ".dialogflow.cx.v3beta1.ExportEntityTypes" + + "Request\032\035.google.longrunning.Operation\"\210" + + "\001\312A6\n\031ExportEntityTypesResponse\022\031ExportE" + + "ntityTypesMetadata\202\323\344\223\002I\"D/v3beta1/{pare" + + "nt=projects/*/locations/*/agents/*}/enti" + + "tyTypes:export:\001*\022\373\001\n\021ImportEntityTypes\022" + + "<.google.cloud.dialogflow.cx.v3beta1.Imp" + + "ortEntityTypesRequest\032\035.google.longrunni" + + "ng.Operation\"\210\001\312A6\n\031ImportEntityTypesRes" + + "ponse\022\031ImportEntityTypesMetadata\202\323\344\223\002I\"D" + + "/v3beta1/{parent=projects/*/locations/*/" + + "agents/*}/entityTypes:import:\001*\032x\312A\031dial" + + "ogflow.googleapis.com\322AYhttps://www.goog" + + "leapis.com/auth/cloud-platform,https://w" + + "ww.googleapis.com/auth/dialogflowB\311\001\n&co" + + "m.google.cloud.dialogflow.cx.v3beta1B\017En" + + "tityTypeProtoP\001Z6cloud.google.com/go/dia" + + "logflow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252" + + "\002\"Google.Cloud.Dialogflow.Cx.V3Beta1\352\002&G" + + "oogle::Cloud::Dialogflow::CX::V3beta1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -167,6 +246,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.InlineProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), }); @@ -205,8 +286,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Value", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesRequest_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor, + new java.lang.String[] { + "Parent", + "EntityTypes", + "EntityTypesUri", + "EntityTypesContentInline", + "DataFormat", + "LanguageCode", + "Destination", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor, + new java.lang.String[] { + "EntityTypesUri", "EntityTypesContent", "ExportedEntityTypes", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor, + new java.lang.String[] { + "Parent", + "EntityTypesUri", + "EntityTypesContent", + "MergeOption", + "TargetEntityType", + "EntityTypes", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor, + new java.lang.String[] { + "EntityTypes", "ConflictingResources", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor, + new java.lang.String[] { + "EntityTypeDisplayNames", "EntityDisplayNames", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor, + new java.lang.String[] {}); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesRequest_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesRequest_descriptor, @@ -214,7 +360,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "LanguageCode", "PageSize", "PageToken", }); internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesResponse_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_ListEntityTypesResponse_descriptor, @@ -222,7 +368,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityTypes", "NextPageToken", }); internal_static_google_cloud_dialogflow_cx_v3beta1_GetEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_dialogflow_cx_v3beta1_GetEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_GetEntityTypeRequest_descriptor, @@ -230,7 +376,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_dialogflow_cx_v3beta1_CreateEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_CreateEntityTypeRequest_descriptor, @@ -238,7 +384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "EntityType", "LanguageCode", }); internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateEntityTypeRequest_descriptor, @@ -246,7 +392,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EntityType", "LanguageCode", "UpdateMask", }); internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteEntityTypeRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteEntityTypeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteEntityTypeRequest_descriptor, @@ -262,12 +408,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.InlineProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Example.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Example.java new file mode 100644 index 000000000000..52e6d2869dca --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Example.java @@ -0,0 +1,3217 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Example represents a sample execution of the playbook in the conversation.
+ *
+ * An example consists of a list of ordered actions performed by end user
+ * or Dialogflow agent according the playbook instructions to fulfill the task.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Example} + */ +public final class Example extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Example) + ExampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Example.newBuilder() to construct. + private Example(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Example() { + name_ = ""; + actions_ = java.util.Collections.emptyList(); + displayName_ = ""; + description_ = ""; + conversationState_ = 0; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Example(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Example.class, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_INPUT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbookInput_; + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + @java.lang.Override + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + public static final int PLAYBOOK_OUTPUT_FIELD_NUMBER = 4; + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbookOutput_; + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + @java.lang.Override + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder + getPlaybookOutputOrBuilder() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + public static final int ACTIONS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List actions_; + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Action getActions(int index) { + return actions_.get(index); + } + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder getActionsOrBuilder(int index) { + return actions_.get(index); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_COUNT_FIELD_NUMBER = 9; + private long tokenCount_ = 0L; + /** + * + * + *
+   * Output only. Estimated number of tokes current example takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int CONVERSATION_STATE_FIELD_NUMBER = 12; + private int conversationState_ = 0; + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + @java.lang.Override + public int getConversationStateValue() { + return conversationState_; + } + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getConversationState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(conversationState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(2, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getPlaybookOutput()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); + } + if (tokenCount_ != 0L) { + output.writeInt64(9, tokenCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(10, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(11, getUpdateTime()); + } + if (conversationState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(12, conversationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, actions_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPlaybookOutput()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); + } + if (tokenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, tokenCount_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); + } + if (conversationState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, conversationState_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Example)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Example other = + (com.google.cloud.dialogflow.cx.v3beta1.Example) obj; + + if (!getName().equals(other.getName())) return false; + if (hasPlaybookInput() != other.hasPlaybookInput()) return false; + if (hasPlaybookInput()) { + if (!getPlaybookInput().equals(other.getPlaybookInput())) return false; + } + if (hasPlaybookOutput() != other.hasPlaybookOutput()) return false; + if (hasPlaybookOutput()) { + if (!getPlaybookOutput().equals(other.getPlaybookOutput())) return false; + } + if (!getActionsList().equals(other.getActionsList())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (getTokenCount() != other.getTokenCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (conversationState_ != other.conversationState_) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasPlaybookInput()) { + hash = (37 * hash) + PLAYBOOK_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInput().hashCode(); + } + if (hasPlaybookOutput()) { + hash = (37 * hash) + PLAYBOOK_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookOutput().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTokenCount()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + CONVERSATION_STATE_FIELD_NUMBER; + hash = (53 * hash) + conversationState_; + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Example prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Example represents a sample execution of the playbook in the conversation.
+   *
+   * An example consists of a list of ordered actions performed by end user
+   * or Dialogflow agent according the playbook instructions to fulfill the task.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Example} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Example) + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Example.class, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Example.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookInputFieldBuilder(); + getPlaybookOutputFieldBuilder(); + getActionsFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + displayName_ = ""; + description_ = ""; + tokenCount_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + conversationState_ = 0; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example build() { + com.google.cloud.dialogflow.cx.v3beta1.Example result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Example result = + new com.google.cloud.dialogflow.cx.v3beta1.Example(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3beta1.Example result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Example result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookInput_ = + playbookInputBuilder_ == null ? playbookInput_ : playbookInputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbookOutput_ = + playbookOutputBuilder_ == null ? playbookOutput_ : playbookOutputBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenCount_ = tokenCount_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.conversationState_ = conversationState_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.languageCode_ = languageCode_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Example) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Example) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Example other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybookInput()) { + mergePlaybookInput(other.getPlaybookInput()); + } + if (other.hasPlaybookOutput()) { + mergePlaybookOutput(other.getPlaybookOutput()); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000008); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getActionsFieldBuilder() + : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getTokenCount() != 0L) { + setTokenCount(other.getTokenCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.conversationState_ != 0) { + setConversationStateValue(other.getConversationStateValue()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000400; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.Action m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Action.parser(), extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookInputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getPlaybookOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 50 + case 66: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 66 + case 72: + { + tokenCount_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 72 + case 82: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 90: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 90 + case 96: + { + conversationState_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 106: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbookInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder> + playbookInputBuilder_; + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput() { + if (playbookInputBuilder_ == null) { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } else { + return playbookInputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookInput_ = value; + } else { + playbookInputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder builderForValue) { + if (playbookInputBuilder_ == null) { + playbookInput_ = builderForValue.build(); + } else { + playbookInputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbookInput_ != null + && playbookInput_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance()) { + getPlaybookInputBuilder().mergeFrom(value); + } else { + playbookInput_ = value; + } + } else { + playbookInputBuilder_.mergeFrom(value); + } + if (playbookInput_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInput() { + bitField0_ = (bitField0_ & ~0x00000002); + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder getPlaybookInputBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder + getPlaybookInputOrBuilder() { + if (playbookInputBuilder_ != null) { + return playbookInputBuilder_.getMessageOrBuilder(); + } else { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + } + /** + * + * + *
+     * Optional. The input to the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder> + getPlaybookInputFieldBuilder() { + if (playbookInputBuilder_ == null) { + playbookInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder>( + getPlaybookInput(), getParentForChildren(), isClean()); + playbookInput_ = null; + } + return playbookInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbookOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder> + playbookOutputBuilder_; + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput() { + if (playbookOutputBuilder_ == null) { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } else { + return playbookOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookOutput_ = value; + } else { + playbookOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder builderForValue) { + if (playbookOutputBuilder_ == null) { + playbookOutput_ = builderForValue.build(); + } else { + playbookOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookOutput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbookOutput_ != null + && playbookOutput_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance()) { + getPlaybookOutputBuilder().mergeFrom(value); + } else { + playbookOutput_ = value; + } + } else { + playbookOutputBuilder_.mergeFrom(value); + } + if (playbookOutput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder + getPlaybookOutputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder + getPlaybookOutputOrBuilder() { + if (playbookOutputBuilder_ != null) { + return playbookOutputBuilder_.getMessageOrBuilder(); + } else { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + } + /** + * + * + *
+     * Optional. The output of the playbook in the example.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder> + getPlaybookOutputFieldBuilder() { + if (playbookOutputBuilder_ == null) { + playbookOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder>( + getPlaybookOutput(), getParentForChildren(), isClean()); + playbookOutput_ = null; + } + return playbookOutputBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Action, + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder> + actionsBuilder_; + + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActions(int index, com.google.cloud.dialogflow.cx.v3beta1.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setActions( + int index, com.google.cloud.dialogflow.cx.v3beta1.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions(com.google.cloud.dialogflow.cx.v3beta1.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions(int index, com.google.cloud.dialogflow.cx.v3beta1.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions( + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addActions( + int index, com.google.cloud.dialogflow.cx.v3beta1.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Action.Builder getActionsBuilder(int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder getActionsOrBuilder(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Action.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Action.Builder addActionsBuilder(int index) { + return getActionsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Action.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The ordered list of actions performed by the end user and the
+     * Dialogflow agent.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Action, + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Action, + com.google.cloud.dialogflow.cx.v3beta1.Action.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder>( + actions_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + actions_ = null; + } + return actionsBuilder_; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the example.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The high level concise description of the example. The max number
+     * of characters is 200.
+     * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private long tokenCount_; + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tokenCount to set. + * @return This builder for chaining. + */ + public Builder setTokenCount(long value) { + + tokenCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Estimated number of tokes current example takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTokenCount() { + bitField0_ = (bitField0_ & ~0x00000040); + tokenCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp of initial example creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Last time the example was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int conversationState_ = 0; + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + @java.lang.Override + public int getConversationStateValue() { + return conversationState_; + } + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for conversationState to set. + * @return This builder for chaining. + */ + public Builder setConversationStateValue(int value) { + conversationState_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getConversationState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(conversationState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The conversationState to set. + * @return This builder for chaining. + */ + public Builder setConversationState(com.google.cloud.dialogflow.cx.v3beta1.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + conversationState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearConversationState() { + bitField0_ = (bitField0_ & ~0x00000200); + conversationState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language code of the example.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Example) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Example) + private static final com.google.cloud.dialogflow.cx.v3beta1.Example DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Example(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Example getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Example parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleName.java new file mode 100644 index 000000000000..f54fcfa6176d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ExampleName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + private final String example; + + @Deprecated + protected ExampleName() { + project = null; + location = null; + agent = null; + playbook = null; + example = null; + } + + private ExampleName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + example = Preconditions.checkNotNull(builder.getExample()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getExample() { + return example; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ExampleName of( + String project, String location, String agent, String playbook, String example) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setExample(example) + .build(); + } + + public static String format( + String project, String location, String agent, String playbook, String example) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setExample(example) + .build() + .toString(); + } + + public static ExampleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.validatedMatch( + formattedString, "ExampleName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook"), + matchMap.get("example")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ExampleName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + if (example != null) { + fieldMapBuilder.put("example", example); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK_EXAMPLE.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "playbook", + playbook, + "example", + example); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ExampleName that = ((ExampleName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook) + && Objects.equals(this.example, that.example); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + h *= 1000003; + h ^= Objects.hashCode(example); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + private String example; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getExample() { + return example; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + public Builder setExample(String example) { + this.example = example; + return this; + } + + private Builder(ExampleName exampleName) { + this.project = exampleName.project; + this.location = exampleName.location; + this.agent = exampleName.agent; + this.playbook = exampleName.playbook; + this.example = exampleName.example; + } + + public ExampleName build() { + return new ExampleName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleOrBuilder.java new file mode 100644 index 000000000000..a984410af2c7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleOrBuilder.java @@ -0,0 +1,404 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Example) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the playbook example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + boolean hasPlaybookInput(); + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput(); + /** + * + * + *
+   * Optional. The input to the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder getPlaybookInputOrBuilder(); + + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + boolean hasPlaybookOutput(); + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput(); + /** + * + * + *
+   * Optional. The output of the playbook in the example.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder(); + + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getActionsList(); + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Action getActions(int index); + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getActionsCount(); + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getActionsOrBuilderList(); + /** + * + * + *
+   * Required. The ordered list of actions performed by the end user and the
+   * Dialogflow agent.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Action actions = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionOrBuilder getActionsOrBuilder(int index); + + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the example.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The high level concise description of the example. The max number
+   * of characters is 200.
+   * 
+ * + * string description = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Estimated number of tokes current example takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + long getTokenCount(); + + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of initial example creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Last time the example was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for conversationState. + */ + int getConversationStateValue(); + /** + * + * + *
+   * Required. Example's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState conversation_state = 12 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The conversationState. + */ + com.google.cloud.dialogflow.cx.v3beta1.OutputState getConversationState(); + + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The language code of the example.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java new file mode 100644 index 000000000000..9e202ac5c2db --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExampleProto.java @@ -0,0 +1,410 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ExampleProto { + private ExampleProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Example_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Action_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/dialogflow/cx/v3beta1/exa" + + "mple.proto\022\"google.cloud.dialogflow.cx.v" + + "3beta1\032\034google/api/annotations.proto\032\027go" + + "ogle/api/client.proto\032\037google/api/field_" + + "behavior.proto\032\031google/api/resource.prot" + + "o\032\033google/protobuf/empty.proto\032 google/p" + + "rotobuf/field_mask.proto\032\034google/protobu" + + "f/struct.proto\032\037google/protobuf/timestam" + + "p.proto\"\224\001\n\024CreateExampleRequest\0229\n\006pare" + + "nt\030\001 \001(\tB)\340A\002\372A#\022!dialogflow.googleapis." + + "com/Example\022A\n\007example\030\002 \001(\0132+.google.cl" + + "oud.dialogflow.cx.v3beta1.ExampleB\003\340A\002\"O" + + "\n\024DeleteExampleRequest\0227\n\004name\030\001 \001(\tB)\340A" + + "\002\372A#\n!dialogflow.googleapis.com/Example\"" + + "\235\001\n\023ListExamplesRequest\0229\n\006parent\030\001 \001(\tB" + + ")\340A\002\372A#\022!dialogflow.googleapis.com/Examp" + + "le\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token" + + "\030\003 \001(\tB\003\340A\001\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\001\"" + + "n\n\024ListExamplesResponse\022=\n\010examples\030\001 \003(" + + "\0132+.google.cloud.dialogflow.cx.v3beta1.E" + + "xample\022\027\n\017next_page_token\030\002 \001(\t\"L\n\021GetEx" + + "ampleRequest\0227\n\004name\030\001 \001(\tB)\340A\002\372A#\n!dial" + + "ogflow.googleapis.com/Example\"\217\001\n\024Update" + + "ExampleRequest\022A\n\007example\030\001 \001(\0132+.google" + + ".cloud.dialogflow.cx.v3beta1.ExampleB\003\340A" + + "\002\0224\n\013update_mask\030\002 \001(\0132\032.google.protobuf" + + ".FieldMaskB\003\340A\001\"\301\005\n\007Example\022\014\n\004name\030\001 \001(" + + "\t\022N\n\016playbook_input\030\003 \001(\01321.google.cloud" + + ".dialogflow.cx.v3beta1.PlaybookInputB\003\340A" + + "\001\022P\n\017playbook_output\030\004 \001(\01322.google.clou" + + "d.dialogflow.cx.v3beta1.PlaybookOutputB\003" + + "\340A\001\022@\n\007actions\030\002 \003(\0132*.google.cloud.dial" + + "ogflow.cx.v3beta1.ActionB\003\340A\002\022\031\n\014display" + + "_name\030\006 \001(\tB\003\340A\002\022\030\n\013description\030\010 \001(\tB\003\340" + + "A\001\022\030\n\013token_count\030\t \001(\003B\003\340A\003\0224\n\013create_t" + + "ime\030\n \001(\0132\032.google.protobuf.TimestampB\003\340" + + "A\003\0224\n\013update_time\030\013 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003\022P\n\022conversation_state\030\014" + + " \001(\0162/.google.cloud.dialogflow.cx.v3beta" + + "1.OutputStateB\003\340A\002\022\032\n\rlanguage_code\030\r \001(" + + "\tB\003\340A\001:\232\001\352A\226\001\n!dialogflow.googleapis.com" + + "/Example\022^projects/{project}/locations/{" + + "location}/agents/{agent}/playbooks/{play" + + "book}/examples/{example}*\010examples2\007exam" + + "ple\"\212\001\n\rPlaybookInput\022+\n\036preceding_conve" + + "rsation_summary\030\001 \001(\tB\003\340A\001\022L\n\nparameters" + + "\030\002 \003(\01323.google.cloud.dialogflow.cx.v3be" + + "ta1.ActionParameterB\003\340A\001\"~\n\016PlaybookOutp" + + "ut\022\036\n\021execution_summary\030\001 \001(\tB\003\340A\001\022L\n\npa" + + "rameters\030\003 \003(\01323.google.cloud.dialogflow" + + ".cx.v3beta1.ActionParameterB\003\340A\001\"\256\003\n\006Act" + + "ion\022P\n\016user_utterance\030\001 \001(\01321.google.clo" + + "ud.dialogflow.cx.v3beta1.UserUtteranceB\003" + + "\340A\001H\000\022R\n\017agent_utterance\030\002 \001(\01322.google." + + "cloud.dialogflow.cx.v3beta1.AgentUtteran" + + "ceB\003\340A\001H\000\022D\n\010tool_use\030\003 \001(\0132+.google.clo" + + "ud.dialogflow.cx.v3beta1.ToolUseB\003\340A\001H\000\022" + + "Z\n\023playbook_invocation\030\004 \001(\01326.google.cl" + + "oud.dialogflow.cx.v3beta1.PlaybookInvoca" + + "tionB\003\340A\001H\000\022R\n\017flow_invocation\030\005 \001(\01322.g" + + "oogle.cloud.dialogflow.cx.v3beta1.FlowIn" + + "vocationB\003\340A\001H\000B\010\n\006action\"\"\n\rUserUtteran" + + "ce\022\021\n\004text\030\001 \001(\tB\003\340A\002\"#\n\016AgentUtterance\022" + + "\021\n\004text\030\001 \001(\tB\003\340A\002\"\363\001\n\007ToolUse\0224\n\004tool\030\001" + + " \001(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/" + + "Tool\022\023\n\006action\030\002 \001(\tB\003\340A\001\022M\n\020input_param" + + "eters\030\003 \003(\01323.google.cloud.dialogflow.cx" + + ".v3beta1.ActionParameter\022N\n\021output_param" + + "eters\030\004 \003(\01323.google.cloud.dialogflow.cx" + + ".v3beta1.ActionParameter\"P\n\017ActionParame" + + "ter\022\021\n\004name\030\001 \001(\tB\003\340A\002\022*\n\005value\030\002 \001(\0132\026." + + "google.protobuf.ValueB\003\340A\002\"\302\002\n\022PlaybookI" + + "nvocation\022<\n\010playbook\030\001 \001(\tB*\340A\002\372A$\n\"dia" + + "logflow.googleapis.com/Playbook\022N\n\016playb" + + "ook_input\030\002 \001(\01321.google.cloud.dialogflo" + + "w.cx.v3beta1.PlaybookInputB\003\340A\001\022P\n\017playb" + + "ook_output\030\003 \001(\01322.google.cloud.dialogfl" + + "ow.cx.v3beta1.PlaybookOutputB\003\340A\001\022L\n\016pla" + + "ybook_state\030\004 \001(\0162/.google.cloud.dialogf" + + "low.cx.v3beta1.OutputStateB\003\340A\002\"\257\002\n\016Flow" + + "Invocation\0224\n\004flow\030\001 \001(\tB&\340A\002\372A \n\036dialog" + + "flow.googleapis.com/Flow\022M\n\020input_parame" + + "ters\030\002 \003(\01323.google.cloud.dialogflow.cx." + + "v3beta1.ActionParameter\022N\n\021output_parame" + + "ters\030\003 \003(\01323.google.cloud.dialogflow.cx." + + "v3beta1.ActionParameter\022H\n\nflow_state\030\004 " + + "\001(\0162/.google.cloud.dialogflow.cx.v3beta1" + + ".OutputStateB\003\340A\002*\253\001\n\013OutputState\022\034\n\030OUT" + + "PUT_STATE_UNSPECIFIED\020\000\022\023\n\017OUTPUT_STATE_" + + "OK\020\001\022\032\n\026OUTPUT_STATE_CANCELLED\020\002\022\027\n\023OUTP" + + "UT_STATE_FAILED\020\003\022\032\n\026OUTPUT_STATE_ESCALA" + + "TED\020\004\022\030\n\024OUTPUT_STATE_PENDING\020\0052\271\t\n\010Exam" + + "ples\022\340\001\n\rCreateExample\0228.google.cloud.di" + + "alogflow.cx.v3beta1.CreateExampleRequest" + + "\032+.google.cloud.dialogflow.cx.v3beta1.Ex" + + "ample\"h\332A\016parent,example\202\323\344\223\002Q\"F/v3beta1" + + "/{parent=projects/*/locations/*/agents/*" + + "/playbooks/*}/examples:\007example\022\270\001\n\rDele" + + "teExample\0228.google.cloud.dialogflow.cx.v" + + "3beta1.DeleteExampleRequest\032\026.google.pro" + + "tobuf.Empty\"U\332A\004name\202\323\344\223\002H*F/v3beta1/{na" + + "me=projects/*/locations/*/agents/*/playb" + + "ooks/*/examples/*}\022\332\001\n\014ListExamples\0227.go" + + "ogle.cloud.dialogflow.cx.v3beta1.ListExa" + + "mplesRequest\0328.google.cloud.dialogflow.c" + + "x.v3beta1.ListExamplesResponse\"W\332A\006paren" + + "t\202\323\344\223\002H\022F/v3beta1/{parent=projects/*/loc" + + "ations/*/agents/*/playbooks/*}/examples\022" + + "\307\001\n\nGetExample\0225.google.cloud.dialogflow" + + ".cx.v3beta1.GetExampleRequest\032+.google.c" + + "loud.dialogflow.cx.v3beta1.Example\"U\332A\004n" + + "ame\202\323\344\223\002H\022F/v3beta1/{name=projects/*/loc" + + "ations/*/agents/*/playbooks/*/examples/*" + + "}\022\355\001\n\rUpdateExample\0228.google.cloud.dialo" + + "gflow.cx.v3beta1.UpdateExampleRequest\032+." + + "google.cloud.dialogflow.cx.v3beta1.Examp" + + "le\"u\332A\023example,update_mask\202\323\344\223\002Y2N/v3bet" + + "a1/{example.name=projects/*/locations/*/" + + "agents/*/playbooks/*/examples/*}:\007exampl" + + "e\032x\312A\031dialogflow.googleapis.com\322AYhttps:" + + "//www.googleapis.com/auth/cloud-platform" + + ",https://www.googleapis.com/auth/dialogf" + + "lowB\235\001\n&com.google.cloud.dialogflow.cx.v" + + "3beta1B\014ExampleProtoP\001Z6cloud.google.com" + + "/go/dialogflow/cx/apiv3beta1/cxpb;cxpb\370\001" + + "\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V3Be" + + "ta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateExampleRequest_descriptor, + new java.lang.String[] { + "Parent", "Example", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteExampleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor, + new java.lang.String[] { + "Examples", "NextPageToken", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor, + new java.lang.String[] { + "Example", "UpdateMask", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dialogflow_cx_v3beta1_Example_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Example_descriptor, + new java.lang.String[] { + "Name", + "PlaybookInput", + "PlaybookOutput", + "Actions", + "DisplayName", + "Description", + "TokenCount", + "CreateTime", + "UpdateTime", + "ConversationState", + "LanguageCode", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor, + new java.lang.String[] { + "PrecedingConversationSummary", "Parameters", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor, + new java.lang.String[] { + "ExecutionSummary", "Parameters", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dialogflow_cx_v3beta1_Action_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_Action_descriptor, + new java.lang.String[] { + "UserUtterance", + "AgentUtterance", + "ToolUse", + "PlaybookInvocation", + "FlowInvocation", + "Action", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor, + new java.lang.String[] { + "Text", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_AgentUtterance_descriptor, + new java.lang.String[] { + "Text", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor, + new java.lang.String[] { + "Tool", "Action", "InputParameters", "OutputParameters", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ActionParameter_descriptor, + new java.lang.String[] { + "Name", "Value", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor, + new java.lang.String[] { + "Playbook", "PlaybookInput", "PlaybookOutput", "PlaybookState", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor, + new java.lang.String[] { + "Flow", "InputParameters", "OutputParameters", "FlowState", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadata.java new file mode 100644 index 000000000000..ca0bf8317a3e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadata.java @@ -0,0 +1,443 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata} + */ +public final class ExportEntityTypesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) + ExportEntityTypesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesMetadata.newBuilder() to construct. + private ExportEntityTypesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadataOrBuilder.java new file mode 100644 index 000000000000..8b63970f24c1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportEntityTypesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequest.java new file mode 100644 index 000000000000..8bdc76dc8143 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequest.java @@ -0,0 +1,2099 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest} + */ +public final class ExportEntityTypesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) + ExportEntityTypesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesRequest.newBuilder() to construct. + private ExportEntityTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesRequest() { + parent_ = ""; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported entity types.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * EntityTypes will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * EntityTypes will be exported in JSON Package format.
+     * 
+ * + * JSON_PACKAGE = 5; + */ + JSON_PACKAGE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * EntityTypes will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * EntityTypes will be exported in JSON Package format.
+     * 
+ * + * JSON_PACKAGE = 5; + */ + public static final int JSON_PACKAGE_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 5: + return JSON_PACKAGE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat) + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(3), + ENTITY_TYPES_CONTENT_INLINE(4), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 3: + return ENTITY_TYPES_URI; + case 4: + return ENTITY_TYPES_CONTENT_INLINE; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + return entityTypes_; + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_INLINE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + @java.lang.Override + public boolean getEntityTypesContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 5; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat + getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat.UNRECOGNIZED + : result; + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < entityTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityTypes_.getRaw(i)); + } + if (destinationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destination_); + } + if (destinationCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, dataFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < entityTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypesList().size(); + } + if (destinationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destination_); + } + if (destinationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, dataFormat_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntityTypesList().equals(other.getEntityTypesList())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 3: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 4: + if (getEntityTypesContentInline() != other.getEntityTypesContentInline()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getEntityTypesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesList().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (destinationCase_) { + case 3: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 4: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_INLINE_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEntityTypesContentInline()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + languageCode_ = ""; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityTypes_.makeImmutable(); + result.entityTypes_ = entityTypes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataFormat_ = dataFormat_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.languageCode_ = languageCode_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.entityTypes_.isEmpty()) { + if (entityTypes_.isEmpty()) { + entityTypes_ = other.entityTypes_; + bitField0_ |= 0x00000002; + } else { + ensureEntityTypesIsMutable(); + entityTypes_.addAll(other.entityTypes_); + } + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000020; + onChanged(); + } + switch (other.getDestinationCase()) { + case ENTITY_TYPES_URI: + { + destinationCase_ = 3; + destination_ = other.destination_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT_INLINE: + { + setEntityTypesContentInline(other.getEntityTypesContentInline()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypesIsMutable(); + entityTypes_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 3; + destination_ = s; + break; + } // case 26 + case 32: + { + destination_ = input.readBool(); + destinationCase_ = 4; + break; + } // case 32 + case 40: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the parent agent to export entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypesIsMutable() { + if (!entityTypes_.isModifiable()) { + entityTypes_ = new com.google.protobuf.LazyStringArrayList(entityTypes_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + entityTypes_.makeImmutable(); + return entityTypes_; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The entityTypes to set. + * @return This builder for chaining. + */ + public Builder setEntityTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypes(java.lang.Iterable values) { + ensureEntityTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypes() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entity types to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entityTypes/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+     * types to. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + public boolean hasEntityTypesContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + public boolean getEntityTypesContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The entityTypesContentInline to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesContentInline(boolean value) { + + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The option to return the serialized entity types inline.
+     * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesContentInline() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat + getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported entity types. If not specified,
+     * `BLOB` is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000010); + dataFormat_ = 0; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to retrieve the entity type for. The following
+     * fields are language dependent:
+     *
+     * *   `EntityType.entities.value`
+     * *   `EntityType.entities.synonyms`
+     * *   `EntityType.excluded_phrases.value`
+     *
+     * If not specified, all language dependent fields will be retrieved.
+     * [Many
+     * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+     * are supported.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequestOrBuilder.java new file mode 100644 index 000000000000..8b4bed61970a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesRequestOrBuilder.java @@ -0,0 +1,288 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportEntityTypesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the parent agent to export entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the entityTypes. + */ + java.util.List getEntityTypesList(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of entityTypes. + */ + int getEntityTypesCount(); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + java.lang.String getEntityTypes(int index); + /** + * + * + *
+   * Required. The name of the entity types to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entityTypes/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + com.google.protobuf.ByteString getEntityTypesBytes(int index); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the entity
+   * types to. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the entityTypesContentInline field is set. + */ + boolean hasEntityTypesContentInline(); + /** + * + * + *
+   * Optional. The option to return the serialized entity types inline.
+   * 
+ * + * bool entity_types_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The entityTypesContentInline. + */ + boolean getEntityTypesContentInline(); + + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. The data format of the exported entity types. If not specified,
+   * `BLOB` is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DataFormat getDataFormat(); + + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The language to retrieve the entity type for. The following
+   * fields are language dependent:
+   *
+   * *   `EntityType.entities.value`
+   * *   `EntityType.entities.synonyms`
+   * *   `EntityType.excluded_phrases.value`
+   *
+   * If not specified, all language dependent fields will be retrieved.
+   * [Many
+   * languages](https://cloud.google.com/dialogflow/docs/reference/language)
+   * are supported.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest.DestinationCase + getDestinationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponse.java new file mode 100644 index 000000000000..06b9c66fa505 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponse.java @@ -0,0 +1,1114 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse} + */ +public final class ExportEntityTypesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) + ExportEntityTypesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportEntityTypesResponse.newBuilder() to construct. + private ExportEntityTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportEntityTypesResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportEntityTypesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.Builder.class); + } + + private int exportedEntityTypesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object exportedEntityTypes_; + + public enum ExportedEntityTypesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(1), + ENTITY_TYPES_CONTENT(2), + EXPORTEDENTITYTYPES_NOT_SET(0); + private final int value; + + private ExportedEntityTypesCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExportedEntityTypesCase valueOf(int value) { + return forNumber(value); + } + + public static ExportedEntityTypesCase forNumber(int value) { + switch (value) { + case 1: + return ENTITY_TYPES_URI; + case 2: + return ENTITY_TYPES_CONTENT; + case 0: + return EXPORTEDENTITYTYPES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ExportedEntityTypesCase getExportedEntityTypesCase() { + return ExportedEntityTypesCase.forNumber(exportedEntityTypesCase_); + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return exportedEntityTypesCase_ == 1; + } + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = s; + } + return s; + } + } + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return exportedEntityTypesCase_ == 2; + } + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getEntityTypesContent() { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getEntityTypesContentOrBuilder() { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (exportedEntityTypesCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, exportedEntityTypes_); + } + if (exportedEntityTypesCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exportedEntityTypesCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, exportedEntityTypes_); + } + if (exportedEntityTypesCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) obj; + + if (!getExportedEntityTypesCase().equals(other.getExportedEntityTypesCase())) return false; + switch (exportedEntityTypesCase_) { + case 1: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 2: + if (!getEntityTypesContent().equals(other.getEntityTypesContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (exportedEntityTypesCase_) { + case 1: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 2: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (entityTypesContentBuilder_ != null) { + entityTypesContentBuilder_.clear(); + } + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportEntityTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse result) { + result.exportedEntityTypesCase_ = exportedEntityTypesCase_; + result.exportedEntityTypes_ = this.exportedEntityTypes_; + if (exportedEntityTypesCase_ == 2 && entityTypesContentBuilder_ != null) { + result.exportedEntityTypes_ = entityTypesContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.getDefaultInstance()) + return this; + switch (other.getExportedEntityTypesCase()) { + case ENTITY_TYPES_URI: + { + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = other.exportedEntityTypes_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT: + { + mergeEntityTypesContent(other.getEntityTypesContent()); + break; + } + case EXPORTEDENTITYTYPES_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + getEntityTypesContentFieldBuilder().getBuilder(), extensionRegistry); + exportedEntityTypesCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int exportedEntityTypesCase_ = 0; + private java.lang.Object exportedEntityTypes_; + + public ExportedEntityTypesCase getExportedEntityTypesCase() { + return ExportedEntityTypesCase.forNumber(exportedEntityTypesCase_); + } + + public Builder clearExportedEntityTypes() { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return exportedEntityTypesCase_ == 1; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (exportedEntityTypesCase_ == 1) { + ref = exportedEntityTypes_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (exportedEntityTypesCase_ == 1) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported entity types. This field is
+     * populated only if `entity_types_uri` is specified in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * string entity_types_uri = 1; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + exportedEntityTypesCase_ = 1; + exportedEntityTypes_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + entityTypesContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return exportedEntityTypesCase_ == 2; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } else { + if (exportedEntityTypesCase_ == 2) { + return entityTypesContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (entityTypesContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + exportedEntityTypes_ = value; + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(value); + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder builderForValue) { + if (entityTypesContentBuilder_ == null) { + exportedEntityTypes_ = builderForValue.build(); + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(builderForValue.build()); + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + public Builder mergeEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2 + && exportedEntityTypes_ + != com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance()) { + exportedEntityTypes_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) + exportedEntityTypes_) + .mergeFrom(value) + .buildPartial(); + } else { + exportedEntityTypes_ = value; + } + onChanged(); + } else { + if (exportedEntityTypesCase_ == 2) { + entityTypesContentBuilder_.mergeFrom(value); + } else { + entityTypesContentBuilder_.setMessage(value); + } + } + exportedEntityTypesCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + public Builder clearEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (exportedEntityTypesCase_ == 2) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + onChanged(); + } + } else { + if (exportedEntityTypesCase_ == 2) { + exportedEntityTypesCase_ = 0; + exportedEntityTypes_ = null; + } + entityTypesContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder + getEntityTypesContentBuilder() { + return getEntityTypesContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getEntityTypesContentOrBuilder() { + if ((exportedEntityTypesCase_ == 2) && (entityTypesContentBuilder_ != null)) { + return entityTypesContentBuilder_.getMessageOrBuilder(); + } else { + if (exportedEntityTypesCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for entity types. This field is populated only
+     * if `entity_types_content_inline` is set to true in
+     * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + getEntityTypesContentFieldBuilder() { + if (entityTypesContentBuilder_ == null) { + if (!(exportedEntityTypesCase_ == 2)) { + exportedEntityTypes_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + entityTypesContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) exportedEntityTypes_, + getParentForChildren(), + isClean()); + exportedEntityTypes_ = null; + } + exportedEntityTypesCase_ = 2; + onChanged(); + return entityTypesContentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportEntityTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponseOrBuilder.java new file mode 100644 index 000000000000..b51448d4a9ff --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportEntityTypesResponseOrBuilder.java @@ -0,0 +1,114 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportEntityTypesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * The URI to a file containing the exported entity types. This field is
+   * populated only if `entity_types_uri` is specified in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * string entity_types_uri = 1; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return Whether the entityTypesContent field is set. + */ + boolean hasEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + * + * @return The entityTypesContent. + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content for entity types. This field is populated only
+   * if `entity_types_content_inline` is set to true in
+   * [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination entity_types_content = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getEntityTypesContentOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse.ExportedEntityTypesCase + getExportedEntityTypesCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadata.java new file mode 100644 index 000000000000..632b19ef204a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadata.java @@ -0,0 +1,437 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the
+ * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata} + */ +public final class ExportToolsMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) + ExportToolsMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportToolsMetadata.newBuilder() to construct. + private ExportToolsMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportToolsMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportToolsMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportToolsMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadataOrBuilder.java new file mode 100644 index 000000000000..1aafc0c5cfc8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportToolsMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequest.java new file mode 100644 index 000000000000..750be10f9944 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequest.java @@ -0,0 +1,1846 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest} + */ +public final class ExportToolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) + ExportToolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportToolsRequest.newBuilder() to construct. + private ExportToolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportToolsRequest() { + parent_ = ""; + tools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportToolsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.Builder.class); + } + + /** + * + * + *
+   * Data format of the exported tools.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat} + */ + public enum DataFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + DATA_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+     * Tools will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + BLOB(1), + /** + * + * + *
+     * Tools will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified format. Treated as `BLOB`.
+     * 
+ * + * DATA_FORMAT_UNSPECIFIED = 0; + */ + public static final int DATA_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Tools will be exported as raw bytes.
+     * 
+ * + * BLOB = 1; + */ + public static final int BLOB_VALUE = 1; + /** + * + * + *
+     * Tools will be exported in JSON format.
+     * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DataFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DataFormat forNumber(int value) { + switch (value) { + case 0: + return DATA_FORMAT_UNSPECIFIED; + case 1: + return BLOB; + case 2: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataFormat findValueByNumber(int number) { + return DataFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataFormat[] VALUES = values(); + + public static DataFormat valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat) + } + + private int destinationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TOOLS_URI(3), + TOOLS_CONTENT_INLINE(4), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 3: + return TOOLS_URI; + case 4: + return TOOLS_CONTENT_INLINE; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to export tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to export tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOLS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList tools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the tools. + */ + public com.google.protobuf.ProtocolStringList getToolsList() { + return tools_; + } + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of tools. + */ + public int getToolsCount() { + return tools_.size(); + } + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The tools at the given index. + */ + public java.lang.String getTools(int index) { + return tools_.get(index); + } + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the tools at the given index. + */ + public com.google.protobuf.ByteString getToolsBytes(int index) { + return tools_.getByteString(index); + } + + public static final int TOOLS_URI_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsUri field is set. + */ + public boolean hasToolsUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsUri. + */ + public java.lang.String getToolsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for toolsUri. + */ + public com.google.protobuf.ByteString getToolsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOLS_CONTENT_INLINE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. The option to return the serialized tools inline.
+   * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsContentInline field is set. + */ + @java.lang.Override + public boolean hasToolsContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+   * Optional. The option to return the serialized tools inline.
+   * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsContentInline. + */ + @java.lang.Override + public boolean getToolsContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + + public static final int DATA_FORMAT_FIELD_NUMBER = 5; + private int dataFormat_ = 0; + /** + * + * + *
+   * Optional. The data format of the exported tools. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+   * Optional. The data format of the exported tools. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat.forNumber(dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < tools_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tools_.getRaw(i)); + } + if (destinationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, destination_); + } + if (destinationCase_ == 4) { + output.writeBool(4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, dataFormat_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + { + int dataSize = 0; + for (int i = 0; i < tools_.size(); i++) { + dataSize += computeStringSizeNoTag(tools_.getRaw(i)); + } + size += dataSize; + size += 1 * getToolsList().size(); + } + if (destinationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, destination_); + } + if (destinationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 4, (boolean) ((java.lang.Boolean) destination_)); + } + if (dataFormat_ + != com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat + .DATA_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, dataFormat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getToolsList().equals(other.getToolsList())) return false; + if (dataFormat_ != other.dataFormat_) return false; + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 3: + if (!getToolsUri().equals(other.getToolsUri())) return false; + break; + case 4: + if (getToolsContentInline() != other.getToolsContentInline()) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getToolsCount() > 0) { + hash = (37 * hash) + TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getToolsList().hashCode(); + } + hash = (37 * hash) + DATA_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + dataFormat_; + switch (destinationCase_) { + case 3: + hash = (37 * hash) + TOOLS_URI_FIELD_NUMBER; + hash = (53 * hash) + getToolsUri().hashCode(); + break; + case 4: + hash = (37 * hash) + TOOLS_CONTENT_INLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getToolsContentInline()); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + tools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + dataFormat_ = 0; + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + tools_.makeImmutable(); + result.tools_ = tools_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataFormat_ = dataFormat_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest result) { + result.destinationCase_ = destinationCase_; + result.destination_ = this.destination_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.tools_.isEmpty()) { + if (tools_.isEmpty()) { + tools_ = other.tools_; + bitField0_ |= 0x00000002; + } else { + ensureToolsIsMutable(); + tools_.addAll(other.tools_); + } + onChanged(); + } + if (other.dataFormat_ != 0) { + setDataFormatValue(other.getDataFormatValue()); + } + switch (other.getDestinationCase()) { + case TOOLS_URI: + { + destinationCase_ = 3; + destination_ = other.destination_; + onChanged(); + break; + } + case TOOLS_CONTENT_INLINE: + { + setToolsContentInline(other.getToolsContentInline()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureToolsIsMutable(); + tools_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 3; + destination_ = s; + break; + } // case 26 + case 32: + { + destination_ = input.readBool(); + destinationCase_ = 4; + break; + } // case 32 + case 40: + { + dataFormat_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to export tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to export tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to export tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to export tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to export tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList tools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureToolsIsMutable() { + if (!tools_.isModifiable()) { + tools_ = new com.google.protobuf.LazyStringArrayList(tools_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the tools. + */ + public com.google.protobuf.ProtocolStringList getToolsList() { + tools_.makeImmutable(); + return tools_; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of tools. + */ + public int getToolsCount() { + return tools_.size(); + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The tools at the given index. + */ + public java.lang.String getTools(int index) { + return tools_.get(index); + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the tools at the given index. + */ + public com.google.protobuf.ByteString getToolsBytes(int index) { + return tools_.getByteString(index); + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The tools to set. + * @return This builder for chaining. + */ + public Builder setTools(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tools to add. + * @return This builder for chaining. + */ + public Builder addTools(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param values The tools to add. + * @return This builder for chaining. + */ + public Builder addAllTools(java.lang.Iterable values) { + ensureToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTools() { + tools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the tools to export.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the tools to add. + * @return This builder for chaining. + */ + public Builder addToolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureToolsIsMutable(); + tools_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsUri field is set. + */ + @java.lang.Override + public boolean hasToolsUri() { + return destinationCase_ == 3; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsUri. + */ + @java.lang.Override + public java.lang.String getToolsUri() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationCase_ == 3) { + destination_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for toolsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolsUriBytes() { + java.lang.Object ref = ""; + if (destinationCase_ == 3) { + ref = destination_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationCase_ == 3) { + destination_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The toolsUri to set. + * @return This builder for chaining. + */ + public Builder setToolsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearToolsUri() { + if (destinationCase_ == 3) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The [Google Cloud
+     * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+     * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a write operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have write permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for toolsUri to set. + * @return This builder for chaining. + */ + public Builder setToolsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationCase_ = 3; + destination_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The option to return the serialized tools inline.
+     * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsContentInline field is set. + */ + public boolean hasToolsContentInline() { + return destinationCase_ == 4; + } + /** + * + * + *
+     * Optional. The option to return the serialized tools inline.
+     * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsContentInline. + */ + public boolean getToolsContentInline() { + if (destinationCase_ == 4) { + return (java.lang.Boolean) destination_; + } + return false; + } + /** + * + * + *
+     * Optional. The option to return the serialized tools inline.
+     * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The toolsContentInline to set. + * @return This builder for chaining. + */ + public Builder setToolsContentInline(boolean value) { + + destinationCase_ = 4; + destination_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The option to return the serialized tools inline.
+     * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearToolsContentInline() { + if (destinationCase_ == 4) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + return this; + } + + private int dataFormat_ = 0; + /** + * + * + *
+     * Optional. The data format of the exported tools. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + @java.lang.Override + public int getDataFormatValue() { + return dataFormat_; + } + /** + * + * + *
+     * Optional. The data format of the exported tools. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormatValue(int value) { + dataFormat_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported tools. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat getDataFormat() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat result = + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat.forNumber( + dataFormat_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The data format of the exported tools. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The dataFormat to set. + * @return This builder for chaining. + */ + public Builder setDataFormat( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + dataFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The data format of the exported tools. If not specified, `BLOB`
+     * is assumed.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataFormat() { + bitField0_ = (bitField0_ & ~0x00000010); + dataFormat_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportToolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequestOrBuilder.java new file mode 100644 index 000000000000..6e904fef1df6 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsRequestOrBuilder.java @@ -0,0 +1,245 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportToolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to export tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to export tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the tools. + */ + java.util.List getToolsList(); + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The count of tools. + */ + int getToolsCount(); + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The tools at the given index. + */ + java.lang.String getTools(int index); + /** + * + * + *
+   * Required. The name of the tools to export.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * repeated string tools = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the tools at the given index. + */ + com.google.protobuf.ByteString getToolsBytes(int index); + + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsUri field is set. + */ + boolean hasToolsUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsUri. + */ + java.lang.String getToolsUri(); + /** + * + * + *
+   * Optional. The [Google Cloud
+   * Storage](https://cloud.google.com/storage/docs/) URI to export the tools
+   * to. The format of this URI must be `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a write operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have write permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string tools_uri = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for toolsUri. + */ + com.google.protobuf.ByteString getToolsUriBytes(); + + /** + * + * + *
+   * Optional. The option to return the serialized tools inline.
+   * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the toolsContentInline field is set. + */ + boolean hasToolsContentInline(); + /** + * + * + *
+   * Optional. The option to return the serialized tools inline.
+   * 
+ * + * bool tools_content_inline = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The toolsContentInline. + */ + boolean getToolsContentInline(); + + /** + * + * + *
+   * Optional. The data format of the exported tools. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for dataFormat. + */ + int getDataFormatValue(); + /** + * + * + *
+   * Optional. The data format of the exported tools. If not specified, `BLOB`
+   * is assumed.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat data_format = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataFormat. + */ + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DataFormat getDataFormat(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest.DestinationCase getDestinationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponse.java new file mode 100644 index 000000000000..0cfb82ad03c5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponse.java @@ -0,0 +1,1102 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse} + */ +public final class ExportToolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) + ExportToolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportToolsResponse.newBuilder() to construct. + private ExportToolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportToolsResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportToolsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.Builder.class); + } + + private int toolsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object tools_; + + public enum ToolsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TOOLS_URI(1), + TOOLS_CONTENT(2), + TOOLS_NOT_SET(0); + private final int value; + + private ToolsCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ToolsCase valueOf(int value) { + return forNumber(value); + } + + public static ToolsCase forNumber(int value) { + switch (value) { + case 1: + return TOOLS_URI; + case 2: + return TOOLS_CONTENT; + case 0: + return TOOLS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ToolsCase getToolsCase() { + return ToolsCase.forNumber(toolsCase_); + } + + public static final int TOOLS_URI_FIELD_NUMBER = 1; + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return Whether the toolsUri field is set. + */ + public boolean hasToolsUri() { + return toolsCase_ == 1; + } + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return The toolsUri. + */ + public java.lang.String getToolsUri() { + java.lang.Object ref = ""; + if (toolsCase_ == 1) { + ref = tools_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (toolsCase_ == 1) { + tools_ = s; + } + return s; + } + } + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return The bytes for toolsUri. + */ + public com.google.protobuf.ByteString getToolsUriBytes() { + java.lang.Object ref = ""; + if (toolsCase_ == 1) { + ref = tools_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (toolsCase_ == 1) { + tools_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOOLS_CONTENT_FIELD_NUMBER = 2; + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return Whether the toolsContent field is set. + */ + @java.lang.Override + public boolean hasToolsContent() { + return toolsCase_ == 2; + } + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return The toolsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getToolsContent() { + if (toolsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getToolsContentOrBuilder() { + if (toolsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (toolsCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tools_); + } + if (toolsCase_ == 2) { + output.writeMessage(2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (toolsCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tools_); + } + if (toolsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) obj; + + if (!getToolsCase().equals(other.getToolsCase())) return false; + switch (toolsCase_) { + case 1: + if (!getToolsUri().equals(other.getToolsUri())) return false; + break; + case 2: + if (!getToolsContent().equals(other.getToolsContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (toolsCase_) { + case 1: + hash = (37 * hash) + TOOLS_URI_FIELD_NUMBER; + hash = (53 * hash) + getToolsUri().hashCode(); + break; + case 2: + hash = (37 * hash) + TOOLS_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getToolsContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (toolsContentBuilder_ != null) { + toolsContentBuilder_.clear(); + } + toolsCase_ = 0; + tools_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse result) { + result.toolsCase_ = toolsCase_; + result.tools_ = this.tools_; + if (toolsCase_ == 2 && toolsContentBuilder_ != null) { + result.tools_ = toolsContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.getDefaultInstance()) + return this; + switch (other.getToolsCase()) { + case TOOLS_URI: + { + toolsCase_ = 1; + tools_ = other.tools_; + onChanged(); + break; + } + case TOOLS_CONTENT: + { + mergeToolsContent(other.getToolsContent()); + break; + } + case TOOLS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + toolsCase_ = 1; + tools_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getToolsContentFieldBuilder().getBuilder(), extensionRegistry); + toolsCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int toolsCase_ = 0; + private java.lang.Object tools_; + + public ToolsCase getToolsCase() { + return ToolsCase.forNumber(toolsCase_); + } + + public Builder clearTools() { + toolsCase_ = 0; + tools_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @return Whether the toolsUri field is set. + */ + @java.lang.Override + public boolean hasToolsUri() { + return toolsCase_ == 1; + } + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @return The toolsUri. + */ + @java.lang.Override + public java.lang.String getToolsUri() { + java.lang.Object ref = ""; + if (toolsCase_ == 1) { + ref = tools_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (toolsCase_ == 1) { + tools_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @return The bytes for toolsUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolsUriBytes() { + java.lang.Object ref = ""; + if (toolsCase_ == 1) { + ref = tools_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (toolsCase_ == 1) { + tools_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @param value The toolsUri to set. + * @return This builder for chaining. + */ + public Builder setToolsUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + toolsCase_ = 1; + tools_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @return This builder for chaining. + */ + public Builder clearToolsUri() { + if (toolsCase_ == 1) { + toolsCase_ = 0; + tools_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The URI to a file containing the exported tools. This field is
+     * populated only if `tools_uri` is specified in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * string tools_uri = 1; + * + * @param value The bytes for toolsUri to set. + * @return This builder for chaining. + */ + public Builder setToolsUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + toolsCase_ = 1; + tools_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + toolsContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return Whether the toolsContent field is set. + */ + @java.lang.Override + public boolean hasToolsContent() { + return toolsCase_ == 2; + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return The toolsContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getToolsContent() { + if (toolsContentBuilder_ == null) { + if (toolsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } else { + if (toolsCase_ == 2) { + return toolsContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + public Builder setToolsContent(com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (toolsContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tools_ = value; + onChanged(); + } else { + toolsContentBuilder_.setMessage(value); + } + toolsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + public Builder setToolsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder builderForValue) { + if (toolsContentBuilder_ == null) { + tools_ = builderForValue.build(); + onChanged(); + } else { + toolsContentBuilder_.setMessage(builderForValue.build()); + } + toolsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + public Builder mergeToolsContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination value) { + if (toolsContentBuilder_ == null) { + if (toolsCase_ == 2 + && tools_ + != com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance()) { + tools_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_) + .mergeFrom(value) + .buildPartial(); + } else { + tools_ = value; + } + onChanged(); + } else { + if (toolsCase_ == 2) { + toolsContentBuilder_.mergeFrom(value); + } else { + toolsContentBuilder_.setMessage(value); + } + } + toolsCase_ = 2; + return this; + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + public Builder clearToolsContent() { + if (toolsContentBuilder_ == null) { + if (toolsCase_ == 2) { + toolsCase_ = 0; + tools_ = null; + onChanged(); + } + } else { + if (toolsCase_ == 2) { + toolsCase_ = 0; + tools_ = null; + } + toolsContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder + getToolsContentBuilder() { + return getToolsContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder + getToolsContentOrBuilder() { + if ((toolsCase_ == 2) && (toolsContentBuilder_ != null)) { + return toolsContentBuilder_.getMessageOrBuilder(); + } else { + if (toolsCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content for tools. This field is populated only if
+     * `tools_content_inline` is set to true in
+     * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder> + getToolsContentFieldBuilder() { + if (toolsContentBuilder_ == null) { + if (!(toolsCase_ == 2)) { + tools_ = com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.getDefaultInstance(); + } + toolsContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.InlineDestination) tools_, + getParentForChildren(), + isClean()); + tools_ = null; + } + toolsCase_ = 2; + onChanged(); + return toolsContentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportToolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponseOrBuilder.java new file mode 100644 index 000000000000..f08730cfd89d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ExportToolsResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ExportToolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return Whether the toolsUri field is set. + */ + boolean hasToolsUri(); + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return The toolsUri. + */ + java.lang.String getToolsUri(); + /** + * + * + *
+   * The URI to a file containing the exported tools. This field is
+   * populated only if `tools_uri` is specified in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * string tools_uri = 1; + * + * @return The bytes for toolsUri. + */ + com.google.protobuf.ByteString getToolsUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return Whether the toolsContent field is set. + */ + boolean hasToolsContent(); + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + * + * @return The toolsContent. + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestination getToolsContent(); + /** + * + * + *
+   * Uncompressed byte content for tools. This field is populated only if
+   * `tools_content_inline` is set to true in
+   * [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest].
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineDestination tools_content = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineDestinationOrBuilder getToolsContentOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse.ToolsCase getToolsCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java new file mode 100644 index 000000000000..3cece90348f7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocation.java @@ -0,0 +1,1886 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Stores metadata of the invocation of a CX flow.
+ * Next Id: 7
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowInvocation} + */ +public final class FlowInvocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.FlowInvocation) + FlowInvocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use FlowInvocation.newBuilder() to construct. + private FlowInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FlowInvocation() { + flow_ = ""; + inputParameters_ = java.util.Collections.emptyList(); + outputParameters_ = java.util.Collections.emptyList(); + flowState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FlowInvocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder.class); + } + + public static final int FLOW_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object flow_ = ""; + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * flows/<Flow ID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + @java.lang.Override + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * flows/<Flow ID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List inputParameters_; + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + @java.lang.Override + public java.util.List + getInputParametersList() { + return inputParameters_; + } + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + @java.lang.Override + public java.util.List + getInputParametersOrBuilderList() { + return inputParameters_; + } + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + @java.lang.Override + public int getInputParametersCount() { + return inputParameters_.size(); + } + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { + return inputParameters_.get(index); + } + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getInputParametersOrBuilder(int index) { + return inputParameters_.get(index); + } + + public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List outputParameters_; + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + @java.lang.Override + public java.util.List + getOutputParametersList() { + return outputParameters_; + } + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + @java.lang.Override + public java.util.List + getOutputParametersOrBuilderList() { + return outputParameters_; + } + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + @java.lang.Override + public int getOutputParametersCount() { + return outputParameters_.size(); + } + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { + return outputParameters_.get(index); + } + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getOutputParametersOrBuilder(int index) { + return outputParameters_.get(index); + } + + public static final int FLOW_STATE_FIELD_NUMBER = 4; + private int flowState_ = 0; + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + @java.lang.Override + public int getFlowStateValue() { + return flowState_; + } + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getFlowState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(flowState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flow_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, flow_); + } + for (int i = 0; i < inputParameters_.size(); i++) { + output.writeMessage(2, inputParameters_.get(i)); + } + for (int i = 0; i < outputParameters_.size(); i++) { + output.writeMessage(3, outputParameters_.get(i)); + } + if (flowState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, flowState_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flow_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, flow_); + } + for (int i = 0; i < inputParameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputParameters_.get(i)); + } + for (int i = 0; i < outputParameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, outputParameters_.get(i)); + } + if (flowState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, flowState_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation other = + (com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) obj; + + if (!getFlow().equals(other.getFlow())) return false; + if (!getInputParametersList().equals(other.getInputParametersList())) return false; + if (!getOutputParametersList().equals(other.getOutputParametersList())) return false; + if (flowState_ != other.flowState_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FLOW_FIELD_NUMBER; + hash = (53 * hash) + getFlow().hashCode(); + if (getInputParametersCount() > 0) { + hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputParametersList().hashCode(); + } + if (getOutputParametersCount() > 0) { + hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParametersList().hashCode(); + } + hash = (37 * hash) + FLOW_STATE_FIELD_NUMBER; + hash = (53 * hash) + flowState_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stores metadata of the invocation of a CX flow.
+   * Next Id: 7
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.FlowInvocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.FlowInvocation) + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.class, + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + flow_ = ""; + if (inputParametersBuilder_ == null) { + inputParameters_ = java.util.Collections.emptyList(); + } else { + inputParameters_ = null; + inputParametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (outputParametersBuilder_ == null) { + outputParameters_ = java.util.Collections.emptyList(); + } else { + outputParameters_ = null; + outputParametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + flowState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_FlowInvocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation build() { + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result = + new com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result) { + if (inputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inputParameters_ = java.util.Collections.unmodifiableList(inputParameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inputParameters_ = inputParameters_; + } else { + result.inputParameters_ = inputParametersBuilder_.build(); + } + if (outputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + outputParameters_ = java.util.Collections.unmodifiableList(outputParameters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.outputParameters_ = outputParameters_; + } else { + result.outputParameters_ = outputParametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.flow_ = flow_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.flowState_ = flowState_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation.getDefaultInstance()) + return this; + if (!other.getFlow().isEmpty()) { + flow_ = other.flow_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (inputParametersBuilder_ == null) { + if (!other.inputParameters_.isEmpty()) { + if (inputParameters_.isEmpty()) { + inputParameters_ = other.inputParameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInputParametersIsMutable(); + inputParameters_.addAll(other.inputParameters_); + } + onChanged(); + } + } else { + if (!other.inputParameters_.isEmpty()) { + if (inputParametersBuilder_.isEmpty()) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + inputParameters_ = other.inputParameters_; + bitField0_ = (bitField0_ & ~0x00000002); + inputParametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputParametersFieldBuilder() + : null; + } else { + inputParametersBuilder_.addAllMessages(other.inputParameters_); + } + } + } + if (outputParametersBuilder_ == null) { + if (!other.outputParameters_.isEmpty()) { + if (outputParameters_.isEmpty()) { + outputParameters_ = other.outputParameters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureOutputParametersIsMutable(); + outputParameters_.addAll(other.outputParameters_); + } + onChanged(); + } + } else { + if (!other.outputParameters_.isEmpty()) { + if (outputParametersBuilder_.isEmpty()) { + outputParametersBuilder_.dispose(); + outputParametersBuilder_ = null; + outputParameters_ = other.outputParameters_; + bitField0_ = (bitField0_ & ~0x00000004); + outputParametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputParametersFieldBuilder() + : null; + } else { + outputParametersBuilder_.addAllMessages(other.outputParameters_); + } + } + } + if (other.flowState_ != 0) { + setFlowStateValue(other.getFlowStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + flow_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(m); + } else { + inputParametersBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(m); + } else { + outputParametersBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + flowState_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object flow_ = ""; + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * flows/<Flow ID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + public java.lang.String getFlow() { + java.lang.Object ref = flow_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + flow_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * flows/<Flow ID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + public com.google.protobuf.ByteString getFlowBytes() { + java.lang.Object ref = flow_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + flow_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * flows/<Flow ID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The flow to set. + * @return This builder for chaining. + */ + public Builder setFlow(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * flows/<Flow ID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearFlow() { + flow_ = getDefaultInstance().getFlow(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of the flow.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * flows/<Flow ID>`.
+     * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for flow to set. + * @return This builder for chaining. + */ + public Builder setFlowBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + flow_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List + inputParameters_ = java.util.Collections.emptyList(); + + private void ensureInputParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inputParameters_ = + new java.util.ArrayList( + inputParameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + inputParametersBuilder_; + + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public java.util.List + getInputParametersList() { + if (inputParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputParameters_); + } else { + return inputParametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public int getInputParametersCount() { + if (inputParametersBuilder_ == null) { + return inputParameters_.size(); + } else { + return inputParametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { + if (inputParametersBuilder_ == null) { + return inputParameters_.get(index); + } else { + return inputParametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder setInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.set(index, value); + onChanged(); + } else { + inputParametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder setInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.set(index, builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder addInputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.add(value); + onChanged(); + } else { + inputParametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder addInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.add(index, value); + onChanged(); + } else { + inputParametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder addInputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder addInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(index, builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder addAllInputParameters( + java.lang.Iterable + values) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameters_); + onChanged(); + } else { + inputParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder clearInputParameters() { + if (inputParametersBuilder_ == null) { + inputParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + inputParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public Builder removeInputParameters(int index) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.remove(index); + onChanged(); + } else { + inputParametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getInputParametersBuilder( + int index) { + return getInputParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getInputParametersOrBuilder(int index) { + if (inputParametersBuilder_ == null) { + return inputParameters_.get(index); + } else { + return inputParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public java.util.List + getInputParametersOrBuilderList() { + if (inputParametersBuilder_ != null) { + return inputParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputParameters_); + } + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addInputParametersBuilder() { + return getInputParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addInputParametersBuilder( + int index) { + return getInputParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of input parameters for the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + * + */ + public java.util.List + getInputParametersBuilderList() { + return getInputParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getInputParametersFieldBuilder() { + if (inputParametersBuilder_ == null) { + inputParametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + inputParameters_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + inputParameters_ = null; + } + return inputParametersBuilder_; + } + + private java.util.List + outputParameters_ = java.util.Collections.emptyList(); + + private void ensureOutputParametersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + outputParameters_ = + new java.util.ArrayList( + outputParameters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + outputParametersBuilder_; + + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public java.util.List + getOutputParametersList() { + if (outputParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputParameters_); + } else { + return outputParametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public int getOutputParametersCount() { + if (outputParametersBuilder_ == null) { + return outputParameters_.size(); + } else { + return outputParametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { + if (outputParametersBuilder_ == null) { + return outputParameters_.get(index); + } else { + return outputParametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder setOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.set(index, value); + onChanged(); + } else { + outputParametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder setOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.set(index, builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder addOutputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.add(value); + onChanged(); + } else { + outputParametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder addOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.add(index, value); + onChanged(); + } else { + outputParametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder addOutputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder addOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(index, builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder addAllOutputParameters( + java.lang.Iterable + values) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameters_); + onChanged(); + } else { + outputParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder clearOutputParameters() { + if (outputParametersBuilder_ == null) { + outputParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + outputParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public Builder removeOutputParameters(int index) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.remove(index); + onChanged(); + } else { + outputParametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + getOutputParametersBuilder(int index) { + return getOutputParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getOutputParametersOrBuilder(int index) { + if (outputParametersBuilder_ == null) { + return outputParameters_.get(index); + } else { + return outputParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public java.util.List + getOutputParametersOrBuilderList() { + if (outputParametersBuilder_ != null) { + return outputParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputParameters_); + } + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addOutputParametersBuilder() { + return getOutputParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addOutputParametersBuilder(int index) { + return getOutputParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of output parameters generated by the flow invocation.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + public java.util.List + getOutputParametersBuilderList() { + return getOutputParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getOutputParametersFieldBuilder() { + if (outputParametersBuilder_ == null) { + outputParametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + outputParameters_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + outputParameters_ = null; + } + return outputParametersBuilder_; + } + + private int flowState_ = 0; + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + @java.lang.Override + public int getFlowStateValue() { + return flowState_; + } + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for flowState to set. + * @return This builder for chaining. + */ + public Builder setFlowStateValue(int value) { + flowState_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getFlowState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(flowState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The flowState to set. + * @return This builder for chaining. + */ + public Builder setFlowState(com.google.cloud.dialogflow.cx.v3beta1.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + flowState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Flow invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearFlowState() { + bitField0_ = (bitField0_ & ~0x00000008); + flowState_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.FlowInvocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.FlowInvocation) + private static final com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FlowInvocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java new file mode 100644 index 000000000000..691ea64338f7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowInvocationOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface FlowInvocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.FlowInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * flows/<Flow ID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The flow. + */ + java.lang.String getFlow(); + /** + * + * + *
+   * Required. The unique identifier of the flow.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * flows/<Flow ID>`.
+   * 
+ * + * + * string flow = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for flow. + */ + com.google.protobuf.ByteString getFlowBytes(); + + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + java.util.List getInputParametersList(); + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index); + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + int getInputParametersCount(); + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + java.util.List + getInputParametersOrBuilderList(); + /** + * + * + *
+   * A list of input parameters for the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getInputParametersOrBuilder( + int index); + + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + java.util.List getOutputParametersList(); + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index); + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + int getOutputParametersCount(); + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + java.util.List + getOutputParametersOrBuilderList(); + /** + * + * + *
+   * A list of output parameters generated by the flow invocation.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getOutputParametersOrBuilder( + int index); + + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for flowState. + */ + int getFlowStateValue(); + /** + * + * + *
+   * Required. Flow invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState flow_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The flowState. + */ + com.google.cloud.dialogflow.cx.v3beta1.OutputState getFlowState(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfo.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfo.java new file mode 100644 index 000000000000..230dc6aa3955 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfo.java @@ -0,0 +1,1046 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/session.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Represents the information of a query if handled by generative agent
+ * resources.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeInfo} + */ +public final class GenerativeInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) + GenerativeInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerativeInfo.newBuilder() to construct. + private GenerativeInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerativeInfo() { + currentPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerativeInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder.class); + } + + private int bitField0_; + public static final int CURRENT_PLAYBOOKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList currentPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @return A list containing the currentPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getCurrentPlaybooksList() { + return currentPlaybooks_; + } + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @return The count of currentPlaybooks. + */ + public int getCurrentPlaybooksCount() { + return currentPlaybooks_.size(); + } + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the element to return. + * @return The currentPlaybooks at the given index. + */ + public java.lang.String getCurrentPlaybooks(int index) { + return currentPlaybooks_.get(index); + } + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the value to return. + * @return The bytes of the currentPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getCurrentPlaybooksBytes(int index) { + return currentPlaybooks_.getByteString(index); + } + + public static final int ACTION_TRACING_INFO_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Example actionTracingInfo_; + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return Whether the actionTracingInfo field is set. + */ + @java.lang.Override + public boolean hasActionTracingInfo() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return The actionTracingInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getActionTracingInfo() { + return actionTracingInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : actionTracingInfo_; + } + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getActionTracingInfoOrBuilder() { + return actionTracingInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : actionTracingInfo_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < currentPlaybooks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, currentPlaybooks_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getActionTracingInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < currentPlaybooks_.size(); i++) { + dataSize += computeStringSizeNoTag(currentPlaybooks_.getRaw(i)); + } + size += dataSize; + size += 1 * getCurrentPlaybooksList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getActionTracingInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo other = + (com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) obj; + + if (!getCurrentPlaybooksList().equals(other.getCurrentPlaybooksList())) return false; + if (hasActionTracingInfo() != other.hasActionTracingInfo()) return false; + if (hasActionTracingInfo()) { + if (!getActionTracingInfo().equals(other.getActionTracingInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCurrentPlaybooksCount() > 0) { + hash = (37 * hash) + CURRENT_PLAYBOOKS_FIELD_NUMBER; + hash = (53 * hash) + getCurrentPlaybooksList().hashCode(); + } + if (hasActionTracingInfo()) { + hash = (37 * hash) + ACTION_TRACING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getActionTracingInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the information of a query if handled by generative agent
+   * resources.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GenerativeInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.class, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getActionTracingInfoFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + currentPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + actionTracingInfo_ = null; + if (actionTracingInfoBuilder_ != null) { + actionTracingInfoBuilder_.dispose(); + actionTracingInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.SessionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo build() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo result = + new com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + currentPlaybooks_.makeImmutable(); + result.currentPlaybooks_ = currentPlaybooks_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionTracingInfo_ = + actionTracingInfoBuilder_ == null + ? actionTracingInfo_ + : actionTracingInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance()) + return this; + if (!other.currentPlaybooks_.isEmpty()) { + if (currentPlaybooks_.isEmpty()) { + currentPlaybooks_ = other.currentPlaybooks_; + bitField0_ |= 0x00000001; + } else { + ensureCurrentPlaybooksIsMutable(); + currentPlaybooks_.addAll(other.currentPlaybooks_); + } + onChanged(); + } + if (other.hasActionTracingInfo()) { + mergeActionTracingInfo(other.getActionTracingInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCurrentPlaybooksIsMutable(); + currentPlaybooks_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage( + getActionTracingInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList currentPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureCurrentPlaybooksIsMutable() { + if (!currentPlaybooks_.isModifiable()) { + currentPlaybooks_ = new com.google.protobuf.LazyStringArrayList(currentPlaybooks_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @return A list containing the currentPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getCurrentPlaybooksList() { + currentPlaybooks_.makeImmutable(); + return currentPlaybooks_; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @return The count of currentPlaybooks. + */ + public int getCurrentPlaybooksCount() { + return currentPlaybooks_.size(); + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the element to return. + * @return The currentPlaybooks at the given index. + */ + public java.lang.String getCurrentPlaybooks(int index) { + return currentPlaybooks_.get(index); + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the value to return. + * @return The bytes of the currentPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getCurrentPlaybooksBytes(int index) { + return currentPlaybooks_.getByteString(index); + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index to set the value at. + * @param value The currentPlaybooks to set. + * @return This builder for chaining. + */ + public Builder setCurrentPlaybooks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentPlaybooksIsMutable(); + currentPlaybooks_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param value The currentPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addCurrentPlaybooks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCurrentPlaybooksIsMutable(); + currentPlaybooks_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param values The currentPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addAllCurrentPlaybooks(java.lang.Iterable values) { + ensureCurrentPlaybooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, currentPlaybooks_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @return This builder for chaining. + */ + public Builder clearCurrentPlaybooks() { + currentPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+     * the conversation has currently entered, with the most recent one on the
+     * top.
+     * 
+ * + * repeated string current_playbooks = 1; + * + * @param value The bytes of the currentPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addCurrentPlaybooksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCurrentPlaybooksIsMutable(); + currentPlaybooks_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Example actionTracingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + actionTracingInfoBuilder_; + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return Whether the actionTracingInfo field is set. + */ + public boolean hasActionTracingInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return The actionTracingInfo. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getActionTracingInfo() { + if (actionTracingInfoBuilder_ == null) { + return actionTracingInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : actionTracingInfo_; + } else { + return actionTracingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public Builder setActionTracingInfo(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (actionTracingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + actionTracingInfo_ = value; + } else { + actionTracingInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public Builder setActionTracingInfo( + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (actionTracingInfoBuilder_ == null) { + actionTracingInfo_ = builderForValue.build(); + } else { + actionTracingInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public Builder mergeActionTracingInfo(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (actionTracingInfoBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && actionTracingInfo_ != null + && actionTracingInfo_ + != com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()) { + getActionTracingInfoBuilder().mergeFrom(value); + } else { + actionTracingInfo_ = value; + } + } else { + actionTracingInfoBuilder_.mergeFrom(value); + } + if (actionTracingInfo_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public Builder clearActionTracingInfo() { + bitField0_ = (bitField0_ & ~0x00000002); + actionTracingInfo_ = null; + if (actionTracingInfoBuilder_ != null) { + actionTracingInfoBuilder_.dispose(); + actionTracingInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder getActionTracingInfoBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getActionTracingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getActionTracingInfoOrBuilder() { + if (actionTracingInfoBuilder_ != null) { + return actionTracingInfoBuilder_.getMessageOrBuilder(); + } else { + return actionTracingInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : actionTracingInfo_; + } + } + /** + * + * + *
+     * The actions performed by the generative playbook for the current agent
+     * response.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + getActionTracingInfoFieldBuilder() { + if (actionTracingInfoBuilder_ == null) { + actionTracingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder>( + getActionTracingInfo(), getParentForChildren(), isClean()); + actionTracingInfo_ = null; + } + return actionTracingInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) + private static final com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerativeInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfoOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfoOrBuilder.java new file mode 100644 index 000000000000..c8ad4f503783 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeInfoOrBuilder.java @@ -0,0 +1,123 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/session.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GenerativeInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GenerativeInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @return A list containing the currentPlaybooks. + */ + java.util.List getCurrentPlaybooksList(); + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @return The count of currentPlaybooks. + */ + int getCurrentPlaybooksCount(); + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the element to return. + * @return The currentPlaybooks at the given index. + */ + java.lang.String getCurrentPlaybooks(int index); + /** + * + * + *
+   * The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that
+   * the conversation has currently entered, with the most recent one on the
+   * top.
+   * 
+ * + * repeated string current_playbooks = 1; + * + * @param index The index of the value to return. + * @return The bytes of the currentPlaybooks at the given index. + */ + com.google.protobuf.ByteString getCurrentPlaybooksBytes(int index); + + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return Whether the actionTracingInfo field is set. + */ + boolean hasActionTracingInfo(); + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + * + * @return The actionTracingInfo. + */ + com.google.cloud.dialogflow.cx.v3beta1.Example getActionTracingInfo(); + /** + * + * + *
+   * The actions performed by the generative playbook for the current agent
+   * response.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Example action_tracing_info = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getActionTracingInfoOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java index 01b629741fff..1cf95df76cdf 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettings.java @@ -2626,6 +2626,20 @@ public interface KnowledgeConnectorSettingsOrBuilder * @return The bytes for agentScope. */ com.google.protobuf.ByteString getAgentScopeBytes(); + + /** + * + * + *
+     * Whether to disable fallback to Data Store search results (in case the LLM
+     * couldn't pick a proper answer). Per default the feature is enabled.
+     * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + boolean getDisableDataStoreFallback(); } /** * @@ -2945,6 +2959,25 @@ public com.google.protobuf.ByteString getAgentScopeBytes() { } } + public static final int DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER = 8; + private boolean disableDataStoreFallback_ = false; + /** + * + * + *
+     * Whether to disable fallback to Data Store search results (in case the LLM
+     * couldn't pick a proper answer). Per default the feature is enabled.
+     * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + @java.lang.Override + public boolean getDisableDataStoreFallback() { + return disableDataStoreFallback_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2974,6 +3007,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_); } + if (disableDataStoreFallback_ != false) { + output.writeBool(8, disableDataStoreFallback_); + } getUnknownFields().writeTo(output); } @@ -2998,6 +3034,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_); } + if (disableDataStoreFallback_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, disableDataStoreFallback_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -3022,6 +3061,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAgentIdentity().equals(other.getAgentIdentity())) return false; if (!getBusinessDescription().equals(other.getBusinessDescription())) return false; if (!getAgentScope().equals(other.getAgentScope())) return false; + if (getDisableDataStoreFallback() != other.getDisableDataStoreFallback()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3043,6 +3083,8 @@ public int hashCode() { hash = (53 * hash) + getBusinessDescription().hashCode(); hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER; hash = (53 * hash) + getAgentScope().hashCode(); + hash = (37 * hash) + DISABLE_DATA_STORE_FALLBACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableDataStoreFallback()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -3217,6 +3259,7 @@ public Builder clear() { agentIdentity_ = ""; businessDescription_ = ""; agentScope_ = ""; + disableDataStoreFallback_ = false; return this; } @@ -3277,6 +3320,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000010) != 0)) { result.agentScope_ = agentScope_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.disableDataStoreFallback_ = disableDataStoreFallback_; + } } @java.lang.Override @@ -3359,6 +3405,9 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; onChanged(); } + if (other.getDisableDataStoreFallback() != false) { + setDisableDataStoreFallback(other.getDisableDataStoreFallback()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3415,6 +3464,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 42 + case 64: + { + disableDataStoreFallback_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 64 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3984,6 +4039,62 @@ public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) { return this; } + private boolean disableDataStoreFallback_; + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return The disableDataStoreFallback. + */ + @java.lang.Override + public boolean getDisableDataStoreFallback() { + return disableDataStoreFallback_; + } + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @param value The disableDataStoreFallback to set. + * @return This builder for chaining. + */ + public Builder setDisableDataStoreFallback(boolean value) { + + disableDataStoreFallback_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether to disable fallback to Data Store search results (in case the LLM
+       * couldn't pick a proper answer). Per default the feature is enabled.
+       * 
+ * + * bool disable_data_store_fallback = 8; + * + * @return This builder for chaining. + */ + public Builder clearDisableDataStoreFallback() { + bitField0_ = (bitField0_ & ~0x00000020); + disableDataStoreFallback_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -4334,6 +4445,57 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { } } + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 8; + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4363,6 +4525,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(7, getKnowledgeConnectorSettings()); } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(8, getLlmModelSettings()); + } getUnknownFields().writeTo(output); } @@ -4391,6 +4556,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, getKnowledgeConnectorSettings()); } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLlmModelSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4422,6 +4590,10 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4449,6 +4621,10 @@ public int hashCode() { } hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4593,6 +4769,7 @@ private void maybeForceBuilderInitialization() { getFallbackSettingsFieldBuilder(); getGenerativeSafetySettingsFieldBuilder(); getKnowledgeConnectorSettingsFieldBuilder(); + getLlmModelSettingsFieldBuilder(); } } @@ -4617,6 +4794,11 @@ public Builder clear() { knowledgeConnectorSettingsBuilder_ = null; } languageCode_ = ""; + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } return this; } @@ -4679,6 +4861,11 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSett if (((from_bitField0_ & 0x00000010) != 0)) { result.languageCode_ = languageCode_; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000008; + } result.bitField0_ |= to_bitField0_; } @@ -4747,6 +4934,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettin bitField0_ |= 0x00000010; onChanged(); } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4806,6 +4996,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 58 + case 66: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -5684,6 +5881,197 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public Builder mergeLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00000020); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder + getLlmModelSettingsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + /** + * + * + *
+     * LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java index 9053e2319be8..75c846fbf03a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsOrBuilder.java @@ -196,4 +196,39 @@ public interface GenerativeSettingsOrBuilder * @return The bytes for languageCode. */ com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings(); + /** + * + * + *
+   * LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 8; + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java index b69a85ad3e90..5e5df9c0ceb9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GenerativeSettingsProto.java @@ -44,6 +44,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -57,7 +61,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "erative_settings.proto\022\"google.cloud.dia" + "logflow.cx.v3beta1\032\031google/api/resource." + "proto\0328google/cloud/dialogflow/cx/v3beta" - + "1/safety_settings.proto\"\352\006\n\022GenerativeSe" + + "1/safety_settings.proto\"\341\007\n\022GenerativeSe" + "ttings\022\014\n\004name\030\005 \001(\t\022b\n\021fallback_setting" + "s\030\001 \001(\0132G.google.cloud.dialogflow.cx.v3b" + "eta1.GenerativeSettings.FallbackSettings" @@ -66,25 +70,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "Settings\022w\n\034knowledge_connector_settings" + "\030\007 \001(\0132Q.google.cloud.dialogflow.cx.v3be" + "ta1.GenerativeSettings.KnowledgeConnecto" - + "rSettings\022\025\n\rlanguage_code\030\004 \001(\t\032\352\001\n\020Fal" - + "lbackSettings\022\027\n\017selected_prompt\030\003 \001(\t\022p" - + "\n\020prompt_templates\030\004 \003(\0132V.google.cloud." - + "dialogflow.cx.v3beta1.GenerativeSettings" - + ".FallbackSettings.PromptTemplate\032K\n\016Prom" - + "ptTemplate\022\024\n\014display_name\030\001 \001(\t\022\023\n\013prom" - + "pt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\210\001\n\032Knowle" - + "dgeConnectorSettings\022\020\n\010business\030\001 \001(\t\022\r" - + "\n\005agent\030\002 \001(\t\022\026\n\016agent_identity\030\003 \001(\t\022\034\n" - + "\024business_description\030\004 \001(\t\022\023\n\013agent_sco" - + "pe\030\005 \001(\t:\201\001\352A~\n1dialogflow.googleapis.co" - + "m/AgentGenerativeSettings\022Iprojects/{pro" - + "ject}/locations/{location}/agents/{agent" - + "}/generativeSettingsB\321\001\n&com.google.clou" - + "d.dialogflow.cx.v3beta1B\027GenerativeSetti" - + "ngsProtoP\001Z6cloud.google.com/go/dialogfl" - + "ow/cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Goo" - + "gle.Cloud.Dialogflow.Cx.V3Beta1\352\002&Google" - + "::Cloud::Dialogflow::CX::V3beta1b\006proto3" + + "rSettings\022\025\n\rlanguage_code\030\004 \001(\t\022P\n\022llm_" + + "model_settings\030\010 \001(\01324.google.cloud.dial" + + "ogflow.cx.v3beta1.LlmModelSettings\032\352\001\n\020F" + + "allbackSettings\022\027\n\017selected_prompt\030\003 \001(\t" + + "\022p\n\020prompt_templates\030\004 \003(\0132V.google.clou" + + "d.dialogflow.cx.v3beta1.GenerativeSettin" + + "gs.FallbackSettings.PromptTemplate\032K\n\016Pr" + + "omptTemplate\022\024\n\014display_name\030\001 \001(\t\022\023\n\013pr" + + "ompt_text\030\002 \001(\t\022\016\n\006frozen\030\003 \001(\010\032\255\001\n\032Know" + + "ledgeConnectorSettings\022\020\n\010business\030\001 \001(\t" + + "\022\r\n\005agent\030\002 \001(\t\022\026\n\016agent_identity\030\003 \001(\t\022" + + "\034\n\024business_description\030\004 \001(\t\022\023\n\013agent_s" + + "cope\030\005 \001(\t\022#\n\033disable_data_store_fallbac" + + "k\030\010 \001(\010:\201\001\352A~\n1dialogflow.googleapis.com" + + "/AgentGenerativeSettings\022Iprojects/{proj" + + "ect}/locations/{location}/agents/{agent}" + + "/generativeSettings\"6\n\020LlmModelSettings\022" + + "\r\n\005model\030\001 \001(\t\022\023\n\013prompt_text\030\002 \001(\tB\321\001\n&" + + "com.google.cloud.dialogflow.cx.v3beta1B\027" + + "GenerativeSettingsProtoP\001Z6cloud.google." + + "com/go/dialogflow/cx/apiv3beta1/cxpb;cxp" + + "b\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.Cx.V" + + "3Beta1\352\002&Google::Cloud::Dialogflow::CX::" + + "V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -104,6 +113,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GenerativeSafetySettings", "KnowledgeConnectorSettings", "LanguageCode", + "LlmModelSettings", }); internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_FallbackSettings_descriptor = internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_descriptor @@ -133,7 +143,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeSettings_KnowledgeConnectorSettings_descriptor, new java.lang.String[] { - "Business", "Agent", "AgentIdentity", "BusinessDescription", "AgentScope", + "Business", + "Agent", + "AgentIdentity", + "BusinessDescription", + "AgentScope", + "DisableDataStoreFallback", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor, + new java.lang.String[] { + "Model", "PromptText", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Generator.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Generator.java index 337b0e92293f..49dc207f692d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Generator.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Generator.java @@ -1183,6 +1183,57 @@ public com.google.cloud.dialogflow.cx.v3beta1.Generator.Placeholder getPlacehold return placeholders_.get(index); } + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 9; + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1209,6 +1260,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < placeholders_.size(); i++) { output.writeMessage(5, placeholders_.get(i)); } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(9, getLlmModelSettings()); + } getUnknownFields().writeTo(output); } @@ -1230,6 +1284,9 @@ public int getSerializedSize() { for (int i = 0; i < placeholders_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, placeholders_.get(i)); } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getLlmModelSettings()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1253,6 +1310,10 @@ public boolean equals(final java.lang.Object obj) { if (!getPromptText().equals(other.getPromptText())) return false; } if (!getPlaceholdersList().equals(other.getPlaceholdersList())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1276,6 +1337,10 @@ public int hashCode() { hash = (37 * hash) + PLACEHOLDERS_FIELD_NUMBER; hash = (53 * hash) + getPlaceholdersList().hashCode(); } + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1421,6 +1486,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getPromptTextFieldBuilder(); getPlaceholdersFieldBuilder(); + getLlmModelSettingsFieldBuilder(); } } @@ -1442,6 +1508,11 @@ public Builder clear() { placeholdersBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } return this; } @@ -1503,6 +1574,11 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Generator resu result.promptText_ = promptTextBuilder_ == null ? promptText_ : promptTextBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -1592,6 +1668,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Generator other) } } } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1650,6 +1729,13 @@ public Builder mergeFrom( } break; } // case 42 + case 74: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2528,6 +2614,197 @@ public Builder removePlaceholders(int index) { return placeholdersBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public Builder mergeLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00000010); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder + getLlmModelSettingsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + /** + * + * + *
+     * The LLM model settings.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorOrBuilder.java index 939a1c39fecd..a7d798ba06a1 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorOrBuilder.java @@ -194,4 +194,39 @@ public interface GeneratorOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.Generator.PlaceholderOrBuilder getPlaceholdersOrBuilder( int index); + + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings(); + /** + * + * + *
+   * The LLM model settings.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 9; + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorProto.java index 1dde5739e32a..600c2987d57a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GeneratorProto.java @@ -78,73 +78,78 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".v3beta1\032\034google/api/annotations.proto\032\027" + "google/api/client.proto\032\037google/api/fiel" + "d_behavior.proto\032\031google/api/resource.pr" - + "oto\032\033google/protobuf/empty.proto\032 google" - + "/protobuf/field_mask.proto\"\362\002\n\tGenerator" - + "\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A" - + "\002\022D\n\013prompt_text\030\003 \001(\0132*.google.cloud.di" - + "alogflow.cx.v3beta1.PhraseB\003\340A\002\022T\n\014place" - + "holders\030\005 \003(\01329.google.cloud.dialogflow." - + "cx.v3beta1.Generator.PlaceholderB\003\340A\001\032\'\n" - + "\013Placeholder\022\n\n\002id\030\001 \001(\t\022\014\n\004name\030\002 \001(\t:w" - + "\352At\n#dialogflow.googleapis.com/Generator" - + "\022Mprojects/{project}/locations/{location" - + "}/agents/{agent}/generators/{generator}\"" - + "\033\n\006Phrase\022\021\n\004text\030\001 \001(\tB\003\340A\002\"\222\001\n\025ListGen" - + "eratorsRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372A%\022#" - + "dialogflow.googleapis.com/Generator\022\025\n\rl" - + "anguage_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" - + "\npage_token\030\004 \001(\t\"t\n\026ListGeneratorsRespo" - + "nse\022A\n\ngenerators\030\001 \003(\0132-.google.cloud.d" - + "ialogflow.cx.v3beta1.Generator\022\027\n\017next_p" - + "age_token\030\002 \001(\t\"g\n\023GetGeneratorRequest\0229" - + "\n\004name\030\001 \001(\tB+\340A\002\372A%\n#dialogflow.googlea" - + "pis.com/Generator\022\025\n\rlanguage_code\030\002 \001(\t" - + "\"\263\001\n\026CreateGeneratorRequest\022;\n\006parent\030\001 " - + "\001(\tB+\340A\002\372A%\022#dialogflow.googleapis.com/G" - + "enerator\022E\n\tgenerator\030\002 \001(\0132-.google.clo" - + "ud.dialogflow.cx.v3beta1.GeneratorB\003\340A\002\022" - + "\025\n\rlanguage_code\030\003 \001(\t\"\247\001\n\026UpdateGenerat" - + "orRequest\022E\n\tgenerator\030\001 \001(\0132-.google.cl" - + "oud.dialogflow.cx.v3beta1.GeneratorB\003\340A\002" - + "\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013update_mask\030\003" - + " \001(\0132\032.google.protobuf.FieldMask\"b\n\026Dele" - + "teGeneratorRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%" - + "\n#dialogflow.googleapis.com/Generator\022\r\n" - + "\005force\030\002 \001(\0102\257\t\n\nGenerators\022\326\001\n\016ListGene" - + "rators\0229.google.cloud.dialogflow.cx.v3be" - + "ta1.ListGeneratorsRequest\032:.google.cloud" - + ".dialogflow.cx.v3beta1.ListGeneratorsRes" - + "ponse\"M\332A\006parent\202\323\344\223\002>\022\022*\022\022* + * The request message for + * [Examples.GetExample][google.cloud.dialogflow.cx.v3beta1.Examples.GetExample]. + *
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExampleRequest} + */ +public final class GetExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) + GetExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetExampleRequest.newBuilder() to construct. + private GetExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExampleRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Examples.GetExample][google.cloud.dialogflow.cx.v3beta1.Examples.GetExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the example.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExampleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExampleRequestOrBuilder.java new file mode 100644 index 000000000000..8c7dd54afc66 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetExampleRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the example.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/examples/<Example ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequest.java new file mode 100644 index 000000000000..67af544eecb0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest} + */ +public final class GetPlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) + GetPlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPlaybookRequest.newBuilder() to construct. + private GetPlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPlaybookRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPlaybookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..c0fe22ec09d8 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetPlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequest.java new file mode 100644 index 000000000000..d7b661a5b957 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybookVersion].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest} + */ +public final class GetPlaybookVersionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) + GetPlaybookVersionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPlaybookVersionRequest.newBuilder() to construct. + private GetPlaybookVersionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPlaybookVersionRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPlaybookVersionRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybookVersion].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPlaybookVersionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequestOrBuilder.java new file mode 100644 index 000000000000..ce99b114e130 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetPlaybookVersionRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetPlaybookVersionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequest.java new file mode 100644 index 000000000000..6126998c0bb1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequest.java @@ -0,0 +1,656 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.GetTool][google.cloud.dialogflow.cx.v3beta1.Tools.GetTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetToolRequest} + */ +public final class GetToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.GetToolRequest) + GetToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetToolRequest.newBuilder() to construct. + private GetToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetToolRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.GetTool][google.cloud.dialogflow.cx.v3beta1.Tools.GetTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.GetToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.GetToolRequest) + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.GetToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.GetToolRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetToolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequestOrBuilder.java new file mode 100644 index 000000000000..72fced44ab3a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/GetToolRequestOrBuilder.java @@ -0,0 +1,59 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface GetToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.GetToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadata.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadata.java new file mode 100644 index 000000000000..f31d59911b02 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadata.java @@ -0,0 +1,443 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Metadata returned for the
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes]
+ * long running operation.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata} + */ +public final class ImportEntityTypesMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) + ImportEntityTypesMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesMetadata.newBuilder() to construct. + private ImportEntityTypesMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata returned for the
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes]
+   * long running operation.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadataOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadataOrBuilder.java new file mode 100644 index 000000000000..fc9381c50ce0 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesMetadataOrBuilder.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportEntityTypesMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata) + com.google.protobuf.MessageOrBuilder {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequest.java new file mode 100644 index 000000000000..552701416756 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequest.java @@ -0,0 +1,2002 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest} + */ +public final class ImportEntityTypesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) + ImportEntityTypesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesRequest.newBuilder() to construct. + private ImportEntityTypesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesRequest() { + parent_ = ""; + mergeOption_ = 0; + targetEntityType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.Builder.class); + } + + /** + * + * + *
+   * Merge option when display name conflicts exist during import.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption} + */ + public enum MergeOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified. If used, system uses REPORT_CONFLICT as default.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + MERGE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Replace the original entity type in the agent with the new entity type
+     * when display name conflicts exist.
+     * 
+ * + * REPLACE = 1; + */ + REPLACE(1), + /** + * + * + *
+     * Merge the original entity type with the new entity type when display name
+     * conflicts exist.
+     * 
+ * + * MERGE = 2; + */ + MERGE(2), + /** + * + * + *
+     * Create new entity types with new display names to differentiate them from
+     * the existing entity types when display name conflicts exist.
+     * 
+ * + * RENAME = 3; + */ + RENAME(3), + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import entity types.
+     * 
+ * + * REPORT_CONFLICT = 4; + */ + REPORT_CONFLICT(4), + /** + * + * + *
+     * Keep the original entity type and discard the conflicting new entity type
+     * when display name conflicts exist.
+     * 
+ * + * KEEP = 5; + */ + KEEP(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified. If used, system uses REPORT_CONFLICT as default.
+     * 
+ * + * MERGE_OPTION_UNSPECIFIED = 0; + */ + public static final int MERGE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Replace the original entity type in the agent with the new entity type
+     * when display name conflicts exist.
+     * 
+ * + * REPLACE = 1; + */ + public static final int REPLACE_VALUE = 1; + /** + * + * + *
+     * Merge the original entity type with the new entity type when display name
+     * conflicts exist.
+     * 
+ * + * MERGE = 2; + */ + public static final int MERGE_VALUE = 2; + /** + * + * + *
+     * Create new entity types with new display names to differentiate them from
+     * the existing entity types when display name conflicts exist.
+     * 
+ * + * RENAME = 3; + */ + public static final int RENAME_VALUE = 3; + /** + * + * + *
+     * Report conflict information if display names conflict is detected.
+     * Otherwise, import entity types.
+     * 
+ * + * REPORT_CONFLICT = 4; + */ + public static final int REPORT_CONFLICT_VALUE = 4; + /** + * + * + *
+     * Keep the original entity type and discard the conflicting new entity type
+     * when display name conflicts exist.
+     * 
+ * + * KEEP = 5; + */ + public static final int KEEP_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MergeOption valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static MergeOption forNumber(int value) { + switch (value) { + case 0: + return MERGE_OPTION_UNSPECIFIED; + case 1: + return REPLACE; + case 2: + return MERGE; + case 3: + return RENAME; + case 4: + return REPORT_CONFLICT; + case 5: + return KEEP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MergeOption findValueByNumber(int number) { + return MergeOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MergeOption[] VALUES = values(); + + public static MergeOption valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MergeOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption) + } + + private int entityTypesCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object entityTypes_; + + public enum EntityTypesCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ENTITY_TYPES_URI(2), + ENTITY_TYPES_CONTENT(3), + ENTITYTYPES_NOT_SET(0); + private final int value; + + private EntityTypesCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EntityTypesCase valueOf(int value) { + return forNumber(value); + } + + public static EntityTypesCase forNumber(int value) { + switch (value) { + case 2: + return ENTITY_TYPES_URI; + case 3: + return ENTITY_TYPES_CONTENT; + case 0: + return ENTITYTYPES_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public EntityTypesCase getEntityTypesCase() { + return EntityTypesCase.forNumber(entityTypesCase_); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_URI_FIELD_NUMBER = 2; + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + public boolean hasEntityTypesUri() { + return entityTypesCase_ == 2; + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypesCase_ == 2) { + entityTypes_ = s; + } + return s; + } + } + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entityTypesCase_ == 2) { + entityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITY_TYPES_CONTENT_FIELD_NUMBER = 3; + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return entityTypesCase_ == 3; + } + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getEntityTypesContent() { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder + getEntityTypesContentOrBuilder() { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + + public static final int MERGE_OPTION_FIELD_NUMBER = 4; + private int mergeOption_ = 0; + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption + getMergeOption() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption.UNRECOGNIZED + : result; + } + + public static final int TARGET_ENTITY_TYPE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object targetEntityType_ = ""; + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + @java.lang.Override + public java.lang.String getTargetEntityType() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetEntityType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetEntityTypeBytes() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetEntityType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entityTypesCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityTypes_); + } + if (entityTypesCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, mergeOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetEntityType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, targetEntityType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entityTypesCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityTypes_); + } + if (entityTypesCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_); + } + if (mergeOption_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption + .MERGE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mergeOption_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetEntityType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, targetEntityType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (mergeOption_ != other.mergeOption_) return false; + if (!getTargetEntityType().equals(other.getTargetEntityType())) return false; + if (!getEntityTypesCase().equals(other.getEntityTypesCase())) return false; + switch (entityTypesCase_) { + case 2: + if (!getEntityTypesUri().equals(other.getEntityTypesUri())) return false; + break; + case 3: + if (!getEntityTypesContent().equals(other.getEntityTypesContent())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + MERGE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + mergeOption_; + hash = (37 * hash) + TARGET_ENTITY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetEntityType().hashCode(); + switch (entityTypesCase_) { + case 2: + hash = (37 * hash) + ENTITY_TYPES_URI_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesUri().hashCode(); + break; + case 3: + hash = (37 * hash) + ENTITY_TYPES_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesContent().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + if (entityTypesContentBuilder_ != null) { + entityTypesContentBuilder_.clear(); + } + mergeOption_ = 0; + targetEntityType_ = ""; + entityTypesCase_ = 0; + entityTypes_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.mergeOption_ = mergeOption_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.targetEntityType_ = targetEntityType_; + } + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest result) { + result.entityTypesCase_ = entityTypesCase_; + result.entityTypes_ = this.entityTypes_; + if (entityTypesCase_ == 3 && entityTypesContentBuilder_ != null) { + result.entityTypes_ = entityTypesContentBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.mergeOption_ != 0) { + setMergeOptionValue(other.getMergeOptionValue()); + } + if (!other.getTargetEntityType().isEmpty()) { + targetEntityType_ = other.targetEntityType_; + bitField0_ |= 0x00000010; + onChanged(); + } + switch (other.getEntityTypesCase()) { + case ENTITY_TYPES_URI: + { + entityTypesCase_ = 2; + entityTypes_ = other.entityTypes_; + onChanged(); + break; + } + case ENTITY_TYPES_CONTENT: + { + mergeEntityTypesContent(other.getEntityTypesContent()); + break; + } + case ENTITYTYPES_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + entityTypesCase_ = 2; + entityTypes_ = s; + break; + } // case 18 + case 26: + { + input.readMessage( + getEntityTypesContentFieldBuilder().getBuilder(), extensionRegistry); + entityTypesCase_ = 3; + break; + } // case 26 + case 32: + { + mergeOption_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: + { + targetEntityType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int entityTypesCase_ = 0; + private java.lang.Object entityTypes_; + + public EntityTypesCase getEntityTypesCase() { + return EntityTypesCase.forNumber(entityTypesCase_); + } + + public Builder clearEntityTypes() { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to import the entity types into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + @java.lang.Override + public boolean hasEntityTypesUri() { + return entityTypesCase_ == 2; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + @java.lang.Override + public java.lang.String getEntityTypesUri() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (entityTypesCase_ == 2) { + entityTypes_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntityTypesUriBytes() { + java.lang.Object ref = ""; + if (entityTypesCase_ == 2) { + ref = entityTypes_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (entityTypesCase_ == 2) { + entityTypes_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @param value The entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + entityTypesCase_ = 2; + entityTypes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypesUri() { + if (entityTypesCase_ == 2) { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+     * to import entity types from. The format of this URI must be
+     * `gs://<bucket-name>/<object-name>`.
+     *
+     * Dialogflow performs a read operation for the Cloud Storage object
+     * on the caller's behalf, so your request authentication must
+     * have read permissions for the object. For more information, see
+     * [Dialogflow access
+     * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+     * 
+ * + * string entity_types_uri = 2; + * + * @param value The bytes for entityTypesUri to set. + * @return This builder for chaining. + */ + public Builder setEntityTypesUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + entityTypesCase_ = 2; + entityTypes_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder> + entityTypesContentBuilder_; + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + @java.lang.Override + public boolean hasEntityTypesContent() { + return entityTypesCase_ == 3; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource getEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } else { + if (entityTypesCase_ == 3) { + return entityTypesContentBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource value) { + if (entityTypesContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entityTypes_ = value; + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(value); + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + public Builder setEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder builderForValue) { + if (entityTypesContentBuilder_ == null) { + entityTypes_ = builderForValue.build(); + onChanged(); + } else { + entityTypesContentBuilder_.setMessage(builderForValue.build()); + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + public Builder mergeEntityTypesContent( + com.google.cloud.dialogflow.cx.v3beta1.InlineSource value) { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3 + && entityTypes_ + != com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance()) { + entityTypes_ = + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_) + .mergeFrom(value) + .buildPartial(); + } else { + entityTypes_ = value; + } + onChanged(); + } else { + if (entityTypesCase_ == 3) { + entityTypesContentBuilder_.mergeFrom(value); + } else { + entityTypesContentBuilder_.setMessage(value); + } + } + entityTypesCase_ = 3; + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + public Builder clearEntityTypesContent() { + if (entityTypesContentBuilder_ == null) { + if (entityTypesCase_ == 3) { + entityTypesCase_ = 0; + entityTypes_ = null; + onChanged(); + } + } else { + if (entityTypesCase_ == 3) { + entityTypesCase_ = 0; + entityTypes_ = null; + } + entityTypesContentBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + public com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder + getEntityTypesContentBuilder() { + return getEntityTypesContentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder + getEntityTypesContentOrBuilder() { + if ((entityTypesCase_ == 3) && (entityTypesContentBuilder_ != null)) { + return entityTypesContentBuilder_.getMessageOrBuilder(); + } else { + if (entityTypesCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_; + } + return com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + } + /** + * + * + *
+     * Uncompressed byte content of entity types.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder> + getEntityTypesContentFieldBuilder() { + if (entityTypesContentBuilder_ == null) { + if (!(entityTypesCase_ == 3)) { + entityTypes_ = com.google.cloud.dialogflow.cx.v3beta1.InlineSource.getDefaultInstance(); + } + entityTypesContentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.InlineSource, + com.google.cloud.dialogflow.cx.v3beta1.InlineSource.Builder, + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.InlineSource) entityTypes_, + getParentForChildren(), + isClean()); + entityTypes_ = null; + } + entityTypesCase_ = 3; + onChanged(); + return entityTypesContentBuilder_; + } + + private int mergeOption_ = 0; + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + @java.lang.Override + public int getMergeOptionValue() { + return mergeOption_; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOptionValue(int value) { + mergeOption_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption + getMergeOption() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption result = + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption.forNumber( + mergeOption_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The mergeOption to set. + * @return This builder for chaining. + */ + public Builder setMergeOption( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + mergeOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Merge option for importing entity types.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMergeOption() { + bitField0_ = (bitField0_ & ~0x00000008); + mergeOption_ = 0; + onChanged(); + return this; + } + + private java.lang.Object targetEntityType_ = ""; + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + public java.lang.String getTargetEntityType() { + java.lang.Object ref = targetEntityType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetEntityType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + public com.google.protobuf.ByteString getTargetEntityTypeBytes() { + java.lang.Object ref = targetEntityType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetEntityType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The targetEntityType to set. + * @return This builder for chaining. + */ + public Builder setTargetEntityType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + targetEntityType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTargetEntityType() { + targetEntityType_ = getDefaultInstance().getTargetEntityType(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The target entity type to import into.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * If set, there should be only one entity type included in
+     * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+     * of which the type should match the type of the target entity type. All
+     * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+     * imported entity type will be added to the target entity type.
+     * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for targetEntityType to set. + * @return This builder for chaining. + */ + public Builder setTargetEntityTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + targetEntityType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequestOrBuilder.java new file mode 100644 index 000000000000..3c4df8b7ea6b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesRequestOrBuilder.java @@ -0,0 +1,228 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportEntityTypesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to import the entity types into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return Whether the entityTypesUri field is set. + */ + boolean hasEntityTypesUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The entityTypesUri. + */ + java.lang.String getEntityTypesUri(); + /** + * + * + *
+   * The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI
+   * to import entity types from. The format of this URI must be
+   * `gs://<bucket-name>/<object-name>`.
+   *
+   * Dialogflow performs a read operation for the Cloud Storage object
+   * on the caller's behalf, so your request authentication must
+   * have read permissions for the object. For more information, see
+   * [Dialogflow access
+   * control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
+   * 
+ * + * string entity_types_uri = 2; + * + * @return The bytes for entityTypesUri. + */ + com.google.protobuf.ByteString getEntityTypesUriBytes(); + + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return Whether the entityTypesContent field is set. + */ + boolean hasEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + * + * @return The entityTypesContent. + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineSource getEntityTypesContent(); + /** + * + * + *
+   * Uncompressed byte content of entity types.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.InlineSource entity_types_content = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.InlineSourceOrBuilder getEntityTypesContentOrBuilder(); + + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for mergeOption. + */ + int getMergeOptionValue(); + /** + * + * + *
+   * Required. Merge option for importing entity types.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption merge_option = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The mergeOption. + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.MergeOption getMergeOption(); + + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The targetEntityType. + */ + java.lang.String getTargetEntityType(); + /** + * + * + *
+   * Optional. The target entity type to import into.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * If set, there should be only one entity type included in
+   * [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types],
+   * of which the type should match the type of the target entity type. All
+   * [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the
+   * imported entity type will be added to the target entity type.
+   * 
+ * + * + * string target_entity_type = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for targetEntityType. + */ + com.google.protobuf.ByteString getTargetEntityTypeBytes(); + + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.EntityTypesCase + getEntityTypesCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponse.java new file mode 100644 index 000000000000..7aaf81af8b9d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponse.java @@ -0,0 +1,2271 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse} + */ +public final class ImportEntityTypesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) + ImportEntityTypesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportEntityTypesResponse.newBuilder() to construct. + private ImportEntityTypesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportEntityTypesResponse() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImportEntityTypesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.Builder.class); + } + + public interface ConflictingResourcesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + java.util.List getEntityTypeDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + int getEntityTypeDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + java.lang.String getEntityTypeDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index); + + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + java.util.List getEntityDisplayNamesList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + int getEntityDisplayNamesCount(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + java.lang.String getEntityDisplayNames(int index); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index); + } + /** + * + * + *
+   * Conflicting resources detected during the import process. Only filled when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the
+   * request and there are conflicts in the display names.
+   * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources} + */ + public static final class ConflictingResources extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + ConflictingResourcesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConflictingResources.newBuilder() to construct. + private ConflictingResources(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConflictingResources() { + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConflictingResources(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .Builder.class); + } + + public static final int ENTITY_TYPE_DISPLAY_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypeDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityTypeDisplayNamesList() { + return entityTypeDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + public int getEntityTypeDisplayNamesCount() { + return entityTypeDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + public java.lang.String getEntityTypeDisplayNames(int index) { + return entityTypeDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting entity types.
+     * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index) { + return entityTypeDisplayNames_.getByteString(index); + } + + public static final int ENTITY_DISPLAY_NAMES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + return entityDisplayNames_; + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+     * Display names of conflicting entities.
+     * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entityTypeDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, entityTypeDisplayNames_.getRaw(i)); + } + for (int i = 0; i < entityDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, entityDisplayNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < entityTypeDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypeDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypeDisplayNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < entityDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(entityDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityDisplayNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + obj; + + if (!getEntityTypeDisplayNamesList().equals(other.getEntityTypeDisplayNamesList())) + return false; + if (!getEntityDisplayNamesList().equals(other.getEntityDisplayNamesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntityTypeDisplayNamesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPE_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypeDisplayNamesList().hashCode(); + } + if (getEntityDisplayNamesCount() > 0) { + hash = (37 * hash) + ENTITY_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getEntityDisplayNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Conflicting resources detected during the import process. Only filled when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the
+     * request and there are conflicts in the display names.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_ConflictingResources_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + entityTypeDisplayNames_.makeImmutable(); + result.entityTypeDisplayNames_ = entityTypeDisplayNames_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + entityDisplayNames_.makeImmutable(); + result.entityDisplayNames_ = entityDisplayNames_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance()) return this; + if (!other.entityTypeDisplayNames_.isEmpty()) { + if (entityTypeDisplayNames_.isEmpty()) { + entityTypeDisplayNames_ = other.entityTypeDisplayNames_; + bitField0_ |= 0x00000001; + } else { + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.addAll(other.entityTypeDisplayNames_); + } + onChanged(); + } + if (!other.entityDisplayNames_.isEmpty()) { + if (entityDisplayNames_.isEmpty()) { + entityDisplayNames_ = other.entityDisplayNames_; + bitField0_ |= 0x00000002; + } else { + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.addAll(other.entityDisplayNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList entityTypeDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypeDisplayNamesIsMutable() { + if (!entityTypeDisplayNames_.isModifiable()) { + entityTypeDisplayNames_ = + new com.google.protobuf.LazyStringArrayList(entityTypeDisplayNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return A list containing the entityTypeDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityTypeDisplayNamesList() { + entityTypeDisplayNames_.makeImmutable(); + return entityTypeDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return The count of entityTypeDisplayNames. + */ + public int getEntityTypeDisplayNamesCount() { + return entityTypeDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the element to return. + * @return The entityTypeDisplayNames at the given index. + */ + public java.lang.String getEntityTypeDisplayNames(int index) { + return entityTypeDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the entityTypeDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityTypeDisplayNamesBytes(int index) { + return entityTypeDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param index The index to set the value at. + * @param value The entityTypeDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setEntityTypeDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param value The entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityTypeDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param values The entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypeDisplayNames(java.lang.Iterable values) { + ensureEntityTypeDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypeDisplayNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearEntityTypeDisplayNames() { + entityTypeDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entity types.
+       * 
+ * + * repeated string entity_type_display_names = 1; + * + * @param value The bytes of the entityTypeDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityTypeDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypeDisplayNamesIsMutable(); + entityTypeDisplayNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList entityDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityDisplayNamesIsMutable() { + if (!entityDisplayNames_.isModifiable()) { + entityDisplayNames_ = new com.google.protobuf.LazyStringArrayList(entityDisplayNames_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return A list containing the entityDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getEntityDisplayNamesList() { + entityDisplayNames_.makeImmutable(); + return entityDisplayNames_; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return The count of entityDisplayNames. + */ + public int getEntityDisplayNamesCount() { + return entityDisplayNames_.size(); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the element to return. + * @return The entityDisplayNames at the given index. + */ + public java.lang.String getEntityDisplayNames(int index) { + return entityDisplayNames_.get(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index of the value to return. + * @return The bytes of the entityDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getEntityDisplayNamesBytes(int index) { + return entityDisplayNames_.getByteString(index); + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param index The index to set the value at. + * @param value The entityDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setEntityDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param values The entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllEntityDisplayNames(java.lang.Iterable values) { + ensureEntityDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityDisplayNames_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @return This builder for chaining. + */ + public Builder clearEntityDisplayNames() { + entityDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Display names of conflicting entities.
+       * 
+ * + * repeated string entity_display_names = 2; + * + * @param value The bytes of the entityDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addEntityDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityDisplayNamesIsMutable(); + entityDisplayNames_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConflictingResources parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ENTITY_TYPES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + return entityTypes_; + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + + public static final int CONFLICTING_RESOURCES_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + conflictingResources_; + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + @java.lang.Override + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + getConflictingResources() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < entityTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityTypes_.getRaw(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getConflictingResources()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < entityTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(entityTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getEntityTypesList().size(); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConflictingResources()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) obj; + + if (!getEntityTypesList().equals(other.getEntityTypesList())) return false; + if (hasConflictingResources() != other.hasConflictingResources()) return false; + if (hasConflictingResources()) { + if (!getConflictingResources().equals(other.getConflictingResources())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEntityTypesCount() > 0) { + hash = (37 * hash) + ENTITY_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getEntityTypesList().hashCode(); + } + if (hasConflictingResources()) { + hash = (37 * hash) + CONFLICTING_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getConflictingResources().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConflictingResourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.EntityTypeProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ImportEntityTypesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + entityTypes_.makeImmutable(); + result.entityTypes_ = entityTypes_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.conflictingResources_ = + conflictingResourcesBuilder_ == null + ? conflictingResources_ + : conflictingResourcesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.getDefaultInstance()) + return this; + if (!other.entityTypes_.isEmpty()) { + if (entityTypes_.isEmpty()) { + entityTypes_ = other.entityTypes_; + bitField0_ |= 0x00000001; + } else { + ensureEntityTypesIsMutable(); + entityTypes_.addAll(other.entityTypes_); + } + onChanged(); + } + if (other.hasConflictingResources()) { + mergeConflictingResources(other.getConflictingResources()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEntityTypesIsMutable(); + entityTypes_.add(s); + break; + } // case 10 + case 18: + { + input.readMessage( + getConflictingResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList entityTypes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureEntityTypesIsMutable() { + if (!entityTypes_.isModifiable()) { + entityTypes_ = new com.google.protobuf.LazyStringArrayList(entityTypes_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + public com.google.protobuf.ProtocolStringList getEntityTypesList() { + entityTypes_.makeImmutable(); + return entityTypes_; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + public int getEntityTypesCount() { + return entityTypes_.size(); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + public java.lang.String getEntityTypes(int index) { + return entityTypes_.get(index); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + public com.google.protobuf.ByteString getEntityTypesBytes(int index) { + return entityTypes_.getByteString(index); + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index to set the value at. + * @param value The entityTypes to set. + * @return This builder for chaining. + */ + public Builder setEntityTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param values The entityTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEntityTypes(java.lang.Iterable values) { + ensureEntityTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entityTypes_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearEntityTypes() { + entityTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the imported entity types.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/entity_types/<EntityType ID>`.
+     * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes of the entityTypes to add. + * @return This builder for chaining. + */ + public Builder addEntityTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureEntityTypesIsMutable(); + entityTypes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + conflictingResources_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder> + conflictingResourcesBuilder_; + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + public boolean hasConflictingResources() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + getConflictingResources() { + if (conflictingResourcesBuilder_ == null) { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } else { + return conflictingResourcesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + value) { + if (conflictingResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conflictingResources_ = value; + } else { + conflictingResourcesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder setConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .Builder + builderForValue) { + if (conflictingResourcesBuilder_ == null) { + conflictingResources_ = builderForValue.build(); + } else { + conflictingResourcesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder mergeConflictingResources( + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + value) { + if (conflictingResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && conflictingResources_ != null + && conflictingResources_ + != com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources.getDefaultInstance()) { + getConflictingResourcesBuilder().mergeFrom(value); + } else { + conflictingResources_ = value; + } + } else { + conflictingResourcesBuilder_.mergeFrom(value); + } + if (conflictingResources_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public Builder clearConflictingResources() { + bitField0_ = (bitField0_ & ~0x00000002); + conflictingResources_ = null; + if (conflictingResourcesBuilder_ != null) { + conflictingResourcesBuilder_.dispose(); + conflictingResourcesBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .Builder + getConflictingResourcesBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConflictingResourcesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder() { + if (conflictingResourcesBuilder_ != null) { + return conflictingResourcesBuilder_.getMessageOrBuilder(); + } else { + return conflictingResources_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .getDefaultInstance() + : conflictingResources_; + } + } + /** + * + * + *
+     * Info which resources have conflicts when
+     * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+     * is set in ImportEntityTypesRequest.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder> + getConflictingResourcesFieldBuilder() { + if (conflictingResourcesBuilder_ == null) { + conflictingResourcesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResources.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + .ConflictingResourcesOrBuilder>( + getConflictingResources(), getParentForChildren(), isClean()); + conflictingResources_ = null; + } + return conflictingResourcesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportEntityTypesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponseOrBuilder.java new file mode 100644 index 000000000000..c946b7f6a184 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ImportEntityTypesResponseOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/entity_type.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ImportEntityTypesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return A list containing the entityTypes. + */ + java.util.List getEntityTypesList(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @return The count of entityTypes. + */ + int getEntityTypesCount(); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the element to return. + * @return The entityTypes at the given index. + */ + java.lang.String getEntityTypes(int index); + /** + * + * + *
+   * The unique identifier of the imported entity types.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/entity_types/<EntityType ID>`.
+   * 
+ * + * repeated string entity_types = 1 [(.google.api.resource_reference) = { ... } + * + * @param index The index of the value to return. + * @return The bytes of the entityTypes at the given index. + */ + com.google.protobuf.ByteString getEntityTypesBytes(int index); + + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return Whether the conflictingResources field is set. + */ + boolean hasConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + * + * @return The conflictingResources. + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources + getConflictingResources(); + /** + * + * + *
+   * Info which resources have conflicts when
+   * [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option
+   * is set in ImportEntityTypesRequest.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResources conflicting_resources = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse.ConflictingResourcesOrBuilder + getConflictingResourcesOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java index 78b2dabbed3b..c4df67d0c9ea 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfig.java @@ -245,28 +245,10 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) { * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -289,28 +271,10 @@ public java.lang.String getModel() { * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -444,6 +408,27 @@ public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder getBargeInC : bargeInConfig_; } + public static final int OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER = 26; + private boolean optOutConformerModelMigration_ = false; + /** + * + * + *
+   * If `true`, the request will opt out for STT conformer model migration.
+   * This field will be deprecated once force migration takes place in June
+   * 2024. Please refer to [Dialogflow CX Speech model
+   * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+   * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + @java.lang.Override + public boolean getOptOutConformerModelMigration() { + return optOutConformerModelMigration_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -487,6 +472,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(15, getBargeInConfig()); } + if (optOutConformerModelMigration_ != false) { + output.writeBool(26, optOutConformerModelMigration_); + } getUnknownFields().writeTo(output); } @@ -530,6 +518,10 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getBargeInConfig()); } + if (optOutConformerModelMigration_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(26, optOutConformerModelMigration_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -557,6 +549,8 @@ public boolean equals(final java.lang.Object obj) { if (hasBargeInConfig()) { if (!getBargeInConfig().equals(other.getBargeInConfig())) return false; } + if (getOptOutConformerModelMigration() != other.getOptOutConformerModelMigration()) + return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,6 +582,9 @@ public int hashCode() { hash = (37 * hash) + BARGE_IN_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getBargeInConfig().hashCode(); } + hash = (37 * hash) + OPT_OUT_CONFORMER_MODEL_MIGRATION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptOutConformerModelMigration()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -749,6 +746,7 @@ public Builder clear() { bargeInConfigBuilder_.dispose(); bargeInConfigBuilder_ = null; } + optOutConformerModelMigration_ = false; return this; } @@ -813,6 +811,9 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.InputAudioConf bargeInConfigBuilder_ == null ? bargeInConfig_ : bargeInConfigBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.optOutConformerModelMigration_ = optOutConformerModelMigration_; + } result.bitField0_ |= to_bitField0_; } @@ -895,6 +896,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.InputAudioConfig if (other.hasBargeInConfig()) { mergeBargeInConfig(other.getBargeInConfig()); } + if (other.getOptOutConformerModelMigration() != false) { + setOptOutConformerModelMigration(other.getOptOutConformerModelMigration()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -970,6 +974,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000080; break; } // case 122 + case 208: + { + optOutConformerModelMigration_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 208 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1448,28 +1458,10 @@ public Builder addPhraseHintsBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1491,28 +1483,10 @@ public java.lang.String getModel() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1534,28 +1508,10 @@ public com.google.protobuf.ByteString getModelBytes() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1576,28 +1532,10 @@ public Builder setModel(java.lang.String value) { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -1614,28 +1552,10 @@ public Builder clearModel() { * * *
-     * Optional. Which Speech model to select for the given request. Select the
-     * model best suited to your domain to get best results. If a model is not
-     * explicitly specified, then Dialogflow auto-selects a model based on other
-     * parameters in the InputAudioConfig and Agent settings.
-     * If enhanced speech model is enabled for the agent and an enhanced
-     * version of the specified model for the language does not exist, then the
-     * speech is recognized using the standard version of the specified model.
-     * Refer to
-     * [Cloud Speech API
-     * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-     * for more details.
-     * If you specify a model, the following models typically have the best
-     * performance:
-     *
-     * - phone_call (best for Agent Assist and telephony)
-     * - latest_short (best for Dialogflow non-telephony)
-     * - command_and_search
-     *
-     * Leave this field unspecified to use
-     * [Agent Speech
-     * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-     * for model selection.
+     * Optional. Which Speech model to select for the given request.
+     * For more information, see
+     * [Speech
+     * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
      * 
* * string model = 7; @@ -2014,6 +1934,68 @@ public com.google.cloud.dialogflow.cx.v3beta1.BargeInConfig.Builder getBargeInCo return bargeInConfigBuilder_; } + private boolean optOutConformerModelMigration_; + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + @java.lang.Override + public boolean getOptOutConformerModelMigration() { + return optOutConformerModelMigration_; + } + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @param value The optOutConformerModelMigration to set. + * @return This builder for chaining. + */ + public Builder setOptOutConformerModelMigration(boolean value) { + + optOutConformerModelMigration_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * If `true`, the request will opt out for STT conformer model migration.
+     * This field will be deprecated once force migration takes place in June
+     * 2024. Please refer to [Dialogflow CX Speech model
+     * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+     * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return This builder for chaining. + */ + public Builder clearOptOutConformerModelMigration() { + bitField0_ = (bitField0_ & ~0x00000100); + optOutConformerModelMigration_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java index ae8fba6fae83..3feaa0ebf2a9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/InputAudioConfigOrBuilder.java @@ -163,28 +163,10 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -196,28 +178,10 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Which Speech model to select for the given request. Select the
-   * model best suited to your domain to get best results. If a model is not
-   * explicitly specified, then Dialogflow auto-selects a model based on other
-   * parameters in the InputAudioConfig and Agent settings.
-   * If enhanced speech model is enabled for the agent and an enhanced
-   * version of the specified model for the language does not exist, then the
-   * speech is recognized using the standard version of the specified model.
-   * Refer to
-   * [Cloud Speech API
-   * documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model)
-   * for more details.
-   * If you specify a model, the following models typically have the best
-   * performance:
-   *
-   * - phone_call (best for Agent Assist and telephony)
-   * - latest_short (best for Dialogflow non-telephony)
-   * - command_and_search
-   *
-   * Leave this field unspecified to use
-   * [Agent Speech
-   * settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech)
-   * for model selection.
+   * Optional. Which Speech model to select for the given request.
+   * For more information, see
+   * [Speech
+   * models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
    * 
* * string model = 7; @@ -307,4 +271,20 @@ public interface InputAudioConfigOrBuilder * .google.cloud.dialogflow.cx.v3beta1.BargeInConfig barge_in_config = 15; */ com.google.cloud.dialogflow.cx.v3beta1.BargeInConfigOrBuilder getBargeInConfigOrBuilder(); + + /** + * + * + *
+   * If `true`, the request will opt out for STT conformer model migration.
+   * This field will be deprecated once force migration takes place in June
+   * 2024. Please refer to [Dialogflow CX Speech model
+   * migration](https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration).
+   * 
+ * + * bool opt_out_conformer_model_migration = 26; + * + * @return The optOutConformerModelMigration. + */ + boolean getOptOutConformerModelMigration(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequest.java new file mode 100644 index 000000000000..509c5d846f89 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequest.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest} + */ +public final class ListExamplesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) + ListExamplesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExamplesRequest.newBuilder() to construct. + private ListExamplesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesRequest() { + parent_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExamplesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + languageCode_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.languageCode_ = languageCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to list the examples from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+     * returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The language to list examples for.
+     * If not specified, the agent's default language is used.
+     * Note: languages must be enabled in the agent before they can be used.
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + languageCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequestOrBuilder.java new file mode 100644 index 000000000000..20ab636f38a3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListExamplesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The playbook to list the examples from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The [next_page_token][ListExampleResponse.next_page_token] value
+   * returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The language to list examples for.
+   * If not specified, the agent's default language is used.
+   * Note: languages must be enabled in the agent before they can be used.
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponse.java new file mode 100644 index 000000000000..705a52c6b071 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponse.java @@ -0,0 +1,1199 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse} + */ +public final class ListExamplesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) + ListExamplesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExamplesResponse.newBuilder() to construct. + private ListExamplesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesResponse() { + examples_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListExamplesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.Builder.class); + } + + public static final int EXAMPLES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List examples_; + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + @java.lang.Override + public java.util.List getExamplesList() { + return examples_; + } + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + @java.lang.Override + public java.util.List + getExamplesOrBuilderList() { + return examples_; + } + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + @java.lang.Override + public int getExamplesCount() { + return examples_.size(); + } + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index) { + return examples_.get(index); + } + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + return examples_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < examples_.size(); i++) { + output.writeMessage(1, examples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < examples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, examples_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) obj; + + if (!getExamplesList().equals(other.getExamplesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + } else { + examples_ = null; + examplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse result) { + if (examplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.examples_ = examples_; + } else { + result.examples_ = examplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse.getDefaultInstance()) + return this; + if (examplesBuilder_ == null) { + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + onChanged(); + } + } else { + if (!other.examples_.isEmpty()) { + if (examplesBuilder_.isEmpty()) { + examplesBuilder_.dispose(); + examplesBuilder_ = null; + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + examplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExamplesFieldBuilder() + : null; + } else { + examplesBuilder_.addAllMessages(other.examples_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Example m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Example.parser(), extensionRegistry); + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(m); + } else { + examplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List examples_ = + java.util.Collections.emptyList(); + + private void ensureExamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + examples_ = + new java.util.ArrayList(examples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + examplesBuilder_; + + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public java.util.List getExamplesList() { + if (examplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(examples_); + } else { + return examplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public int getExamplesCount() { + if (examplesBuilder_ == null) { + return examples_.size(); + } else { + return examplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder setExamples(int index, com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + onChanged(); + } else { + examplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder setExamples( + int index, com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.set(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + onChanged(); + } else { + examplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder addExamples(int index, com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(index, value); + onChanged(); + } else { + examplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder addExamples( + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder addExamples( + int index, com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder addAllExamples( + java.lang.Iterable values) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + onChanged(); + } else { + examplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder clearExamples() { + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + examplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public Builder removeExamples(int index) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.remove(index); + onChanged(); + } else { + examplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder getExamplesBuilder(int index) { + return getExamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public java.util.List + getExamplesOrBuilderList() { + if (examplesBuilder_ != null) { + return examplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(examples_); + } + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder addExamplesBuilder() { + return getExamplesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder addExamplesBuilder(int index) { + return getExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * The list of examples. There will be a maximum number of items returned
+     * based on the
+     * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+     * field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + public java.util.List + getExamplesBuilderList() { + return getExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + getExamplesFieldBuilder() { + if (examplesBuilder_ == null) { + examplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder>( + examples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + examples_ = null; + } + return examplesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponseOrBuilder.java new file mode 100644 index 000000000000..bd9c6f7564b4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListExamplesResponseOrBuilder.java @@ -0,0 +1,120 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListExamplesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + java.util.List getExamplesList(); + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index); + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + int getExamplesCount(); + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + java.util.List + getExamplesOrBuilderList(); + /** + * + * + *
+   * The list of examples. There will be a maximum number of items returned
+   * based on the
+   * [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size]
+   * field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequest.java new file mode 100644 index 000000000000..4138e2f8b7ec --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequest.java @@ -0,0 +1,946 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest} + */ +public final class ListPlaybookVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) + ListPlaybookVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPlaybookVersionsRequest.newBuilder() to construct. + private ListPlaybookVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybookVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybookVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to list versions for.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of items to return in a single page. By
+     * default 100 and at most 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybookVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequestOrBuilder.java new file mode 100644 index 000000000000..338eee0de3e7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListPlaybookVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The playbook to list versions for.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of items to return in a single page. By
+   * default 100 and at most 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponse.java new file mode 100644 index 000000000000..8a085b2d61ce --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponse.java @@ -0,0 +1,1204 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse} + */ +public final class ListPlaybookVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) + ListPlaybookVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPlaybookVersionsResponse.newBuilder() to construct. + private ListPlaybookVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybookVersionsResponse() { + playbookVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybookVersionsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.Builder.class); + } + + public static final int PLAYBOOK_VERSIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List playbookVersions_; + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getPlaybookVersionsList() { + return playbookVersions_; + } + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getPlaybookVersionsOrBuilderList() { + return playbookVersions_; + } + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + @java.lang.Override + public int getPlaybookVersionsCount() { + return playbookVersions_.size(); + } + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersions(int index) { + return playbookVersions_.get(index); + } + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder + getPlaybookVersionsOrBuilder(int index) { + return playbookVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < playbookVersions_.size(); i++) { + output.writeMessage(1, playbookVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < playbookVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, playbookVersions_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) obj; + + if (!getPlaybookVersionsList().equals(other.getPlaybookVersionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPlaybookVersionsCount() > 0) { + hash = (37 * hash) + PLAYBOOK_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookVersionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (playbookVersionsBuilder_ == null) { + playbookVersions_ = java.util.Collections.emptyList(); + } else { + playbookVersions_ = null; + playbookVersionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse result) { + if (playbookVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + playbookVersions_ = java.util.Collections.unmodifiableList(playbookVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.playbookVersions_ = playbookVersions_; + } else { + result.playbookVersions_ = playbookVersionsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + .getDefaultInstance()) return this; + if (playbookVersionsBuilder_ == null) { + if (!other.playbookVersions_.isEmpty()) { + if (playbookVersions_.isEmpty()) { + playbookVersions_ = other.playbookVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.addAll(other.playbookVersions_); + } + onChanged(); + } + } else { + if (!other.playbookVersions_.isEmpty()) { + if (playbookVersionsBuilder_.isEmpty()) { + playbookVersionsBuilder_.dispose(); + playbookVersionsBuilder_ = null; + playbookVersions_ = other.playbookVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + playbookVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlaybookVersionsFieldBuilder() + : null; + } else { + playbookVersionsBuilder_.addAllMessages(other.playbookVersions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.parser(), + extensionRegistry); + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(m); + } else { + playbookVersionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + playbookVersions_ = java.util.Collections.emptyList(); + + private void ensurePlaybookVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + playbookVersions_ = + new java.util.ArrayList( + playbookVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder> + playbookVersionsBuilder_; + + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public java.util.List + getPlaybookVersionsList() { + if (playbookVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(playbookVersions_); + } else { + return playbookVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public int getPlaybookVersionsCount() { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.size(); + } else { + return playbookVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersions(int index) { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.get(index); + } else { + return playbookVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder setPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.set(index, value); + onChanged(); + } else { + playbookVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder setPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder addPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(value); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder addPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion value) { + if (playbookVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(index, value); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder addPlaybookVersions( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder addPlaybookVersions( + int index, com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder builderForValue) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + playbookVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder addAllPlaybookVersions( + java.lang.Iterable + values) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, playbookVersions_); + onChanged(); + } else { + playbookVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder clearPlaybookVersions() { + if (playbookVersionsBuilder_ == null) { + playbookVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + playbookVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public Builder removePlaybookVersions(int index) { + if (playbookVersionsBuilder_ == null) { + ensurePlaybookVersionsIsMutable(); + playbookVersions_.remove(index); + onChanged(); + } else { + playbookVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder + getPlaybookVersionsBuilder(int index) { + return getPlaybookVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder + getPlaybookVersionsOrBuilder(int index) { + if (playbookVersionsBuilder_ == null) { + return playbookVersions_.get(index); + } else { + return playbookVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public java.util.List + getPlaybookVersionsOrBuilderList() { + if (playbookVersionsBuilder_ != null) { + return playbookVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(playbookVersions_); + } + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder + addPlaybookVersionsBuilder() { + return getPlaybookVersionsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance()); + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder + addPlaybookVersionsBuilder(int index) { + return getPlaybookVersionsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance()); + } + /** + * + * + *
+     * The list of playbook version. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + public java.util.List + getPlaybookVersionsBuilderList() { + return getPlaybookVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder> + getPlaybookVersionsFieldBuilder() { + if (playbookVersionsBuilder_ == null) { + playbookVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder>( + playbookVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + playbookVersions_ = null; + } + return playbookVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybookVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponseOrBuilder.java new file mode 100644 index 000000000000..081435d44eed --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybookVersionsResponseOrBuilder.java @@ -0,0 +1,116 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListPlaybookVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + java.util.List getPlaybookVersionsList(); + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getPlaybookVersions(int index); + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + int getPlaybookVersionsCount(); + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + java.util.List + getPlaybookVersionsOrBuilderList(); + /** + * + * + *
+   * The list of playbook version. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.PlaybookVersion playbook_versions = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder getPlaybookVersionsOrBuilder( + int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequest.java new file mode 100644 index 000000000000..b4e0272a6f9a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequest.java @@ -0,0 +1,928 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest} + */ +public final class ListPlaybooksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) + ListPlaybooksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPlaybooksRequest.newBuilder() to construct. + private ListPlaybooksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybooksRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybooksRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list playbooks from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybooksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequestOrBuilder.java new file mode 100644 index 000000000000..27bed4c3ce5e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListPlaybooksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to list playbooks from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponse.java new file mode 100644 index 000000000000..9967e857b054 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponse.java @@ -0,0 +1,1159 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse} + */ +public final class ListPlaybooksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) + ListPlaybooksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPlaybooksResponse.newBuilder() to construct. + private ListPlaybooksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPlaybooksResponse() { + playbooks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPlaybooksResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.Builder.class); + } + + public static final int PLAYBOOKS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List playbooks_; + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + @java.lang.Override + public java.util.List getPlaybooksList() { + return playbooks_; + } + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + @java.lang.Override + public java.util.List + getPlaybooksOrBuilderList() { + return playbooks_; + } + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + @java.lang.Override + public int getPlaybooksCount() { + return playbooks_.size(); + } + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybooks(int index) { + return playbooks_.get(index); + } + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybooksOrBuilder(int index) { + return playbooks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < playbooks_.size(); i++) { + output.writeMessage(1, playbooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < playbooks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, playbooks_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) obj; + + if (!getPlaybooksList().equals(other.getPlaybooksList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPlaybooksCount() > 0) { + hash = (37 * hash) + PLAYBOOKS_FIELD_NUMBER; + hash = (53 * hash) + getPlaybooksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (playbooksBuilder_ == null) { + playbooks_ = java.util.Collections.emptyList(); + } else { + playbooks_ = null; + playbooksBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse result) { + if (playbooksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + playbooks_ = java.util.Collections.unmodifiableList(playbooks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.playbooks_ = playbooks_; + } else { + result.playbooks_ = playbooksBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse.getDefaultInstance()) + return this; + if (playbooksBuilder_ == null) { + if (!other.playbooks_.isEmpty()) { + if (playbooks_.isEmpty()) { + playbooks_ = other.playbooks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlaybooksIsMutable(); + playbooks_.addAll(other.playbooks_); + } + onChanged(); + } + } else { + if (!other.playbooks_.isEmpty()) { + if (playbooksBuilder_.isEmpty()) { + playbooksBuilder_.dispose(); + playbooksBuilder_ = null; + playbooks_ = other.playbooks_; + bitField0_ = (bitField0_ & ~0x00000001); + playbooksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPlaybooksFieldBuilder() + : null; + } else { + playbooksBuilder_.addAllMessages(other.playbooks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Playbook m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.parser(), + extensionRegistry); + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(m); + } else { + playbooksBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List playbooks_ = + java.util.Collections.emptyList(); + + private void ensurePlaybooksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + playbooks_ = + new java.util.ArrayList(playbooks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + playbooksBuilder_; + + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public java.util.List getPlaybooksList() { + if (playbooksBuilder_ == null) { + return java.util.Collections.unmodifiableList(playbooks_); + } else { + return playbooksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public int getPlaybooksCount() { + if (playbooksBuilder_ == null) { + return playbooks_.size(); + } else { + return playbooksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybooks(int index) { + if (playbooksBuilder_ == null) { + return playbooks_.get(index); + } else { + return playbooksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder setPlaybooks(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.set(index, value); + onChanged(); + } else { + playbooksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder setPlaybooks( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.set(index, builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder addPlaybooks(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.add(value); + onChanged(); + } else { + playbooksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder addPlaybooks(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbooksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlaybooksIsMutable(); + playbooks_.add(index, value); + onChanged(); + } else { + playbooksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder addPlaybooks( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder addPlaybooks( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.add(index, builderForValue.build()); + onChanged(); + } else { + playbooksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder addAllPlaybooks( + java.lang.Iterable values) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, playbooks_); + onChanged(); + } else { + playbooksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder clearPlaybooks() { + if (playbooksBuilder_ == null) { + playbooks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + playbooksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public Builder removePlaybooks(int index) { + if (playbooksBuilder_ == null) { + ensurePlaybooksIsMutable(); + playbooks_.remove(index); + onChanged(); + } else { + playbooksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder getPlaybooksBuilder(int index) { + return getPlaybooksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybooksOrBuilder( + int index) { + if (playbooksBuilder_ == null) { + return playbooks_.get(index); + } else { + return playbooksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public java.util.List + getPlaybooksOrBuilderList() { + if (playbooksBuilder_ != null) { + return playbooksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(playbooks_); + } + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder addPlaybooksBuilder() { + return getPlaybooksFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()); + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder addPlaybooksBuilder(int index) { + return getPlaybooksFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()); + } + /** + * + * + *
+     * The list of playbooks. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + public java.util.List + getPlaybooksBuilderList() { + return getPlaybooksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + getPlaybooksFieldBuilder() { + if (playbooksBuilder_ == null) { + playbooksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder>( + playbooks_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + playbooks_ = null; + } + return playbooksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPlaybooksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponseOrBuilder.java new file mode 100644 index 000000000000..e7419cb5a02d --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListPlaybooksResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListPlaybooksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + java.util.List getPlaybooksList(); + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybooks(int index); + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + int getPlaybooksCount(); + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + java.util.List + getPlaybooksOrBuilderList(); + /** + * + * + *
+   * The list of playbooks. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook playbooks = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybooksOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequest.java new file mode 100644 index 000000000000..0d3f2c15bd30 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequest.java @@ -0,0 +1,928 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListToolsRequest} + */ +public final class ListToolsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) + ListToolsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListToolsRequest.newBuilder() to construct. + private ListToolsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListToolsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list the Tools from.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of items to return in a single page. By default 100 and
+     * at most 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous list request.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequestOrBuilder.java new file mode 100644 index 000000000000..1e426902954c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsRequestOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListToolsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListToolsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to list the Tools from.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of items to return in a single page. By default 100 and
+   * at most 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous list request.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponse.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponse.java new file mode 100644 index 000000000000..6de1c382c138 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponse.java @@ -0,0 +1,1151 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The response message for
+ * [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListToolsResponse} + */ +public final class ListToolsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) + ListToolsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListToolsResponse.newBuilder() to construct. + private ListToolsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListToolsResponse() { + tools_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListToolsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.Builder.class); + } + + public static final int TOOLS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List tools_; + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + @java.lang.Override + public java.util.List getToolsList() { + return tools_; + } + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + @java.lang.Override + public java.util.List + getToolsOrBuilderList() { + return tools_; + } + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + @java.lang.Override + public int getToolsCount() { + return tools_.size(); + } + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTools(int index) { + return tools_.get(index); + } + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolsOrBuilder(int index) { + return tools_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tools_.size(); i++) { + output.writeMessage(1, tools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tools_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tools_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse other = + (com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) obj; + + if (!getToolsList().equals(other.getToolsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getToolsCount() > 0) { + hash = (37 * hash) + TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getToolsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The response message for
+   * [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ListToolsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.class, + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + } else { + tools_ = null; + toolsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse build() { + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse result = + new com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse result) { + if (toolsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tools_ = java.util.Collections.unmodifiableList(tools_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tools_ = tools_; + } else { + result.tools_ = toolsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse.getDefaultInstance()) + return this; + if (toolsBuilder_ == null) { + if (!other.tools_.isEmpty()) { + if (tools_.isEmpty()) { + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureToolsIsMutable(); + tools_.addAll(other.tools_); + } + onChanged(); + } + } else { + if (!other.tools_.isEmpty()) { + if (toolsBuilder_.isEmpty()) { + toolsBuilder_.dispose(); + toolsBuilder_ = null; + tools_ = other.tools_; + bitField0_ = (bitField0_ & ~0x00000001); + toolsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getToolsFieldBuilder() + : null; + } else { + toolsBuilder_.addAllMessages(other.tools_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Tool m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Tool.parser(), extensionRegistry); + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(m); + } else { + toolsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List tools_ = + java.util.Collections.emptyList(); + + private void ensureToolsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tools_ = new java.util.ArrayList(tools_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + toolsBuilder_; + + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public java.util.List getToolsList() { + if (toolsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tools_); + } else { + return toolsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public int getToolsCount() { + if (toolsBuilder_ == null) { + return tools_.size(); + } else { + return toolsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTools(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder setTools(int index, com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.set(index, value); + onChanged(); + } else { + toolsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder setTools( + int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.set(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder addTools(com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(value); + onChanged(); + } else { + toolsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder addTools(int index, com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsIsMutable(); + tools_.add(index, value); + onChanged(); + } else { + toolsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder addTools(com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder addTools( + int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder builderForValue) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.add(index, builderForValue.build()); + onChanged(); + } else { + toolsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder addAllTools( + java.lang.Iterable values) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tools_); + onChanged(); + } else { + toolsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder clearTools() { + if (toolsBuilder_ == null) { + tools_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + toolsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public Builder removeTools(int index) { + if (toolsBuilder_ == null) { + ensureToolsIsMutable(); + tools_.remove(index); + onChanged(); + } else { + toolsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder getToolsBuilder(int index) { + return getToolsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolsOrBuilder(int index) { + if (toolsBuilder_ == null) { + return tools_.get(index); + } else { + return toolsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public java.util.List + getToolsOrBuilderList() { + if (toolsBuilder_ != null) { + return toolsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tools_); + } + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder addToolsBuilder() { + return getToolsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder addToolsBuilder(int index) { + return getToolsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Tools. There will be a maximum number of items returned
+     * based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + public java.util.List + getToolsBuilderList() { + return getToolsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + getToolsFieldBuilder() { + if (toolsBuilder_ == null) { + toolsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder>( + tools_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tools_ = null; + } + return toolsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListToolsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponseOrBuilder.java new file mode 100644 index 000000000000..5cfe41e6d62f --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ListToolsResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ListToolsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ListToolsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + java.util.List getToolsList(); + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool getTools(int index); + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + int getToolsCount(); + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + java.util.List + getToolsOrBuilderList(); + /** + * + * + *
+   * The list of Tools. There will be a maximum number of items returned
+   * based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool tools = 1; + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolsOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettings.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettings.java new file mode 100644 index 000000000000..428bbfde4eb7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettings.java @@ -0,0 +1,808 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/generative_settings.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Settings for LLM models.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.LlmModelSettings} + */ +public final class LlmModelSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) + LlmModelSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use LlmModelSettings.newBuilder() to construct. + private LlmModelSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LlmModelSettings() { + model_ = ""; + promptText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new LlmModelSettings(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + @java.lang.Override + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } + } + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROMPT_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object promptText_ = ""; + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + @java.lang.Override + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promptText_ = s; + return s; + } + } + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings other = + (com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getPromptText().equals(other.getPromptText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getPromptText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Settings for LLM models.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.LlmModelSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.class, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + promptText_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_LlmModelSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings build() { + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings result = + new com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.promptText_ = promptText_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getPromptText().isEmpty()) { + promptText_ = other.promptText_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + promptText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object model_ = ""; + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return The model. + */ + public java.lang.String getModel() { + java.lang.Object ref = model_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + model_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + public com.google.protobuf.ByteString getModelBytes() { + java.lang.Object ref = model_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + model_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @param value The model to set. + * @return This builder for chaining. + */ + public Builder setModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The selected LLM model.
+     * 
+ * + * string model = 1; + * + * @param value The bytes for model to set. + * @return This builder for chaining. + */ + public Builder setModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + model_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object promptText_ = ""; + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + public java.lang.String getPromptText() { + java.lang.Object ref = promptText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + promptText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + public com.google.protobuf.ByteString getPromptTextBytes() { + java.lang.Object ref = promptText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + promptText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @param value The promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @return This builder for chaining. + */ + public Builder clearPromptText() { + promptText_ = getDefaultInstance().getPromptText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The custom prompt to use.
+     * 
+ * + * string prompt_text = 2; + * + * @param value The bytes for promptText to set. + * @return This builder for chaining. + */ + public Builder setPromptTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + promptText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) + private static final com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LlmModelSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettingsOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettingsOrBuilder.java new file mode 100644 index 000000000000..4fe68e0aa781 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/LlmModelSettingsOrBuilder.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/generative_settings.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface LlmModelSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.LlmModelSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The selected LLM model.
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The promptText. + */ + java.lang.String getPromptText(); + /** + * + * + *
+   * The custom prompt to use.
+   * 
+ * + * string prompt_text = 2; + * + * @return The bytes for promptText. + */ + com.google.protobuf.ByteString getPromptTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/OutputState.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/OutputState.java new file mode 100644 index 000000000000..2e70e7bbaf08 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/OutputState.java @@ -0,0 +1,245 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Output state.
+ * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.OutputState} + */ +public enum OutputState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Unspecified output.
+   * 
+ * + * OUTPUT_STATE_UNSPECIFIED = 0; + */ + OUTPUT_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * Succeeded.
+   * 
+ * + * OUTPUT_STATE_OK = 1; + */ + OUTPUT_STATE_OK(1), + /** + * + * + *
+   * Cancelled.
+   * 
+ * + * OUTPUT_STATE_CANCELLED = 2; + */ + OUTPUT_STATE_CANCELLED(2), + /** + * + * + *
+   * Failed.
+   * 
+ * + * OUTPUT_STATE_FAILED = 3; + */ + OUTPUT_STATE_FAILED(3), + /** + * + * + *
+   * Escalated.
+   * 
+ * + * OUTPUT_STATE_ESCALATED = 4; + */ + OUTPUT_STATE_ESCALATED(4), + /** + * + * + *
+   * Pending.
+   * 
+ * + * OUTPUT_STATE_PENDING = 5; + */ + OUTPUT_STATE_PENDING(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Unspecified output.
+   * 
+ * + * OUTPUT_STATE_UNSPECIFIED = 0; + */ + public static final int OUTPUT_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Succeeded.
+   * 
+ * + * OUTPUT_STATE_OK = 1; + */ + public static final int OUTPUT_STATE_OK_VALUE = 1; + /** + * + * + *
+   * Cancelled.
+   * 
+ * + * OUTPUT_STATE_CANCELLED = 2; + */ + public static final int OUTPUT_STATE_CANCELLED_VALUE = 2; + /** + * + * + *
+   * Failed.
+   * 
+ * + * OUTPUT_STATE_FAILED = 3; + */ + public static final int OUTPUT_STATE_FAILED_VALUE = 3; + /** + * + * + *
+   * Escalated.
+   * 
+ * + * OUTPUT_STATE_ESCALATED = 4; + */ + public static final int OUTPUT_STATE_ESCALATED_VALUE = 4; + /** + * + * + *
+   * Pending.
+   * 
+ * + * OUTPUT_STATE_PENDING = 5; + */ + public static final int OUTPUT_STATE_PENDING_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OutputState valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OutputState forNumber(int value) { + switch (value) { + case 0: + return OUTPUT_STATE_UNSPECIFIED; + case 1: + return OUTPUT_STATE_OK; + case 2: + return OUTPUT_STATE_CANCELLED; + case 3: + return OUTPUT_STATE_FAILED; + case 4: + return OUTPUT_STATE_ESCALATED; + case 5: + return OUTPUT_STATE_PENDING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OutputState findValueByNumber(int number) { + return OutputState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OutputState[] VALUES = values(); + + public static OutputState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OutputState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.OutputState) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java index 3b397a212b70..2ebcd88250a2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Page.java @@ -56,6 +56,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Page() { name_ = ""; displayName_ = ""; + description_ = ""; transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); transitionRoutes_ = java.util.Collections.emptyList(); eventHandlers_ = java.util.Collections.emptyList(); @@ -199,6 +200,57 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { } } + public static final int DESCRIPTION_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int ENTRY_FULFILLMENT_FIELD_NUMBER = 7; private com.google.cloud.dialogflow.cx.v3beta1.Fulfillment entryFulfillment_; /** @@ -855,6 +907,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(18, getKnowledgeConnectorSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, description_); + } getUnknownFields().writeTo(output); } @@ -898,6 +953,9 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getKnowledgeConnectorSettings()); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, description_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -916,6 +974,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (hasEntryFulfillment() != other.hasEntryFulfillment()) return false; if (hasEntryFulfillment()) { if (!getEntryFulfillment().equals(other.getEntryFulfillment())) return false; @@ -951,6 +1010,8 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); if (hasEntryFulfillment()) { hash = (37 * hash) + ENTRY_FULFILLMENT_FIELD_NUMBER; hash = (53 * hash) + getEntryFulfillment().hashCode(); @@ -1149,6 +1210,7 @@ public Builder clear() { bitField0_ = 0; name_ = ""; displayName_ = ""; + description_ = ""; entryFulfillment_ = null; if (entryFulfillmentBuilder_ != null) { entryFulfillmentBuilder_.dispose(); @@ -1166,14 +1228,14 @@ public Builder clear() { transitionRoutes_ = null; transitionRoutesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); } else { eventHandlers_ = null; eventHandlersBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -1221,18 +1283,18 @@ public com.google.cloud.dialogflow.cx.v3beta1.Page buildPartial() { private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3beta1.Page result) { if (transitionRoutesBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { transitionRoutes_ = java.util.Collections.unmodifiableList(transitionRoutes_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } result.transitionRoutes_ = transitionRoutes_; } else { result.transitionRoutes_ = transitionRoutesBuilder_.build(); } if (eventHandlersBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { eventHandlers_ = java.util.Collections.unmodifiableList(eventHandlers_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } result.eventHandlers_ = eventHandlers_; } else { @@ -1248,26 +1310,29 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Page result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.displayName_ = displayName_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { result.entryFulfillment_ = entryFulfillmentBuilder_ == null ? entryFulfillment_ : entryFulfillmentBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.form_ = formBuilder_ == null ? form_ : formBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { transitionRouteGroups_.makeImmutable(); result.transitionRouteGroups_ = transitionRouteGroups_; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { result.knowledgeConnectorSettings_ = knowledgeConnectorSettingsBuilder_ == null ? knowledgeConnectorSettings_ @@ -1332,6 +1397,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { bitField0_ |= 0x00000002; onChanged(); } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } if (other.hasEntryFulfillment()) { mergeEntryFulfillment(other.getEntryFulfillment()); } @@ -1341,7 +1411,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { if (!other.transitionRouteGroups_.isEmpty()) { if (transitionRouteGroups_.isEmpty()) { transitionRouteGroups_ = other.transitionRouteGroups_; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } else { ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.addAll(other.transitionRouteGroups_); @@ -1352,7 +1422,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { if (!other.transitionRoutes_.isEmpty()) { if (transitionRoutes_.isEmpty()) { transitionRoutes_ = other.transitionRoutes_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureTransitionRoutesIsMutable(); transitionRoutes_.addAll(other.transitionRoutes_); @@ -1365,7 +1435,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { transitionRoutesBuilder_.dispose(); transitionRoutesBuilder_ = null; transitionRoutes_ = other.transitionRoutes_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); transitionRoutesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTransitionRoutesFieldBuilder() @@ -1379,7 +1449,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { if (!other.eventHandlers_.isEmpty()) { if (eventHandlers_.isEmpty()) { eventHandlers_ = other.eventHandlers_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureEventHandlersIsMutable(); eventHandlers_.addAll(other.eventHandlers_); @@ -1392,7 +1462,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Page other) { eventHandlersBuilder_.dispose(); eventHandlersBuilder_ = null; eventHandlers_ = other.eventHandlers_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); eventHandlersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventHandlersFieldBuilder() @@ -1449,14 +1519,14 @@ public Builder mergeFrom( case 34: { input.readMessage(getFormFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 34 case 58: { input.readMessage( getEntryFulfillmentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; break; } // case 58 case 74: @@ -1498,16 +1568,22 @@ public Builder mergeFrom( { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; break; } // case 106 case 146: { input.readMessage( getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; break; } // case 146 + case 154: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 154 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1774,6 +1850,112 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object description_ = ""; + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The description of the page. The maximum length is 500 characters.
+     * 
+ * + * string description = 19; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private com.google.cloud.dialogflow.cx.v3beta1.Fulfillment entryFulfillment_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.Fulfillment, @@ -1792,7 +1974,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * @return Whether the entryFulfillment field is set. */ public boolean hasEntryFulfillment() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -1832,7 +2014,7 @@ public Builder setEntryFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulfil } else { entryFulfillmentBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1852,7 +2034,7 @@ public Builder setEntryFulfillment( } else { entryFulfillmentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1867,7 +2049,7 @@ public Builder setEntryFulfillment( */ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulfillment value) { if (entryFulfillmentBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) + if (((bitField0_ & 0x00000008) != 0) && entryFulfillment_ != null && entryFulfillment_ != com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.getDefaultInstance()) { @@ -1879,7 +2061,7 @@ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulf entryFulfillmentBuilder_.mergeFrom(value); } if (entryFulfillment_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); } return this; @@ -1894,7 +2076,7 @@ public Builder mergeEntryFulfillment(com.google.cloud.dialogflow.cx.v3beta1.Fulf * .google.cloud.dialogflow.cx.v3beta1.Fulfillment entry_fulfillment = 7; */ public Builder clearEntryFulfillment() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); entryFulfillment_ = null; if (entryFulfillmentBuilder_ != null) { entryFulfillmentBuilder_.dispose(); @@ -1913,7 +2095,7 @@ public Builder clearEntryFulfillment() { * .google.cloud.dialogflow.cx.v3beta1.Fulfillment entry_fulfillment = 7; */ public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder getEntryFulfillmentBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; onChanged(); return getEntryFulfillmentFieldBuilder().getBuilder(); } @@ -1981,7 +2163,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.Builder getEntryFulfil * @return Whether the form field is set. */ public boolean hasForm() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -2023,7 +2205,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3beta1.Form value) { } else { formBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2043,7 +2225,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3beta1.Form.Builder build } else { formBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2059,7 +2241,7 @@ public Builder setForm(com.google.cloud.dialogflow.cx.v3beta1.Form.Builder build */ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3beta1.Form value) { if (formBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) + if (((bitField0_ & 0x00000010) != 0) && form_ != null && form_ != com.google.cloud.dialogflow.cx.v3beta1.Form.getDefaultInstance()) { getFormBuilder().mergeFrom(value); @@ -2070,7 +2252,7 @@ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3beta1.Form value) { formBuilder_.mergeFrom(value); } if (form_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -2086,7 +2268,7 @@ public Builder mergeForm(com.google.cloud.dialogflow.cx.v3beta1.Form value) { * .google.cloud.dialogflow.cx.v3beta1.Form form = 4; */ public Builder clearForm() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); form_ = null; if (formBuilder_ != null) { formBuilder_.dispose(); @@ -2106,7 +2288,7 @@ public Builder clearForm() { * .google.cloud.dialogflow.cx.v3beta1.Form form = 4; */ public com.google.cloud.dialogflow.cx.v3beta1.Form.Builder getFormBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getFormFieldBuilder().getBuilder(); } @@ -2164,7 +2346,7 @@ private void ensureTransitionRouteGroupsIsMutable() { transitionRouteGroups_ = new com.google.protobuf.LazyStringArrayList(transitionRouteGroups_); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } /** * @@ -2344,7 +2526,7 @@ public Builder setTransitionRouteGroups(int index, java.lang.String value) { } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.set(index, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2386,7 +2568,7 @@ public Builder addTransitionRouteGroups(java.lang.String value) { } ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2425,7 +2607,7 @@ public Builder addTransitionRouteGroups(java.lang.String value) { public Builder addAllTransitionRouteGroups(java.lang.Iterable values) { ensureTransitionRouteGroupsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transitionRouteGroups_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2462,7 +2644,7 @@ public Builder addAllTransitionRouteGroups(java.lang.Iterable */ public Builder clearTransitionRouteGroups() { transitionRouteGroups_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); ; onChanged(); return this; @@ -2506,7 +2688,7 @@ public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString valu checkByteStringIsUtf8(value); ensureTransitionRouteGroupsIsMutable(); transitionRouteGroups_.add(value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2515,11 +2697,11 @@ public Builder addTransitionRouteGroupsBytes(com.google.protobuf.ByteString valu transitionRoutes_ = java.util.Collections.emptyList(); private void ensureTransitionRoutesIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { transitionRoutes_ = new java.util.ArrayList( transitionRoutes_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } } @@ -2982,7 +3164,7 @@ public Builder addAllTransitionRoutes( public Builder clearTransitionRoutes() { if (transitionRoutesBuilder_ == null) { transitionRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { transitionRoutesBuilder_.clear(); @@ -3264,7 +3446,7 @@ public Builder removeTransitionRoutes(int index) { com.google.cloud.dialogflow.cx.v3beta1.TransitionRoute.Builder, com.google.cloud.dialogflow.cx.v3beta1.TransitionRouteOrBuilder>( transitionRoutes_, - ((bitField0_ & 0x00000020) != 0), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); transitionRoutes_ = null; @@ -3276,11 +3458,11 @@ public Builder removeTransitionRoutes(int index) { java.util.Collections.emptyList(); private void ensureEventHandlersIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { eventHandlers_ = new java.util.ArrayList( eventHandlers_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } } @@ -3510,7 +3692,7 @@ public Builder addAllEventHandlers( public Builder clearEventHandlers() { if (eventHandlersBuilder_ == null) { eventHandlers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { eventHandlersBuilder_.clear(); @@ -3644,7 +3826,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder addEventHandl com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder, com.google.cloud.dialogflow.cx.v3beta1.EventHandlerOrBuilder>( eventHandlers_, - ((bitField0_ & 0x00000040) != 0), + ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); eventHandlers_ = null; @@ -3671,7 +3853,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder addEventHandl * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -3714,7 +3896,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3735,7 +3917,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3752,7 +3934,7 @@ public Builder setAdvancedSettings( public Builder mergeAdvancedSettings( com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000080) != 0) + if (((bitField0_ & 0x00000100) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { @@ -3764,7 +3946,7 @@ public Builder mergeAdvancedSettings( advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); } return this; @@ -3780,7 +3962,7 @@ public Builder mergeAdvancedSettings( * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 13; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -3801,7 +3983,7 @@ public Builder clearAdvancedSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -3873,7 +4055,7 @@ public Builder clearAdvancedSettings() { * @return Whether the knowledgeConnectorSettings field is set. */ public boolean hasKnowledgeConnectorSettings() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * @@ -3919,7 +4101,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3941,7 +4123,7 @@ public Builder setKnowledgeConnectorSettings( } else { knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3959,7 +4141,7 @@ public Builder setKnowledgeConnectorSettings( public Builder mergeKnowledgeConnectorSettings( com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings value) { if (knowledgeConnectorSettingsBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0) + if (((bitField0_ & 0x00000200) != 0) && knowledgeConnectorSettings_ != null && knowledgeConnectorSettings_ != com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings @@ -3972,7 +4154,7 @@ public Builder mergeKnowledgeConnectorSettings( knowledgeConnectorSettingsBuilder_.mergeFrom(value); } if (knowledgeConnectorSettings_ != null) { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); } return this; @@ -3989,7 +4171,7 @@ public Builder mergeKnowledgeConnectorSettings( * */ public Builder clearKnowledgeConnectorSettings() { - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); knowledgeConnectorSettings_ = null; if (knowledgeConnectorSettingsBuilder_ != null) { knowledgeConnectorSettingsBuilder_.dispose(); @@ -4011,7 +4193,7 @@ public Builder clearKnowledgeConnectorSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.KnowledgeConnectorSettings.Builder getKnowledgeConnectorSettingsBuilder() { - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; onChanged(); return getKnowledgeConnectorSettingsFieldBuilder().getBuilder(); } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java index 000d5f44d34d..f5d4d4d3b9a9 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageOrBuilder.java @@ -88,6 +88,31 @@ public interface PageOrBuilder */ com.google.protobuf.ByteString getDisplayNameBytes(); + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * The description of the page. The maximum length is 500 characters.
+   * 
+ * + * string description = 19; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java index 051c4ef3269a..98e03ee6ef7a 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PageProto.java @@ -100,117 +100,118 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\0324google/cloud/dialogflow/cx/v3beta1/f" + "ulfillment.proto\032\033google/protobuf/empty." + "proto\032 google/protobuf/field_mask.proto\032" - + "\034google/protobuf/struct.proto\"\326\005\n\004Page\022\014" + + "\034google/protobuf/struct.proto\"\353\005\n\004Page\022\014" + "\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022" - + "J\n\021entry_fulfillment\030\007 \001(\0132/.google.clou" - + "d.dialogflow.cx.v3beta1.Fulfillment\0226\n\004f" - + "orm\030\004 \001(\0132(.google.cloud.dialogflow.cx.v" - + "3beta1.Form\022T\n\027transition_route_groups\030\013" - + " \003(\tB3\372A0\n.dialogflow.googleapis.com/Tra" - + "nsitionRouteGroup\022N\n\021transition_routes\030\t" - + " \003(\01323.google.cloud.dialogflow.cx.v3beta" - + "1.TransitionRoute\022H\n\016event_handlers\030\n \003(" - + "\01320.google.cloud.dialogflow.cx.v3beta1.E" - + "ventHandler\022O\n\021advanced_settings\030\r \001(\01324" - + ".google.cloud.dialogflow.cx.v3beta1.Adva" - + "ncedSettings\022i\n\034knowledge_connector_sett" - + "ings\030\022 \001(\0132>.google.cloud.dialogflow.cx." - + "v3beta1.KnowledgeConnectorSettingsB\003\340A\001:" - + "u\352Ar\n\036dialogflow.googleapis.com/Page\022Ppr" - + "ojects/{project}/locations/{location}/ag" - + "ents/{agent}/flows/{flow}/pages/{page}\"\210" - + "\005\n\004Form\022F\n\nparameters\030\001 \003(\01322.google.clo" - + "ud.dialogflow.cx.v3beta1.Form.Parameter\032" - + "\267\004\n\tParameter\022\031\n\014display_name\030\001 \001(\tB\003\340A\002" - + "\022\020\n\010required\030\002 \001(\010\022A\n\013entity_type\030\003 \001(\tB" - + ",\340A\002\372A&\n$dialogflow.googleapis.com/Entit" - + "yType\022\017\n\007is_list\030\004 \001(\010\022[\n\rfill_behavior\030" - + "\007 \001(\0132?.google.cloud.dialogflow.cx.v3bet" - + "a1.Form.Parameter.FillBehaviorB\003\340A\002\022-\n\rd" - + "efault_value\030\t \001(\0132\026.google.protobuf.Val" - + "ue\022\016\n\006redact\030\013 \001(\010\022O\n\021advanced_settings\030" - + "\014 \001(\01324.google.cloud.dialogflow.cx.v3bet" - + "a1.AdvancedSettings\032\273\001\n\014FillBehavior\022X\n\032" - + "initial_prompt_fulfillment\030\003 \001(\0132/.googl" - + "e.cloud.dialogflow.cx.v3beta1.Fulfillmen" - + "tB\003\340A\002\022Q\n\027reprompt_event_handlers\030\005 \003(\0132" - + "0.google.cloud.dialogflow.cx.v3beta1.Eve" - + "ntHandler\"\205\002\n\014EventHandler\022\021\n\004name\030\006 \001(\t" - + "B\003\340A\003\022\022\n\005event\030\004 \001(\tB\003\340A\002\022L\n\023trigger_ful" - + "fillment\030\005 \001(\0132/.google.cloud.dialogflow" - + ".cx.v3beta1.Fulfillment\022:\n\013target_page\030\002" - + " \001(\tB#\372A \n\036dialogflow.googleapis.com/Pag" - + "eH\000\022:\n\013target_flow\030\003 \001(\tB#\372A \n\036dialogflo" - + "w.googleapis.com/FlowH\000B\010\n\006target\"\330\002\n\017Tr" - + "ansitionRoute\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\030\n\013desc" - + "ription\030\010 \001(\tB\003\340A\001\0225\n\006intent\030\001 \001(\tB%\372A\"\n" - + " dialogflow.googleapis.com/Intent\022\021\n\tcon" - + "dition\030\002 \001(\t\022L\n\023trigger_fulfillment\030\003 \001(" - + "\0132/.google.cloud.dialogflow.cx.v3beta1.F" - + "ulfillment\022:\n\013target_page\030\004 \001(\tB#\372A \n\036di" - + "alogflow.googleapis.com/PageH\000\022:\n\013target" - + "_flow\030\005 \001(\tB#\372A \n\036dialogflow.googleapis." - + "com/FlowH\000B\010\n\006target\"\210\001\n\020ListPagesReques" - + "t\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.go" - + "ogleapis.com/Page\022\025\n\rlanguage_code\030\002 \001(\t" - + "\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"" - + "e\n\021ListPagesResponse\0227\n\005pages\030\001 \003(\0132(.go" - + "ogle.cloud.dialogflow.cx.v3beta1.Page\022\027\n" - + "\017next_page_token\030\002 \001(\t\"]\n\016GetPageRequest" - + "\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googl" - + "eapis.com/Page\022\025\n\rlanguage_code\030\002 \001(\t\"\237\001" - + "\n\021CreatePageRequest\0226\n\006parent\030\001 \001(\tB&\340A\002" - + "\372A \022\036dialogflow.googleapis.com/Page\022;\n\004p" - + "age\030\002 \001(\0132(.google.cloud.dialogflow.cx.v" - + "3beta1.PageB\003\340A\002\022\025\n\rlanguage_code\030\003 \001(\t\"" - + "\230\001\n\021UpdatePageRequest\022;\n\004page\030\001 \001(\0132(.go" - + "ogle.cloud.dialogflow.cx.v3beta1.PageB\003\340" - + "A\002\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013update_mask" - + "\030\003 \001(\0132\032.google.protobuf.FieldMask\"X\n\021De" - + "letePageRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036d" - + "ialogflow.googleapis.com/Page\022\r\n\005force\030\002" - + " \001(\010\"\333\002\n\032KnowledgeConnectorSettings\022\017\n\007e" - + "nabled\030\001 \001(\010\022L\n\023trigger_fulfillment\030\003 \001(" - + "\0132/.google.cloud.dialogflow.cx.v3beta1.F" - + "ulfillment\022:\n\013target_page\030\004 \001(\tB#\372A \n\036di" - + "alogflow.googleapis.com/PageH\000\022:\n\013target" - + "_flow\030\005 \001(\tB#\372A \n\036dialogflow.googleapis." - + "com/FlowH\000\022\\\n\026data_store_connections\030\006 \003" - + "(\01327.google.cloud.dialogflow.cx.v3beta1." - + "DataStoreConnectionB\003\340A\001B\010\n\006target2\332\010\n\005P" - + "ages\022\312\001\n\tListPages\0224.google.cloud.dialog" - + "flow.cx.v3beta1.ListPagesRequest\0325.googl" - + "e.cloud.dialogflow.cx.v3beta1.ListPagesR" - + "esponse\"P\332A\006parent\202\323\344\223\002A\022?/v3beta1/{pare" - + "nt=projects/*/locations/*/agents/*/flows" - + "/*}/pages\022\267\001\n\007GetPage\0222.google.cloud.dia" - + "logflow.cx.v3beta1.GetPageRequest\032(.goog" - + "le.cloud.dialogflow.cx.v3beta1.Page\"N\332A\004" - + "name\202\323\344\223\002A\022?/v3beta1/{name=projects/*/lo" - + "cations/*/agents/*/flows/*/pages/*}\022\312\001\n\n" - + "CreatePage\0225.google.cloud.dialogflow.cx." - + "v3beta1.CreatePageRequest\032(.google.cloud" - + ".dialogflow.cx.v3beta1.Page\"[\332A\013parent,p" - + "age\202\323\344\223\002G\"?/v3beta1/{parent=projects/*/l" - + "ocations/*/agents/*/flows/*}/pages:\004page" - + "\022\324\001\n\nUpdatePage\0225.google.cloud.dialogflo" - + "w.cx.v3beta1.UpdatePageRequest\032(.google." - + "cloud.dialogflow.cx.v3beta1.Page\"e\332A\020pag" - + "e,update_mask\202\323\344\223\002L2D/v3beta1/{page.name" - + "=projects/*/locations/*/agents/*/flows/*" - + "/pages/*}:\004page\022\253\001\n\nDeletePage\0225.google." - + "cloud.dialogflow.cx.v3beta1.DeletePageRe" - + "quest\032\026.google.protobuf.Empty\"N\332A\004name\202\323" - + "\344\223\002A*?/v3beta1/{name=projects/*/location" - + "s/*/agents/*/flows/*/pages/*}\032x\312A\031dialog" - + "flow.googleapis.com\322AYhttps://www.google" - + "apis.com/auth/cloud-platform,https://www" - + ".googleapis.com/auth/dialogflowB\303\001\n&com." - + "google.cloud.dialogflow.cx.v3beta1B\tPage" - + "ProtoP\001Z6cloud.google.com/go/dialogflow/" - + "cx/apiv3beta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google" - + ".Cloud.Dialogflow.Cx.V3Beta1\352\002&Google::C" - + "loud::Dialogflow::CX::V3beta1b\006proto3" + + "\023\n\013description\030\023 \001(\t\022J\n\021entry_fulfillmen" + + "t\030\007 \001(\0132/.google.cloud.dialogflow.cx.v3b" + + "eta1.Fulfillment\0226\n\004form\030\004 \001(\0132(.google." + + "cloud.dialogflow.cx.v3beta1.Form\022T\n\027tran" + + "sition_route_groups\030\013 \003(\tB3\372A0\n.dialogfl" + + "ow.googleapis.com/TransitionRouteGroup\022N" + + "\n\021transition_routes\030\t \003(\01323.google.cloud" + + ".dialogflow.cx.v3beta1.TransitionRoute\022H" + + "\n\016event_handlers\030\n \003(\01320.google.cloud.di" + + "alogflow.cx.v3beta1.EventHandler\022O\n\021adva" + + "nced_settings\030\r \001(\01324.google.cloud.dialo" + + "gflow.cx.v3beta1.AdvancedSettings\022i\n\034kno" + + "wledge_connector_settings\030\022 \001(\0132>.google" + + ".cloud.dialogflow.cx.v3beta1.KnowledgeCo" + + "nnectorSettingsB\003\340A\001:u\352Ar\n\036dialogflow.go" + + "ogleapis.com/Page\022Pprojects/{project}/lo" + + "cations/{location}/agents/{agent}/flows/" + + "{flow}/pages/{page}\"\210\005\n\004Form\022F\n\nparamete" + + "rs\030\001 \003(\01322.google.cloud.dialogflow.cx.v3" + + "beta1.Form.Parameter\032\267\004\n\tParameter\022\031\n\014di" + + "splay_name\030\001 \001(\tB\003\340A\002\022\020\n\010required\030\002 \001(\010\022" + + "A\n\013entity_type\030\003 \001(\tB,\340A\002\372A&\n$dialogflow" + + ".googleapis.com/EntityType\022\017\n\007is_list\030\004 " + + "\001(\010\022[\n\rfill_behavior\030\007 \001(\0132?.google.clou" + + "d.dialogflow.cx.v3beta1.Form.Parameter.F" + + "illBehaviorB\003\340A\002\022-\n\rdefault_value\030\t \001(\0132" + + "\026.google.protobuf.Value\022\016\n\006redact\030\013 \001(\010\022" + + "O\n\021advanced_settings\030\014 \001(\01324.google.clou" + + "d.dialogflow.cx.v3beta1.AdvancedSettings" + + "\032\273\001\n\014FillBehavior\022X\n\032initial_prompt_fulf" + + "illment\030\003 \001(\0132/.google.cloud.dialogflow." + + "cx.v3beta1.FulfillmentB\003\340A\002\022Q\n\027reprompt_" + + "event_handlers\030\005 \003(\01320.google.cloud.dial" + + "ogflow.cx.v3beta1.EventHandler\"\205\002\n\014Event" + + "Handler\022\021\n\004name\030\006 \001(\tB\003\340A\003\022\022\n\005event\030\004 \001(" + + "\tB\003\340A\002\022L\n\023trigger_fulfillment\030\005 \001(\0132/.go" + + "ogle.cloud.dialogflow.cx.v3beta1.Fulfill" + + "ment\022:\n\013target_page\030\002 \001(\tB#\372A \n\036dialogfl" + + "ow.googleapis.com/PageH\000\022:\n\013target_flow\030" + + "\003 \001(\tB#\372A \n\036dialogflow.googleapis.com/Fl" + + "owH\000B\010\n\006target\"\330\002\n\017TransitionRoute\022\021\n\004na" + + "me\030\006 \001(\tB\003\340A\003\022\030\n\013description\030\010 \001(\tB\003\340A\001\022" + + "5\n\006intent\030\001 \001(\tB%\372A\"\n dialogflow.googlea" + + "pis.com/Intent\022\021\n\tcondition\030\002 \001(\t\022L\n\023tri" + + "gger_fulfillment\030\003 \001(\0132/.google.cloud.di" + + "alogflow.cx.v3beta1.Fulfillment\022:\n\013targe" + + "t_page\030\004 \001(\tB#\372A \n\036dialogflow.googleapis" + + ".com/PageH\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036d" + + "ialogflow.googleapis.com/FlowH\000B\010\n\006targe" + + "t\"\210\001\n\020ListPagesRequest\0226\n\006parent\030\001 \001(\tB&" + + "\340A\002\372A \022\036dialogflow.googleapis.com/Page\022\025" + + "\n\rlanguage_code\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" + + "\022\022\n\npage_token\030\004 \001(\t\"e\n\021ListPagesRespons" + + "e\0227\n\005pages\030\001 \003(\0132(.google.cloud.dialogfl" + + "ow.cx.v3beta1.Page\022\027\n\017next_page_token\030\002 " + + "\001(\t\"]\n\016GetPageRequest\0224\n\004name\030\001 \001(\tB&\340A\002" + + "\372A \n\036dialogflow.googleapis.com/Page\022\025\n\rl" + + "anguage_code\030\002 \001(\t\"\237\001\n\021CreatePageRequest" + + "\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.goo" + + "gleapis.com/Page\022;\n\004page\030\002 \001(\0132(.google." + + "cloud.dialogflow.cx.v3beta1.PageB\003\340A\002\022\025\n" + + "\rlanguage_code\030\003 \001(\t\"\230\001\n\021UpdatePageReque" + + "st\022;\n\004page\030\001 \001(\0132(.google.cloud.dialogfl" + + "ow.cx.v3beta1.PageB\003\340A\002\022\025\n\rlanguage_code" + + "\030\002 \001(\t\022/\n\013update_mask\030\003 \001(\0132\032.google.pro" + + "tobuf.FieldMask\"X\n\021DeletePageRequest\0224\n\004" + + "name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow.googleapi" + + "s.com/Page\022\r\n\005force\030\002 \001(\010\"\333\002\n\032KnowledgeC" + + "onnectorSettings\022\017\n\007enabled\030\001 \001(\010\022L\n\023tri" + + "gger_fulfillment\030\003 \001(\0132/.google.cloud.di" + + "alogflow.cx.v3beta1.Fulfillment\022:\n\013targe" + + "t_page\030\004 \001(\tB#\372A \n\036dialogflow.googleapis" + + ".com/PageH\000\022:\n\013target_flow\030\005 \001(\tB#\372A \n\036d" + + "ialogflow.googleapis.com/FlowH\000\022\\\n\026data_" + + "store_connections\030\006 \003(\01327.google.cloud.d" + + "ialogflow.cx.v3beta1.DataStoreConnection" + + "B\003\340A\001B\010\n\006target2\332\010\n\005Pages\022\312\001\n\tListPages\022" + + "4.google.cloud.dialogflow.cx.v3beta1.Lis" + + "tPagesRequest\0325.google.cloud.dialogflow." + + "cx.v3beta1.ListPagesResponse\"P\332A\006parent\202" + + "\323\344\223\002A\022?/v3beta1/{parent=projects/*/locat" + + "ions/*/agents/*/flows/*}/pages\022\267\001\n\007GetPa" + + "ge\0222.google.cloud.dialogflow.cx.v3beta1." + + "GetPageRequest\032(.google.cloud.dialogflow" + + ".cx.v3beta1.Page\"N\332A\004name\202\323\344\223\002A\022?/v3beta" + + "1/{name=projects/*/locations/*/agents/*/" + + "flows/*/pages/*}\022\312\001\n\nCreatePage\0225.google" + + ".cloud.dialogflow.cx.v3beta1.CreatePageR" + + "equest\032(.google.cloud.dialogflow.cx.v3be" + + "ta1.Page\"[\332A\013parent,page\202\323\344\223\002G\"?/v3beta1" + + "/{parent=projects/*/locations/*/agents/*" + + "/flows/*}/pages:\004page\022\324\001\n\nUpdatePage\0225.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Update" + + "PageRequest\032(.google.cloud.dialogflow.cx" + + ".v3beta1.Page\"e\332A\020page,update_mask\202\323\344\223\002L" + + "2D/v3beta1/{page.name=projects/*/locatio" + + "ns/*/agents/*/flows/*/pages/*}:\004page\022\253\001\n" + + "\nDeletePage\0225.google.cloud.dialogflow.cx" + + ".v3beta1.DeletePageRequest\032\026.google.prot" + + "obuf.Empty\"N\332A\004name\202\323\344\223\002A*?/v3beta1/{nam" + + "e=projects/*/locations/*/agents/*/flows/" + + "*/pages/*}\032x\312A\031dialogflow.googleapis.com" + + "\322AYhttps://www.googleapis.com/auth/cloud" + + "-platform,https://www.googleapis.com/aut" + + "h/dialogflowB\303\001\n&com.google.cloud.dialog" + + "flow.cx.v3beta1B\tPageProtoP\001Z6cloud.goog" + + "le.com/go/dialogflow/cx/apiv3beta1/cxpb;" + + "cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialogflow.C" + + "x.V3Beta1\352\002&Google::Cloud::Dialogflow::C" + + "X::V3beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -235,6 +236,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "DisplayName", + "Description", "EntryFulfillment", "Form", "TransitionRouteGroups", diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinition.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinition.java new file mode 100644 index 000000000000..1e2744ddb4f3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinition.java @@ -0,0 +1,1241 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/parameter_definition.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Defines the properties of a parameter.
+ * Used to define parameters used in the agent and the
+ * input / output parameters for each fulfillment.
+ * (-- Next Id: 4 --)
+ * (-- api-linter: core::0123::resource-annotation=disabled
+ *     aip.dev/not-precedent: ParameterDefinition is not an exposed resource.
+ *     --)
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ParameterDefinition} + */ +public final class ParameterDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) + ParameterDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ParameterDefinition.newBuilder() to construct. + private ParameterDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ParameterDefinition() { + name_ = ""; + type_ = 0; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ParameterDefinition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.class, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder.class); + } + + /** + * + * + *
+   * Parameter types are used for validation.
+   * These types are consistent with [google.protobuf.Value][].
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType} + */ + public enum ParameterType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. No validation will be performed.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + PARAMETER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Represents any string value.
+     * 
+ * + * STRING = 1; + */ + STRING(1), + /** + * + * + *
+     * Represents any number value.
+     * 
+ * + * NUMBER = 2; + */ + NUMBER(2), + /** + * + * + *
+     * Represents a boolean value.
+     * 
+ * + * BOOLEAN = 3; + */ + BOOLEAN(3), + /** + * + * + *
+     * Represents a null value.
+     * 
+ * + * NULL = 4; + */ + NULL(4), + /** + * + * + *
+     * Represents any object value.
+     * 
+ * + * OBJECT = 5; + */ + OBJECT(5), + /** + * + * + *
+     * Represents a repeated value.
+     * 
+ * + * LIST = 6; + */ + LIST(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. No validation will be performed.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + public static final int PARAMETER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Represents any string value.
+     * 
+ * + * STRING = 1; + */ + public static final int STRING_VALUE = 1; + /** + * + * + *
+     * Represents any number value.
+     * 
+ * + * NUMBER = 2; + */ + public static final int NUMBER_VALUE = 2; + /** + * + * + *
+     * Represents a boolean value.
+     * 
+ * + * BOOLEAN = 3; + */ + public static final int BOOLEAN_VALUE = 3; + /** + * + * + *
+     * Represents a null value.
+     * 
+ * + * NULL = 4; + */ + public static final int NULL_VALUE = 4; + /** + * + * + *
+     * Represents any object value.
+     * 
+ * + * OBJECT = 5; + */ + public static final int OBJECT_VALUE = 5; + /** + * + * + *
+     * Represents a repeated value.
+     * 
+ * + * LIST = 6; + */ + public static final int LIST_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ParameterType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ParameterType forNumber(int value) { + switch (value) { + case 0: + return PARAMETER_TYPE_UNSPECIFIED; + case 1: + return STRING; + case 2: + return NUMBER; + case 3: + return BOOLEAN; + case 4: + return NULL; + case 5: + return OBJECT; + case 6: + return LIST; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ParameterType findValueByNumber(int number) { + return ParameterType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ParameterType[] VALUES = values(); + + public static ParameterType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ParameterType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType) + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_ = 0; + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType getType() { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType result = + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType.forNumber(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType + .PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (type_ + != com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType + .PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition other = + (com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) obj; + + if (!getName().equals(other.getName())) return false; + if (type_ != other.type_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines the properties of a parameter.
+   * Used to define parameters used in the agent and the
+   * input / output parameters for each fulfillment.
+   * (-- Next Id: 4 --)
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: ParameterDefinition is not an exposed resource.
+   *     --)
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ParameterDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.class, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + type_ = 0; + description_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition build() { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition result = + new com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of parameter.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType getType() { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType result = + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType.forNumber(type_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of parameter.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Human-readable description of the parameter. Limited to 300 characters.
+     * 
+ * + * string description = 3; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) + private static final com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ParameterDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionOrBuilder.java new file mode 100644 index 000000000000..100446e4e74e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/parameter_definition.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ParameterDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ParameterDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of parameter.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type of parameter.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The type. + */ + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.ParameterType getType(); + + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Human-readable description of the parameter. Limited to 300 characters.
+   * 
+ * + * string description = 3; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionProto.java new file mode 100644 index 000000000000..c5b4dc871d49 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ParameterDefinitionProto.java @@ -0,0 +1,84 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/parameter_definition.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ParameterDefinitionProto { + private ParameterDefinitionProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/dialogflow/cx/v3beta1/par" + + "ameter_definition.proto\022\"google.cloud.di" + + "alogflow.cx.v3beta1\032\037google/api/field_be" + + "havior.proto\"\215\002\n\023ParameterDefinition\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\002\022X\n\004type\030\002 \001(\0162E.google.c" + + "loud.dialogflow.cx.v3beta1.ParameterDefi" + + "nition.ParameterTypeB\003\340A\002\022\023\n\013description" + + "\030\003 \001(\t\"t\n\rParameterType\022\036\n\032PARAMETER_TYP" + + "E_UNSPECIFIED\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER\020\002\022" + + "\013\n\007BOOLEAN\020\003\022\010\n\004NULL\020\004\022\n\n\006OBJECT\020\005\022\010\n\004LI" + + "ST\020\006B\322\001\n&com.google.cloud.dialogflow.cx." + + "v3beta1B\030ParameterDefinitionProtoP\001Z6clo" + + "ud.google.com/go/dialogflow/cx/apiv3beta" + + "1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dialo" + + "gflow.Cx.V3Beta1\352\002&Google::Cloud::Dialog" + + "flow::CX::V3beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ParameterDefinition_descriptor, + new java.lang.String[] { + "Name", "Type", "Description", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java new file mode 100644 index 000000000000..303e55fbf8a9 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Playbook.java @@ -0,0 +1,5966 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Playbook is the basic building block to instruct the LLM how to execute a
+ * certain task.
+ *
+ * A playbook consists of a goal to accomplish, an optional list of step by step
+ * instructions (the step instruction may refers to name of the custom or
+ * default plugin tools to use) to perform the task,
+ * a list of contextual input data to be passed in at the beginning of the
+ * invoked, and a list of output parameters to store the playbook result.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook} + */ +public final class Playbook extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Playbook) + PlaybookOrBuilder { + private static final long serialVersionUID = 0L; + // Use Playbook.newBuilder() to construct. + private Playbook(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Playbook() { + name_ = ""; + displayName_ = ""; + goal_ = ""; + inputParameterDefinitions_ = java.util.Collections.emptyList(); + outputParameterDefinitions_ = java.util.Collections.emptyList(); + steps_ = java.util.Collections.emptyList(); + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Playbook(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder.class); + } + + public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Playbook.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); + + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index); + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder(int index); + + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.InstructionCase getInstructionCase(); + } + /** + * + * + *
+   * Message of single step execution.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook.Step} + */ + public static final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Playbook.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder.class); + } + + private int instructionCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object instruction_; + + public enum InstructionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT(1), + INSTRUCTION_NOT_SET(0); + private final int value; + + private InstructionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstructionCase valueOf(int value) { + return forNumber(value); + } + + public static InstructionCase forNumber(int value) { + switch (value) { + case 1: + return TEXT; + case 0: + return INSTRUCTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public InstructionCase getInstructionCase() { + return InstructionCase.forNumber(instructionCase_); + } + + public static final int TEXT_FIELD_NUMBER = 1; + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + public boolean hasText() { + return instructionCase_ == 1; + } + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (instructionCase_ == 1) { + instruction_ = s; + } + return s; + } + } + /** + * + * + *
+     * Step instruction in text format.
+     * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instructionCase_ == 1) { + instruction_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STEPS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List steps_; + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+     * Sub-processing needed to execute the current step.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + return steps_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (instructionCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instruction_); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instructionCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instruction_); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step other = + (com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step) obj; + + if (!getStepsList().equals(other.getStepsList())) return false; + if (!getInstructionCase().equals(other.getInstructionCase())) return false; + switch (instructionCase_) { + case 1: + if (!getText().equals(other.getText())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + switch (instructionCase_) { + case 1: + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Message of single step execution.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook.Step} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Playbook.Step) + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + instructionCase_ = 0; + instruction_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step build() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step result = + new com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step result) { + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step result) { + result.instructionCase_ = instructionCase_; + result.instruction_ = this.instruction_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()) + return this; + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + switch (other.getInstructionCase()) { + case TEXT: + { + instructionCase_ = 1; + instruction_ = other.instruction_; + onChanged(); + break; + } + case INSTRUCTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + instructionCase_ = 1; + instruction_ = s; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int instructionCase_ = 0; + private java.lang.Object instruction_; + + public InstructionCase getInstructionCase() { + return InstructionCase.forNumber(instructionCase_); + } + + public Builder clearInstruction() { + instructionCase_ = 0; + instruction_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return instructionCase_ == 1; + } + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (instructionCase_ == 1) { + instruction_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = ""; + if (instructionCase_ == 1) { + ref = instruction_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (instructionCase_ == 1) { + instruction_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instructionCase_ = 1; + instruction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @return This builder for chaining. + */ + public Builder clearText() { + if (instructionCase_ == 1) { + instructionCase_ = 0; + instruction_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Step instruction in text format.
+       * 
+ * + * string text = 1; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instructionCase_ = 1; + instruction_ = value; + onChanged(); + return this; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + steps_ = + new java.util.ArrayList(steps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable + values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder getStepsBuilder( + int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder( + int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+       * Sub-processing needed to execute the current step.
+       * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Playbook.Step) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Playbook.Step) + private static final com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOAL_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object goal_ = ""; + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + @java.lang.Override + public java.lang.String getGoal() { + java.lang.Object ref = goal_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goal_ = s; + return s; + } + } + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGoalBytes() { + java.lang.Object ref = goal_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + goal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private java.util.List + inputParameterDefinitions_; + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputParameterDefinitionsList() { + return inputParameterDefinitions_; + } + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getInputParameterDefinitionsOrBuilderList() { + return inputParameterDefinitions_; + } + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getInputParameterDefinitionsCount() { + return inputParameterDefinitions_.size(); + } + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getInputParameterDefinitions( + int index) { + return inputParameterDefinitions_.get(index); + } + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + return inputParameterDefinitions_.get(index); + } + + public static final int OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private java.util.List + outputParameterDefinitions_; + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getOutputParameterDefinitionsList() { + return outputParameterDefinitions_; + } + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getOutputParameterDefinitionsOrBuilderList() { + return outputParameterDefinitions_; + } + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getOutputParameterDefinitionsCount() { + return outputParameterDefinitions_.size(); + } + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getOutputParameterDefinitions( + int index) { + return outputParameterDefinitions_.get(index); + } + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + return outputParameterDefinitions_.get(index); + } + + public static final int STEPS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List steps_; + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + @java.lang.Override + public java.util.List + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + return steps_.get(index); + } + + public static final int TOKEN_COUNT_FIELD_NUMBER = 8; + private long tokenCount_ = 0L; + /** + * + * + *
+   * Output only. Estimated number of tokes current playbook takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int REFERENCED_PLAYBOOKS_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getReferencedPlaybooksList() { + return referencedPlaybooks_; + } + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + public int getReferencedPlaybooksCount() { + return referencedPlaybooks_.size(); + } + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + public java.lang.String getReferencedPlaybooks(int index) { + return referencedPlaybooks_.get(index); + } + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index) { + return referencedPlaybooks_.getByteString(index); + } + + public static final int REFERENCED_FLOWS_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedFlows_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + public com.google.protobuf.ProtocolStringList getReferencedFlowsList() { + return referencedFlows_; + } + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + public int getReferencedFlowsCount() { + return referencedFlows_.size(); + } + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + public java.lang.String getReferencedFlows(int index) { + return referencedFlows_.get(index); + } + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + public com.google.protobuf.ByteString getReferencedFlowsBytes(int index) { + return referencedFlows_.getByteString(index); + } + + public static final int REFERENCED_TOOLS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList referencedTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + public com.google.protobuf.ProtocolStringList getReferencedToolsList() { + return referencedTools_; + } + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + public int getReferencedToolsCount() { + return referencedTools_.size(); + } + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + public java.lang.String getReferencedTools(int index) { + return referencedTools_.get(index); + } + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + public com.google.protobuf.ByteString getReferencedToolsBytes(int index) { + return referencedTools_.getByteString(index); + } + + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 14; + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, goal_); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(4, steps_.get(i)); + } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + output.writeMessage(5, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + output.writeMessage(6, outputParameterDefinitions_.get(i)); + } + if (tokenCount_ != 0L) { + output.writeInt64(8, tokenCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(9, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(10, getUpdateTime()); + } + for (int i = 0; i < referencedPlaybooks_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 11, referencedPlaybooks_.getRaw(i)); + } + for (int i = 0; i < referencedFlows_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, referencedFlows_.getRaw(i)); + } + for (int i = 0; i < referencedTools_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, referencedTools_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(14, getLlmModelSettings()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goal_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, goal_); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, steps_.get(i)); + } + for (int i = 0; i < inputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, inputParameterDefinitions_.get(i)); + } + for (int i = 0; i < outputParameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, outputParameterDefinitions_.get(i)); + } + if (tokenCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, tokenCount_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + { + int dataSize = 0; + for (int i = 0; i < referencedPlaybooks_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedPlaybooks_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedPlaybooksList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < referencedFlows_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedFlows_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedFlowsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < referencedTools_.size(); i++) { + dataSize += computeStringSizeNoTag(referencedTools_.getRaw(i)); + } + size += dataSize; + size += 1 * getReferencedToolsList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLlmModelSettings()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Playbook)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Playbook other = + (com.google.cloud.dialogflow.cx.v3beta1.Playbook) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getGoal().equals(other.getGoal())) return false; + if (!getInputParameterDefinitionsList().equals(other.getInputParameterDefinitionsList())) + return false; + if (!getOutputParameterDefinitionsList().equals(other.getOutputParameterDefinitionsList())) + return false; + if (!getStepsList().equals(other.getStepsList())) return false; + if (getTokenCount() != other.getTokenCount()) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getReferencedPlaybooksList().equals(other.getReferencedPlaybooksList())) return false; + if (!getReferencedFlowsList().equals(other.getReferencedFlowsList())) return false; + if (!getReferencedToolsList().equals(other.getReferencedToolsList())) return false; + if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false; + if (hasLlmModelSettings()) { + if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + GOAL_FIELD_NUMBER; + hash = (53 * hash) + getGoal().hashCode(); + if (getInputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + INPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getInputParameterDefinitionsList().hashCode(); + } + if (getOutputParameterDefinitionsCount() > 0) { + hash = (37 * hash) + OUTPUT_PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParameterDefinitionsList().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (37 * hash) + TOKEN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTokenCount()); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (getReferencedPlaybooksCount() > 0) { + hash = (37 * hash) + REFERENCED_PLAYBOOKS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedPlaybooksList().hashCode(); + } + if (getReferencedFlowsCount() > 0) { + hash = (37 * hash) + REFERENCED_FLOWS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedFlowsList().hashCode(); + } + if (getReferencedToolsCount() > 0) { + hash = (37 * hash) + REFERENCED_TOOLS_FIELD_NUMBER; + hash = (53 * hash) + getReferencedToolsList().hashCode(); + } + if (hasLlmModelSettings()) { + hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getLlmModelSettings().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Playbook is the basic building block to instruct the LLM how to execute a
+   * certain task.
+   *
+   * A playbook consists of a goal to accomplish, an optional list of step by step
+   * instructions (the step instruction may refers to name of the custom or
+   * default plugin tools to use) to perform the task,
+   * a list of contextual input data to be passed in at the beginning of the
+   * invoked, and a list of output parameters to store the playbook result.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Playbook} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Playbook) + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.class, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Playbook.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputParameterDefinitionsFieldBuilder(); + getOutputParameterDefinitionsFieldBuilder(); + getStepsFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getLlmModelSettingsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + goal_ = ""; + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + inputParameterDefinitions_ = null; + inputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + } else { + outputParameterDefinitions_ = null; + outputParameterDefinitionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + } else { + steps_ = null; + stepsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + tokenCount_ = 0L; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook build() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Playbook result = + new com.google.cloud.dialogflow.cx.v3beta1.Playbook(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.Playbook result) { + if (inputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + inputParameterDefinitions_ = + java.util.Collections.unmodifiableList(inputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.inputParameterDefinitions_ = inputParameterDefinitions_; + } else { + result.inputParameterDefinitions_ = inputParameterDefinitionsBuilder_.build(); + } + if (outputParameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + outputParameterDefinitions_ = + java.util.Collections.unmodifiableList(outputParameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.outputParameterDefinitions_ = outputParameterDefinitions_; + } else { + result.outputParameterDefinitions_ = outputParameterDefinitionsBuilder_.build(); + } + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Playbook result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.goal_ = goal_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.tokenCount_ = tokenCount_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000080) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + referencedPlaybooks_.makeImmutable(); + result.referencedPlaybooks_ = referencedPlaybooks_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + referencedFlows_.makeImmutable(); + result.referencedFlows_ = referencedFlows_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + referencedTools_.makeImmutable(); + result.referencedTools_ = referencedTools_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.llmModelSettings_ = + llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Playbook) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Playbook) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Playbook other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getGoal().isEmpty()) { + goal_ = other.goal_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (inputParameterDefinitionsBuilder_ == null) { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitions_.isEmpty()) { + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.addAll(other.inputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.inputParameterDefinitions_.isEmpty()) { + if (inputParameterDefinitionsBuilder_.isEmpty()) { + inputParameterDefinitionsBuilder_.dispose(); + inputParameterDefinitionsBuilder_ = null; + inputParameterDefinitions_ = other.inputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000008); + inputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputParameterDefinitionsFieldBuilder() + : null; + } else { + inputParameterDefinitionsBuilder_.addAllMessages(other.inputParameterDefinitions_); + } + } + } + if (outputParameterDefinitionsBuilder_ == null) { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitions_.isEmpty()) { + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.addAll(other.outputParameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.outputParameterDefinitions_.isEmpty()) { + if (outputParameterDefinitionsBuilder_.isEmpty()) { + outputParameterDefinitionsBuilder_.dispose(); + outputParameterDefinitionsBuilder_ = null; + outputParameterDefinitions_ = other.outputParameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000010); + outputParameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputParameterDefinitionsFieldBuilder() + : null; + } else { + outputParameterDefinitionsBuilder_.addAllMessages(other.outputParameterDefinitions_); + } + } + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000020); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + if (other.getTokenCount() != 0L) { + setTokenCount(other.getTokenCount()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.referencedPlaybooks_.isEmpty()) { + if (referencedPlaybooks_.isEmpty()) { + referencedPlaybooks_ = other.referencedPlaybooks_; + bitField0_ |= 0x00000200; + } else { + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.addAll(other.referencedPlaybooks_); + } + onChanged(); + } + if (!other.referencedFlows_.isEmpty()) { + if (referencedFlows_.isEmpty()) { + referencedFlows_ = other.referencedFlows_; + bitField0_ |= 0x00000400; + } else { + ensureReferencedFlowsIsMutable(); + referencedFlows_.addAll(other.referencedFlows_); + } + onChanged(); + } + if (!other.referencedTools_.isEmpty()) { + if (referencedTools_.isEmpty()) { + referencedTools_ = other.referencedTools_; + bitField0_ |= 0x00000800; + } else { + ensureReferencedToolsIsMutable(); + referencedTools_.addAll(other.referencedTools_); + } + onChanged(); + } + if (other.hasLlmModelSettings()) { + mergeLlmModelSettings(other.getLlmModelSettings()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + goal_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.parser(), + extensionRegistry); + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(m); + } else { + stepsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.parser(), + extensionRegistry); + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(m); + } else { + inputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: + { + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.parser(), + extensionRegistry); + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(m); + } else { + outputParameterDefinitionsBuilder_.addMessage(m); + } + break; + } // case 50 + case 64: + { + tokenCount_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 74: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(s); + break; + } // case 90 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReferencedToolsIsMutable(); + referencedTools_.add(s); + break; + } // case 106 + case 114: + { + input.readMessage( + getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 114 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the playbook, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object goal_ = ""; + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + public java.lang.String getGoal() { + java.lang.Object ref = goal_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goal_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + public com.google.protobuf.ByteString getGoalBytes() { + java.lang.Object ref = goal_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + goal_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The goal to set. + * @return This builder for chaining. + */ + public Builder setGoal(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + goal_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearGoal() { + goal_ = getDefaultInstance().getGoal(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. High level description of the goal the playbook intend to
+     * accomplish.
+     * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for goal to set. + * @return This builder for chaining. + */ + public Builder setGoalBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + goal_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List + inputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureInputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + inputParameterDefinitions_ = + new java.util.ArrayList( + inputParameterDefinitions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + inputParameterDefinitionsBuilder_; + + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsList() { + if (inputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } else { + return inputParameterDefinitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getInputParameterDefinitionsCount() { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.size(); + } else { + return inputParameterDefinitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getInputParameterDefinitions( + int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); + } else { + return inputParameterDefinitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputParameterDefinitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (inputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, value); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputParameterDefinitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllInputParameterDefinitions( + java.lang.Iterable + values) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameterDefinitions_); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputParameterDefinitions() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeInputParameterDefinitions(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + ensureInputParameterDefinitionsIsMutable(); + inputParameterDefinitions_.remove(index); + onChanged(); + } else { + inputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + getInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index) { + if (inputParameterDefinitionsBuilder_ == null) { + return inputParameterDefinitions_.get(index); + } else { + return inputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getInputParameterDefinitionsOrBuilderList() { + if (inputParameterDefinitionsBuilder_ != null) { + return inputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputParameterDefinitions_); + } + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder() { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + addInputParameterDefinitionsBuilder(int index) { + return getInputParameterDefinitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Defined structured input parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputParameterDefinitionsBuilderList() { + return getInputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getInputParameterDefinitionsFieldBuilder() { + if (inputParameterDefinitionsBuilder_ == null) { + inputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder>( + inputParameterDefinitions_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + inputParameterDefinitions_ = null; + } + return inputParameterDefinitionsBuilder_; + } + + private java.util.List + outputParameterDefinitions_ = java.util.Collections.emptyList(); + + private void ensureOutputParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + outputParameterDefinitions_ = + new java.util.ArrayList( + outputParameterDefinitions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + outputParameterDefinitionsBuilder_; + + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsList() { + if (outputParameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } else { + return outputParameterDefinitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getOutputParameterDefinitionsCount() { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.size(); + } else { + return outputParameterDefinitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getOutputParameterDefinitions( + int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputParameterDefinitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition value) { + if (outputParameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, value); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addOutputParameterDefinitions( + int index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder builderForValue) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllOutputParameterDefinitions( + java.lang.Iterable + values) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameterDefinitions_); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputParameterDefinitions() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeOutputParameterDefinitions(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + ensureOutputParameterDefinitionsIsMutable(); + outputParameterDefinitions_.remove(index); + onChanged(); + } else { + outputParameterDefinitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + getOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index) { + if (outputParameterDefinitionsBuilder_ == null) { + return outputParameterDefinitions_.get(index); + } else { + return outputParameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getOutputParameterDefinitionsOrBuilderList() { + if (outputParameterDefinitionsBuilder_ != null) { + return outputParameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputParameterDefinitions_); + } + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder() { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder + addOutputParameterDefinitionsBuilder(int index) { + return getOutputParameterDefinitionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Defined structured output parameters for this playbook.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getOutputParameterDefinitionsBuilderList() { + return getOutputParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder> + getOutputParameterDefinitionsFieldBuilder() { + if (outputParameterDefinitionsBuilder_ == null) { + outputParameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder>( + outputParameterDefinitions_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + outputParameterDefinitions_ = null; + } + return outputParameterDefinitionsBuilder_; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + steps_ = + new java.util.ArrayList(steps_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public java.util.List getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder setSteps(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder setSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder addSteps(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder addSteps(int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder addSteps( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder addSteps( + int index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder addAllSteps( + java.lang.Iterable values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder getStepsBuilder(int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public java.util.List + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder addStepsBuilder(int index) { + return getStepsFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.getDefaultInstance()); + } + /** + * + * + *
+     * Ordered list of step by step execution instructions to accomplish
+     * target goal.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + private long tokenCount_; + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + @java.lang.Override + public long getTokenCount() { + return tokenCount_; + } + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tokenCount to set. + * @return This builder for chaining. + */ + public Builder setTokenCount(long value) { + + tokenCount_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Estimated number of tokes current playbook takes when sent to
+     * the LLM.
+     * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTokenCount() { + bitField0_ = (bitField0_ & ~0x00000040); + tokenCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000080); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp of initial playbook creation.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Last time the playbook version was updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private com.google.protobuf.LazyStringArrayList referencedPlaybooks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedPlaybooksIsMutable() { + if (!referencedPlaybooks_.isModifiable()) { + referencedPlaybooks_ = new com.google.protobuf.LazyStringArrayList(referencedPlaybooks_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + public com.google.protobuf.ProtocolStringList getReferencedPlaybooksList() { + referencedPlaybooks_.makeImmutable(); + return referencedPlaybooks_; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + public int getReferencedPlaybooksCount() { + return referencedPlaybooks_.size(); + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + public java.lang.String getReferencedPlaybooks(int index) { + return referencedPlaybooks_.get(index); + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + public com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index) { + return referencedPlaybooks_.getByteString(index); + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedPlaybooks to set. + * @return This builder for chaining. + */ + public Builder setReferencedPlaybooks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addReferencedPlaybooks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedPlaybooks(java.lang.Iterable values) { + ensureReferencedPlaybooksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedPlaybooks_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedPlaybooks() { + referencedPlaybooks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of other playbooks referenced by the current
+     * playbook in the instructions.
+     * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedPlaybooks to add. + * @return This builder for chaining. + */ + public Builder addReferencedPlaybooksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedPlaybooksIsMutable(); + referencedPlaybooks_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList referencedFlows_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedFlowsIsMutable() { + if (!referencedFlows_.isModifiable()) { + referencedFlows_ = new com.google.protobuf.LazyStringArrayList(referencedFlows_); + } + bitField0_ |= 0x00000400; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + public com.google.protobuf.ProtocolStringList getReferencedFlowsList() { + referencedFlows_.makeImmutable(); + return referencedFlows_; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + public int getReferencedFlowsCount() { + return referencedFlows_.size(); + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + public java.lang.String getReferencedFlows(int index) { + return referencedFlows_.get(index); + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + public com.google.protobuf.ByteString getReferencedFlowsBytes(int index) { + return referencedFlows_.getByteString(index); + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedFlows to set. + * @return This builder for chaining. + */ + public Builder setReferencedFlows(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedFlowsIsMutable(); + referencedFlows_.set(index, value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addReferencedFlows(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedFlows(java.lang.Iterable values) { + ensureReferencedFlowsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedFlows_); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedFlows() { + referencedFlows_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name of flows referenced by the current playbook
+     * in the instructions.
+     * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedFlows to add. + * @return This builder for chaining. + */ + public Builder addReferencedFlowsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedFlowsIsMutable(); + referencedFlows_.add(value); + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList referencedTools_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReferencedToolsIsMutable() { + if (!referencedTools_.isModifiable()) { + referencedTools_ = new com.google.protobuf.LazyStringArrayList(referencedTools_); + } + bitField0_ |= 0x00000800; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + public com.google.protobuf.ProtocolStringList getReferencedToolsList() { + referencedTools_.makeImmutable(); + return referencedTools_; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + public int getReferencedToolsCount() { + return referencedTools_.size(); + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + public java.lang.String getReferencedTools(int index) { + return referencedTools_.get(index); + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + public com.google.protobuf.ByteString getReferencedToolsBytes(int index) { + return referencedTools_.getByteString(index); + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The referencedTools to set. + * @return This builder for chaining. + */ + public Builder setReferencedTools(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedToolsIsMutable(); + referencedTools_.set(index, value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The referencedTools to add. + * @return This builder for chaining. + */ + public Builder addReferencedTools(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReferencedToolsIsMutable(); + referencedTools_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The referencedTools to add. + * @return This builder for chaining. + */ + public Builder addAllReferencedTools(java.lang.Iterable values) { + ensureReferencedToolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, referencedTools_); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearReferencedTools() { + referencedTools_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The resource name of tools referenced by the current playbook in
+     * the instructions. If not provided explicitly, they are will
+     * be implied using the tool being referenced in goal and steps.
+     * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the referencedTools to add. + * @return This builder for chaining. + */ + public Builder addReferencedToolsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReferencedToolsIsMutable(); + referencedTools_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00001000); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder + getLlmModelSettingsBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + /** + * + * + *
+     * Optional. Llm model settings for the playbook.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Playbook) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Playbook) + private static final com.google.cloud.dialogflow.cx.v3beta1.Playbook DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Playbook(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Playbook getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Playbook parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java new file mode 100644 index 000000000000..ba1958dbbba1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInput.java @@ -0,0 +1,1195 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Input of the playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookInput} + */ +public final class PlaybookInput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookInput) + PlaybookInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlaybookInput.newBuilder() to construct. + private PlaybookInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookInput() { + precedingConversationSummary_ = ""; + parameters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder.class); + } + + public static final int PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object precedingConversationSummary_ = ""; + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + @java.lang.Override + public java.lang.String getPrecedingConversationSummary() { + java.lang.Object ref = precedingConversationSummary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + precedingConversationSummary_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrecedingConversationSummaryBytes() { + java.lang.Object ref = precedingConversationSummary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + precedingConversationSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List parameters_; + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( + int index) { + return parameters_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(precedingConversationSummary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, precedingConversationSummary_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(2, parameters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(precedingConversationSummary_)) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 1, precedingConversationSummary_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput other = + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput) obj; + + if (!getPrecedingConversationSummary().equals(other.getPrecedingConversationSummary())) + return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRECEDING_CONVERSATION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getPrecedingConversationSummary().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Input of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookInput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookInput) + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + precedingConversationSummary_ = ""; + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + } else { + parameters_ = null; + parametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput build() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result = + new com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.precedingConversationSummary_ = precedingConversationSummary_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance()) + return this; + if (!other.getPrecedingConversationSummary().isEmpty()) { + precedingConversationSummary_ = other.precedingConversationSummary_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + precedingConversationSummary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(m); + } else { + parametersBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object precedingConversationSummary_ = ""; + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + public java.lang.String getPrecedingConversationSummary() { + java.lang.Object ref = precedingConversationSummary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + precedingConversationSummary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + public com.google.protobuf.ByteString getPrecedingConversationSummaryBytes() { + java.lang.Object ref = precedingConversationSummary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + precedingConversationSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The precedingConversationSummary to set. + * @return This builder for chaining. + */ + public Builder setPrecedingConversationSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + precedingConversationSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPrecedingConversationSummary() { + precedingConversationSummary_ = getDefaultInstance().getPrecedingConversationSummary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Summary string of the preceding conversation for the child
+     * playbook invocation.
+     * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for precedingConversationSummary to set. + * @return This builder for chaining. + */ + public Builder setPrecedingConversationSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + precedingConversationSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameters_ = + new java.util.ArrayList( + parameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllParameters( + java.lang.Iterable + values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getParametersBuilder( + int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder( + int index) { + return getParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of input parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookInput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookInput) + private static final com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java new file mode 100644 index 000000000000..d5f279fe95d7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInputOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface PlaybookInputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.PlaybookInput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The precedingConversationSummary. + */ + java.lang.String getPrecedingConversationSummary(); + /** + * + * + *
+   * Optional. Summary string of the preceding conversation for the child
+   * playbook invocation.
+   * 
+ * + * string preceding_conversation_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for precedingConversationSummary. + */ + com.google.protobuf.ByteString getPrecedingConversationSummaryBytes(); + + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index); + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Optional. A list of input parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocation.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocation.java new file mode 100644 index 000000000000..d17a213fd9ac --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocation.java @@ -0,0 +1,1432 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Stores metadata of the invocation of a child playbook.
+ * Next Id: 5
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation} + */ +public final class PlaybookInvocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) + PlaybookInvocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlaybookInvocation.newBuilder() to construct. + private PlaybookInvocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookInvocation() { + playbook_ = ""; + playbookState_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookInvocation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder.class); + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object playbook_ = ""; + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + @java.lang.Override + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbook_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_INPUT_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbookInput_; + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + @java.lang.Override + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder getPlaybookInputOrBuilder() { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + + public static final int PLAYBOOK_OUTPUT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbookOutput_; + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + @java.lang.Override + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder + getPlaybookOutputOrBuilder() { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + + public static final int PLAYBOOK_STATE_FIELD_NUMBER = 4; + private int playbookState_ = 0; + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + @java.lang.Override + public int getPlaybookStateValue() { + return playbookState_; + } + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getPlaybookState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(playbookState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbook_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getPlaybookOutput()); + } + if (playbookState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, playbookState_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(playbook_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, playbook_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPlaybookInput()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybookOutput()); + } + if (playbookState_ + != com.google.cloud.dialogflow.cx.v3beta1.OutputState.OUTPUT_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, playbookState_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation other = + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) obj; + + if (!getPlaybook().equals(other.getPlaybook())) return false; + if (hasPlaybookInput() != other.hasPlaybookInput()) return false; + if (hasPlaybookInput()) { + if (!getPlaybookInput().equals(other.getPlaybookInput())) return false; + } + if (hasPlaybookOutput() != other.hasPlaybookOutput()) return false; + if (hasPlaybookOutput()) { + if (!getPlaybookOutput().equals(other.getPlaybookOutput())) return false; + } + if (playbookState_ != other.playbookState_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + if (hasPlaybookInput()) { + hash = (37 * hash) + PLAYBOOK_INPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookInput().hashCode(); + } + if (hasPlaybookOutput()) { + hash = (37 * hash) + PLAYBOOK_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getPlaybookOutput().hashCode(); + } + hash = (37 * hash) + PLAYBOOK_STATE_FIELD_NUMBER; + hash = (53 * hash) + playbookState_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stores metadata of the invocation of a child playbook.
+   * Next Id: 5
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookInputFieldBuilder(); + getPlaybookOutputFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = ""; + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + playbookState_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookInvocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation build() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation result = + new com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbook_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.playbookInput_ = + playbookInputBuilder_ == null ? playbookInput_ : playbookInputBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbookOutput_ = + playbookOutputBuilder_ == null ? playbookOutput_ : playbookOutputBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.playbookState_ = playbookState_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation.getDefaultInstance()) + return this; + if (!other.getPlaybook().isEmpty()) { + playbook_ = other.playbook_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPlaybookInput()) { + mergePlaybookInput(other.getPlaybookInput()); + } + if (other.hasPlaybookOutput()) { + mergePlaybookOutput(other.getPlaybookOutput()); + } + if (other.playbookState_ != 0) { + setPlaybookStateValue(other.getPlaybookStateValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + playbook_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getPlaybookInputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + playbookState_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object playbook_ = ""; + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + public java.lang.String getPlaybook() { + java.lang.Object ref = playbook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + playbook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + public com.google.protobuf.ByteString getPlaybookBytes() { + java.lang.Object ref = playbook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + playbook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybook() { + playbook_ = getDefaultInstance().getPlaybook(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The unique identifier of the playbook.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for playbook to set. + * @return This builder for chaining. + */ + public Builder setPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + playbook_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbookInput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder> + playbookInputBuilder_; + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + public boolean hasPlaybookInput() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput() { + if (playbookInputBuilder_ == null) { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } else { + return playbookInputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookInput_ = value; + } else { + playbookInputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookInput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder builderForValue) { + if (playbookInputBuilder_ == null) { + playbookInput_ = builderForValue.build(); + } else { + playbookInputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookInput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput value) { + if (playbookInputBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && playbookInput_ != null + && playbookInput_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance()) { + getPlaybookInputBuilder().mergeFrom(value); + } else { + playbookInput_ = value; + } + } else { + playbookInputBuilder_.mergeFrom(value); + } + if (playbookInput_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookInput() { + bitField0_ = (bitField0_ & ~0x00000002); + playbookInput_ = null; + if (playbookInputBuilder_ != null) { + playbookInputBuilder_.dispose(); + playbookInputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder getPlaybookInputBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPlaybookInputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder + getPlaybookInputOrBuilder() { + if (playbookInputBuilder_ != null) { + return playbookInputBuilder_.getMessageOrBuilder(); + } else { + return playbookInput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.getDefaultInstance() + : playbookInput_; + } + } + /** + * + * + *
+     * Optional. Input of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder> + getPlaybookInputFieldBuilder() { + if (playbookInputBuilder_ == null) { + playbookInputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder>( + getPlaybookInput(), getParentForChildren(), isClean()); + playbookInput_ = null; + } + return playbookInputBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbookOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder> + playbookOutputBuilder_; + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + public boolean hasPlaybookOutput() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput() { + if (playbookOutputBuilder_ == null) { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } else { + return playbookOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbookOutput_ = value; + } else { + playbookOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPlaybookOutput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder builderForValue) { + if (playbookOutputBuilder_ == null) { + playbookOutput_ = builderForValue.build(); + } else { + playbookOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePlaybookOutput( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput value) { + if (playbookOutputBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbookOutput_ != null + && playbookOutput_ + != com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance()) { + getPlaybookOutputBuilder().mergeFrom(value); + } else { + playbookOutput_ = value; + } + } else { + playbookOutputBuilder_.mergeFrom(value); + } + if (playbookOutput_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPlaybookOutput() { + bitField0_ = (bitField0_ & ~0x00000004); + playbookOutput_ = null; + if (playbookOutputBuilder_ != null) { + playbookOutputBuilder_.dispose(); + playbookOutputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder + getPlaybookOutputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder + getPlaybookOutputOrBuilder() { + if (playbookOutputBuilder_ != null) { + return playbookOutputBuilder_.getMessageOrBuilder(); + } else { + return playbookOutput_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance() + : playbookOutput_; + } + } + /** + * + * + *
+     * Optional. Output of the child playbook invocation.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder> + getPlaybookOutputFieldBuilder() { + if (playbookOutputBuilder_ == null) { + playbookOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder>( + getPlaybookOutput(), getParentForChildren(), isClean()); + playbookOutput_ = null; + } + return playbookOutputBuilder_; + } + + private int playbookState_ = 0; + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + @java.lang.Override + public int getPlaybookStateValue() { + return playbookState_; + } + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for playbookState to set. + * @return This builder for chaining. + */ + public Builder setPlaybookStateValue(int value) { + playbookState_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.OutputState getPlaybookState() { + com.google.cloud.dialogflow.cx.v3beta1.OutputState result = + com.google.cloud.dialogflow.cx.v3beta1.OutputState.forNumber(playbookState_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.OutputState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The playbookState to set. + * @return This builder for chaining. + */ + public Builder setPlaybookState(com.google.cloud.dialogflow.cx.v3beta1.OutputState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + playbookState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Playbook invocation's output state.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPlaybookState() { + bitField0_ = (bitField0_ & ~0x00000008); + playbookState_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) + private static final com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookInvocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocationOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocationOrBuilder.java new file mode 100644 index 000000000000..0a143bd6bda4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookInvocationOrBuilder.java @@ -0,0 +1,170 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface PlaybookInvocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.PlaybookInvocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The playbook. + */ + java.lang.String getPlaybook(); + /** + * + * + *
+   * Required. The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string playbook = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for playbook. + */ + com.google.protobuf.ByteString getPlaybookBytes(); + + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookInput field is set. + */ + boolean hasPlaybookInput(); + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookInput. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInput getPlaybookInput(); + /** + * + * + *
+   * Optional. Input of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookInput playbook_input = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookInputOrBuilder getPlaybookInputOrBuilder(); + + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the playbookOutput field is set. + */ + boolean hasPlaybookOutput(); + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The playbookOutput. + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getPlaybookOutput(); + /** + * + * + *
+   * Optional. Output of the child playbook invocation.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.PlaybookOutput playbook_output = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder getPlaybookOutputOrBuilder(); + + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for playbookState. + */ + int getPlaybookStateValue(); + /** + * + * + *
+   * Required. Playbook invocation's output state.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.OutputState playbook_state = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbookState. + */ + com.google.cloud.dialogflow.cx.v3beta1.OutputState getPlaybookState(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookName.java new file mode 100644 index 000000000000..4af629cec4b1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PlaybookName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + + @Deprecated + protected PlaybookName() { + project = null; + location = null; + agent = null; + playbook = null; + } + + private PlaybookName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PlaybookName of(String project, String location, String agent, String playbook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .build(); + } + + public static String format(String project, String location, String agent, String playbook) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .build() + .toString(); + } + + public static PlaybookName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK.validatedMatch( + formattedString, "PlaybookName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PlaybookName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK.instantiate( + "project", project, "location", location, "agent", agent, "playbook", playbook); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PlaybookName that = ((PlaybookName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + private Builder(PlaybookName playbookName) { + this.project = playbookName.project; + this.location = playbookName.location; + this.agent = playbookName.agent; + this.playbook = playbookName.playbook; + } + + public PlaybookName build() { + return new PlaybookName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java new file mode 100644 index 000000000000..d2766a6393c1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOrBuilder.java @@ -0,0 +1,618 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface PlaybookOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Playbook) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the playbook.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the playbook, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The goal. + */ + java.lang.String getGoal(); + /** + * + * + *
+   * Required. High level description of the goal the playbook intend to
+   * accomplish.
+   * 
+ * + * string goal = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for goal. + */ + com.google.protobuf.ByteString getGoalBytes(); + + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsList(); + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getInputParameterDefinitions( + int index); + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getInputParameterDefinitionsCount(); + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getInputParameterDefinitionsOrBuilderList(); + /** + * + * + *
+   * Optional. Defined structured input parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition input_parameter_definitions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getInputParameterDefinitionsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsList(); + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinition getOutputParameterDefinitions( + int index); + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getOutputParameterDefinitionsCount(); + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getOutputParameterDefinitionsOrBuilderList(); + /** + * + * + *
+   * Optional. Defined structured output parameters for this playbook.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ParameterDefinition output_parameter_definitions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ParameterDefinitionOrBuilder + getOutputParameterDefinitionsOrBuilder(int index); + + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + java.util.List getStepsList(); + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Step getSteps(int index); + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + int getStepsCount(); + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+   * Ordered list of step by step execution instructions to accomplish
+   * target goal.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.Playbook.Step steps = 4; + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook.StepOrBuilder getStepsOrBuilder(int index); + + /** + * + * + *
+   * Output only. Estimated number of tokes current playbook takes when sent to
+   * the LLM.
+   * 
+ * + * int64 token_count = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tokenCount. + */ + long getTokenCount(); + + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The timestamp of initial playbook creation.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Last time the playbook version was updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedPlaybooks. + */ + java.util.List getReferencedPlaybooksList(); + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedPlaybooks. + */ + int getReferencedPlaybooksCount(); + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedPlaybooks at the given index. + */ + java.lang.String getReferencedPlaybooks(int index); + /** + * + * + *
+   * Output only. The resource name of other playbooks referenced by the current
+   * playbook in the instructions.
+   * 
+ * + * + * repeated string referenced_playbooks = 11 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedPlaybooks at the given index. + */ + com.google.protobuf.ByteString getReferencedPlaybooksBytes(int index); + + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedFlows. + */ + java.util.List getReferencedFlowsList(); + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedFlows. + */ + int getReferencedFlowsCount(); + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedFlows at the given index. + */ + java.lang.String getReferencedFlows(int index); + /** + * + * + *
+   * Output only. The resource name of flows referenced by the current playbook
+   * in the instructions.
+   * 
+ * + * + * repeated string referenced_flows = 12 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedFlows at the given index. + */ + com.google.protobuf.ByteString getReferencedFlowsBytes(int index); + + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the referencedTools. + */ + java.util.List getReferencedToolsList(); + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of referencedTools. + */ + int getReferencedToolsCount(); + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The referencedTools at the given index. + */ + java.lang.String getReferencedTools(int index); + /** + * + * + *
+   * Optional. The resource name of tools referenced by the current playbook in
+   * the instructions. If not provided explicitly, they are will
+   * be implied using the tool being referenced in goal and steps.
+   * 
+ * + * + * repeated string referenced_tools = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the referencedTools at the given index. + */ + com.google.protobuf.ByteString getReferencedToolsBytes(int index); + + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings(); + /** + * + * + *
+   * Optional. Llm model settings for the playbook.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java new file mode 100644 index 000000000000..388d24d36544 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutput.java @@ -0,0 +1,1179 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * Output of the playbook.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookOutput} + */ +public final class PlaybookOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) + PlaybookOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlaybookOutput.newBuilder() to construct. + private PlaybookOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookOutput() { + executionSummary_ = ""; + parameters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookOutput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder.class); + } + + public static final int EXECUTION_SUMMARY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object executionSummary_ = ""; + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + @java.lang.Override + public java.lang.String getExecutionSummary() { + java.lang.Object ref = executionSummary_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionSummary_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExecutionSummaryBytes() { + java.lang.Object ref = executionSummary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List parameters_; + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( + int index) { + return parameters_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionSummary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, executionSummary_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(3, parameters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(executionSummary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, executionSummary_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parameters_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput other = + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) obj; + + if (!getExecutionSummary().equals(other.getExecutionSummary())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXECUTION_SUMMARY_FIELD_NUMBER; + hash = (53 * hash) + getExecutionSummary().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Output of the playbook.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + executionSummary_ = ""; + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + } else { + parameters_ = null; + parametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput build() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result = + new com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.executionSummary_ = executionSummary_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput.getDefaultInstance()) + return this; + if (!other.getExecutionSummary().isEmpty()) { + executionSummary_ = other.executionSummary_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + executionSummary_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 26: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(m); + } else { + parametersBuilder_.addMessage(m); + } + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object executionSummary_ = ""; + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + public java.lang.String getExecutionSummary() { + java.lang.Object ref = executionSummary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + executionSummary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + public com.google.protobuf.ByteString getExecutionSummaryBytes() { + java.lang.Object ref = executionSummary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + executionSummary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The executionSummary to set. + * @return This builder for chaining. + */ + public Builder setExecutionSummary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + executionSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExecutionSummary() { + executionSummary_ = getDefaultInstance().getExecutionSummary(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Summary string of the execution result of the child playbook.
+     * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for executionSummary to set. + * @return This builder for chaining. + */ + public Builder setExecutionSummaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + executionSummary_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameters_ = + new java.util.ArrayList( + parameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllParameters( + java.lang.Iterable + values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getParametersBuilder( + int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder( + int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addParametersBuilder( + int index) { + return getParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. A list of output parameters for the invocation.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) + private static final com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookOutput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java new file mode 100644 index 000000000000..de1a4d839b15 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookOutputOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface PlaybookOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.PlaybookOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The executionSummary. + */ + java.lang.String getExecutionSummary(); + /** + * + * + *
+   * Optional. Summary string of the execution result of the child playbook.
+   * 
+ * + * string execution_summary = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for executionSummary. + */ + com.google.protobuf.ByteString getExecutionSummaryBytes(); + + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getParameters(int index); + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Optional. A list of output parameters for the invocation.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getParametersOrBuilder(int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java new file mode 100644 index 000000000000..fafb99a7b1a4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookProto.java @@ -0,0 +1,401 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class PlaybookProto { + private PlaybookProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybooksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Playbook_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreatePlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetPlaybookVersionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListPlaybookVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeletePlaybookVersionRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/dialogflow/cx/v3beta1/pla" + + "ybook.proto\022\"google.cloud.dialogflow.cx." + + "v3beta1\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\031google/api/resource.pro" + + "to\0320google/cloud/dialogflow/cx/v3beta1/e" + + "xample.proto\032 + * Playbook version is a snapshot of the playbook at certain timestamp. + *
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookVersion} + */ +public final class PlaybookVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) + PlaybookVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlaybookVersion.newBuilder() to construct. + private PlaybookVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PlaybookVersion() { + name_ = ""; + description_ = ""; + examples_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PlaybookVersion(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLAYBOOK_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + + public static final int EXAMPLES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List examples_; + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getExamplesList() { + return examples_; + } + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getExamplesOrBuilderList() { + return examples_; + } + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getExamplesCount() { + return examples_.size(); + } + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index) { + return examples_.get(index); + } + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + return examples_.get(index); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getPlaybook()); + } + for (int i = 0; i < examples_.size(); i++) { + output.writeMessage(4, examples_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(5, getUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPlaybook()); + } + for (int i = 0; i < examples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, examples_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion other = + (com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) return false; + } + if (!getExamplesList().equals(other.getExamplesList())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + if (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Playbook version is a snapshot of the playbook at certain timestamp.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.PlaybookVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.class, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + getExamplesFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + description_ = ""; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + } else { + examples_ = null; + examplesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_PlaybookVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion build() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion result = + new com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion result) { + if (examplesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.examples_ = examples_; + } else { + result.examples_ = examplesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + if (examplesBuilder_ == null) { + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + onChanged(); + } + } else { + if (!other.examples_.isEmpty()) { + if (examplesBuilder_.isEmpty()) { + examplesBuilder_.dispose(); + examplesBuilder_ = null; + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000008); + examplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExamplesFieldBuilder() + : null; + } else { + examplesBuilder_.addAllMessages(other.examples_); + } + } + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.Example m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Example.parser(), extensionRegistry); + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(m); + } else { + examplesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the playbook version.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The description of the playbook version.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + playbookBuilder_; + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000004); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + } + /** + * + * + *
+     * Output only. Snapshot of the playbook when the playbook version is created.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + private java.util.List examples_ = + java.util.Collections.emptyList(); + + private void ensureExamplesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + examples_ = + new java.util.ArrayList(examples_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + examplesBuilder_; + + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getExamplesList() { + if (examplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(examples_); + } else { + return examplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getExamplesCount() { + if (examplesBuilder_ == null) { + return examples_.size(); + } else { + return examplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExamples(int index, com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + onChanged(); + } else { + examplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExamples( + int index, com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.set(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + onChanged(); + } else { + examplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples(int index, com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(index, value); + onChanged(); + } else { + examplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples( + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addExamples( + int index, com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllExamples( + java.lang.Iterable values) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + onChanged(); + } else { + examplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExamples() { + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + examplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeExamples(int index) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.remove(index); + onChanged(); + } else { + examplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder getExamplesBuilder(int index) { + return getExamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getExamplesOrBuilderList() { + if (examplesBuilder_ != null) { + return examplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(examples_); + } + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder addExamplesBuilder() { + return getExamplesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder addExamplesBuilder(int index) { + return getExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Snapshot of the examples belonging to the playbook when the
+     * playbook version is created.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getExamplesBuilderList() { + return getExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + getExamplesFieldBuilder() { + if (examplesBuilder_ == null) { + examplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder>( + examples_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + examples_ = null; + } + return examplesBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000010); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Last time the playbook version was created or modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) + private static final com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlaybookVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionName.java new file mode 100644 index 000000000000..27be37b0bbde --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionName.java @@ -0,0 +1,298 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class PlaybookVersionName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String playbook; + private final String version; + + @Deprecated + protected PlaybookVersionName() { + project = null; + location = null; + agent = null; + playbook = null; + version = null; + } + + private PlaybookVersionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + playbook = Preconditions.checkNotNull(builder.getPlaybook()); + version = Preconditions.checkNotNull(builder.getVersion()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getVersion() { + return version; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PlaybookVersionName of( + String project, String location, String agent, String playbook, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setVersion(version) + .build(); + } + + public static String format( + String project, String location, String agent, String playbook, String version) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setPlaybook(playbook) + .setVersion(version) + .build() + .toString(); + } + + public static PlaybookVersionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.validatedMatch( + formattedString, "PlaybookVersionName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("playbook"), + matchMap.get("version")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (PlaybookVersionName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (playbook != null) { + fieldMapBuilder.put("playbook", playbook); + } + if (version != null) { + fieldMapBuilder.put("version", version); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_PLAYBOOK_VERSION.instantiate( + "project", + project, + "location", + location, + "agent", + agent, + "playbook", + playbook, + "version", + version); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + PlaybookVersionName that = ((PlaybookVersionName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.playbook, that.playbook) + && Objects.equals(this.version, that.version); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(playbook); + h *= 1000003; + h ^= Objects.hashCode(version); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}. + */ + public static class Builder { + private String project; + private String location; + private String agent; + private String playbook; + private String version; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getPlaybook() { + return playbook; + } + + public String getVersion() { + return version; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setPlaybook(String playbook) { + this.playbook = playbook; + return this; + } + + public Builder setVersion(String version) { + this.version = version; + return this; + } + + private Builder(PlaybookVersionName playbookVersionName) { + this.project = playbookVersionName.project; + this.location = playbookVersionName.location; + this.agent = playbookVersionName.agent; + this.playbook = playbookVersionName.playbook; + this.version = playbookVersionName.version; + } + + public PlaybookVersionName build() { + return new PlaybookVersionName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionOrBuilder.java new file mode 100644 index 000000000000..a3c3f05a6c56 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/PlaybookVersionOrBuilder.java @@ -0,0 +1,226 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface PlaybookVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.PlaybookVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the playbook version.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>/versions/<Version ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The description of the playbook version.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook(); + /** + * + * + *
+   * Output only. Snapshot of the playbook when the playbook version is created.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder(); + + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getExamplesList(); + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Example getExamples(int index); + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getExamplesCount(); + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getExamplesOrBuilderList(); + /** + * + * + *
+   * Output only. Snapshot of the examples belonging to the playbook when the
+   * playbook version is created.
+   * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Example examples = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExamplesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Last time the playbook version was created or modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java index 535af0f34076..9599097a28cb 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInput.java @@ -34,6 +34,8 @@ * 4. An event to be triggered. * * 5. DTMF digits to invoke an intent and fill in parameter value. + * + * 6. The results of a tool executed by the client. *
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.QueryInput} @@ -87,6 +89,7 @@ public enum InputCase AUDIO(5), EVENT(6), DTMF(7), + TOOL_CALL_RESULT(11), INPUT_NOT_SET(0); private final int value; @@ -115,6 +118,8 @@ public static InputCase forNumber(int value) { return EVENT; case 7: return DTMF; + case 11: + return TOOL_CALL_RESULT; case 0: return INPUT_NOT_SET; default: @@ -386,6 +391,58 @@ public com.google.cloud.dialogflow.cx.v3beta1.DtmfInputOrBuilder getDtmfOrBuilde return com.google.cloud.dialogflow.cx.v3beta1.DtmfInput.getDefaultInstance(); } + public static final int TOOL_CALL_RESULT_FIELD_NUMBER = 11; + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + @java.lang.Override + public boolean hasToolCallResult() { + return inputCase_ == 11; + } + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getToolCallResult() { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder + getToolCallResultOrBuilder() { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; @SuppressWarnings("serial") @@ -475,6 +532,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (inputCase_ == 7) { output.writeMessage(7, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) input_); } + if (inputCase_ == 11) { + output.writeMessage(11, (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_); + } getUnknownFields().writeTo(output); } @@ -512,6 +572,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) input_); } + if (inputCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -546,6 +611,9 @@ public boolean equals(final java.lang.Object obj) { case 7: if (!getDtmf().equals(other.getDtmf())) return false; break; + case 11: + if (!getToolCallResult().equals(other.getToolCallResult())) return false; + break; case 0: default: } @@ -583,6 +651,10 @@ public int hashCode() { hash = (37 * hash) + DTMF_FIELD_NUMBER; hash = (53 * hash) + getDtmf().hashCode(); break; + case 11: + hash = (37 * hash) + TOOL_CALL_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getToolCallResult().hashCode(); + break; case 0: default: } @@ -701,6 +773,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * 4. An event to be triggered. * * 5. DTMF digits to invoke an intent and fill in parameter value. + * + * 6. The results of a tool executed by the client. *
* * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.QueryInput} @@ -750,6 +824,9 @@ public Builder clear() { if (dtmfBuilder_ != null) { dtmfBuilder_.clear(); } + if (toolCallResultBuilder_ != null) { + toolCallResultBuilder_.clear(); + } languageCode_ = ""; inputCase_ = 0; input_ = null; @@ -790,7 +867,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.QueryInput buildPartial() { private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryInput result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.languageCode_ = languageCode_; } } @@ -813,6 +890,9 @@ private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.QueryInpu if (inputCase_ == 7 && dtmfBuilder_ != null) { result.input_ = dtmfBuilder_.build(); } + if (inputCase_ == 11 && toolCallResultBuilder_ != null) { + result.input_ = toolCallResultBuilder_.build(); + } } @java.lang.Override @@ -863,7 +943,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryInput other return this; if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); } switch (other.getInputCase()) { @@ -892,6 +972,11 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryInput other mergeDtmf(other.getDtmf()); break; } + case TOOL_CALL_RESULT: + { + mergeToolCallResult(other.getToolCallResult()); + break; + } case INPUT_NOT_SET: { break; @@ -938,7 +1023,7 @@ public Builder mergeFrom( case 34: { languageCode_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 34 case 42: @@ -959,6 +1044,12 @@ public Builder mergeFrom( inputCase_ = 7; break; } // case 58 + case 90: + { + input.readMessage(getToolCallResultFieldBuilder().getBuilder(), extensionRegistry); + inputCase_ = 11; + break; + } // case 90 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2037,6 +2128,219 @@ public com.google.cloud.dialogflow.cx.v3beta1.DtmfInputOrBuilder getDtmfOrBuilde return dtmfBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder> + toolCallResultBuilder_; + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + @java.lang.Override + public boolean hasToolCallResult() { + return inputCase_ == 11; + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getToolCallResult() { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } else { + if (inputCase_ == 11) { + return toolCallResultBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + public Builder setToolCallResult(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult value) { + if (toolCallResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + input_ = value; + onChanged(); + } else { + toolCallResultBuilder_.setMessage(value); + } + inputCase_ = 11; + return this; + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + public Builder setToolCallResult( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder builderForValue) { + if (toolCallResultBuilder_ == null) { + input_ = builderForValue.build(); + onChanged(); + } else { + toolCallResultBuilder_.setMessage(builderForValue.build()); + } + inputCase_ = 11; + return this; + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + public Builder mergeToolCallResult( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult value) { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11 + && input_ + != com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance()) { + input_ = + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_) + .mergeFrom(value) + .buildPartial(); + } else { + input_ = value; + } + onChanged(); + } else { + if (inputCase_ == 11) { + toolCallResultBuilder_.mergeFrom(value); + } else { + toolCallResultBuilder_.setMessage(value); + } + } + inputCase_ = 11; + return this; + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + public Builder clearToolCallResult() { + if (toolCallResultBuilder_ == null) { + if (inputCase_ == 11) { + inputCase_ = 0; + input_ = null; + onChanged(); + } + } else { + if (inputCase_ == 11) { + inputCase_ = 0; + input_ = null; + } + toolCallResultBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder + getToolCallResultBuilder() { + return getToolCallResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder + getToolCallResultOrBuilder() { + if ((inputCase_ == 11) && (toolCallResultBuilder_ != null)) { + return toolCallResultBuilder_.getMessageOrBuilder(); + } else { + if (inputCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + } + /** + * + * + *
+     * The results of a tool executed by the client.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder> + getToolCallResultFieldBuilder() { + if (toolCallResultBuilder_ == null) { + if (!(inputCase_ == 11)) { + input_ = com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + toolCallResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) input_, + getParentForChildren(), + isClean()); + input_ = null; + } + inputCase_ = 11; + onChanged(); + return toolCallResultBuilder_; + } + private java.lang.Object languageCode_ = ""; /** * @@ -2108,7 +2412,7 @@ public Builder setLanguageCode(java.lang.String value) { throw new NullPointerException(); } languageCode_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2128,7 +2432,7 @@ public Builder setLanguageCode(java.lang.String value) { */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -2153,7 +2457,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); languageCode_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInputOrBuilder.java index aa99561edb74..4b224ec19041 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryInputOrBuilder.java @@ -199,6 +199,41 @@ public interface QueryInputOrBuilder */ com.google.cloud.dialogflow.cx.v3beta1.DtmfInputOrBuilder getDtmfOrBuilder(); + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return Whether the toolCallResult field is set. + */ + boolean hasToolCallResult(); + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + * + * @return The toolCallResult. + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getToolCallResult(); + /** + * + * + *
+   * The results of a tool executed by the client.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder getToolCallResultOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java index a5e46412aada..15de1e93ae0d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParameters.java @@ -43,6 +43,7 @@ private QueryParameters() { sessionEntityTypes_ = java.util.Collections.emptyList(); currentPage_ = ""; flowVersions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + currentPlaybook_ = ""; channel_ = ""; } @@ -797,6 +798,130 @@ public com.google.protobuf.ByteString getFlowVersionsBytes(int index) { return flowVersions_.getByteString(index); } + public static final int CURRENT_PLAYBOOK_FIELD_NUMBER = 19; + + @SuppressWarnings("serial") + private volatile java.lang.Object currentPlaybook_ = ""; + /** + * + * + *
+   * Optional. Start the session with the specified
+   * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+   * specify the playbook at the beginning of the session. Otherwise, an error
+   * will be thrown.
+   *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + @java.lang.Override + public java.lang.String getCurrentPlaybook() { + java.lang.Object ref = currentPlaybook_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentPlaybook_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Start the session with the specified
+   * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+   * specify the playbook at the beginning of the session. Otherwise, an error
+   * will be thrown.
+   *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentPlaybookBytes() { + java.lang.Object ref = currentPlaybook_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LLM_MODEL_SETTINGS_FIELD_NUMBER = 21; + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + @java.lang.Override + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + public static final int CHANNEL_FIELD_NUMBER = 15; @SuppressWarnings("serial") @@ -878,7 +1003,7 @@ public com.google.protobuf.ByteString getChannelBytes() { * * *
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -891,13 +1016,13 @@ public com.google.protobuf.ByteString getChannelBytes() {
    */
   @java.lang.Override
   public boolean hasSessionTtl() {
-    return ((bitField0_ & 0x00000008) != 0);
+    return ((bitField0_ & 0x00000010) != 0);
   }
   /**
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -916,7 +1041,7 @@ public com.google.protobuf.Duration getSessionTtl() {
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -962,7 +1087,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() {
    */
   @java.lang.Override
   public boolean hasEndUserMetadata() {
-    return ((bitField0_ & 0x00000010) != 0);
+    return ((bitField0_ & 0x00000020) != 0);
   }
   /**
    *
@@ -1048,7 +1173,7 @@ public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() {
    */
   @java.lang.Override
   public boolean hasSearchConfig() {
-    return ((bitField0_ & 0x00000020) != 0);
+    return ((bitField0_ & 0x00000040) != 0);
   }
   /**
    *
@@ -1133,15 +1258,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 15, channel_);
     }
-    if (((bitField0_ & 0x00000008) != 0)) {
+    if (((bitField0_ & 0x00000010) != 0)) {
       output.writeMessage(16, getSessionTtl());
     }
-    if (((bitField0_ & 0x00000010) != 0)) {
+    if (((bitField0_ & 0x00000020) != 0)) {
       output.writeMessage(18, getEndUserMetadata());
     }
-    if (((bitField0_ & 0x00000020) != 0)) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentPlaybook_)) {
+      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, currentPlaybook_);
+    }
+    if (((bitField0_ & 0x00000040) != 0)) {
       output.writeMessage(20, getSearchConfig());
     }
+    if (((bitField0_ & 0x00000008) != 0)) {
+      output.writeMessage(21, getLlmModelSettings());
+    }
     getUnknownFields().writeTo(output);
   }
 
@@ -1197,15 +1328,21 @@ public int getSerializedSize() {
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channel_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, channel_);
     }
-    if (((bitField0_ & 0x00000008) != 0)) {
+    if (((bitField0_ & 0x00000010) != 0)) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getSessionTtl());
     }
-    if (((bitField0_ & 0x00000010) != 0)) {
+    if (((bitField0_ & 0x00000020) != 0)) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getEndUserMetadata());
     }
-    if (((bitField0_ & 0x00000020) != 0)) {
+    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentPlaybook_)) {
+      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, currentPlaybook_);
+    }
+    if (((bitField0_ & 0x00000040) != 0)) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, getSearchConfig());
     }
+    if (((bitField0_ & 0x00000008) != 0)) {
+      size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getLlmModelSettings());
+    }
     size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
@@ -1241,6 +1378,11 @@ public boolean equals(final java.lang.Object obj) {
     if (getAnalyzeQueryTextSentiment() != other.getAnalyzeQueryTextSentiment()) return false;
     if (!internalGetWebhookHeaders().equals(other.internalGetWebhookHeaders())) return false;
     if (!getFlowVersionsList().equals(other.getFlowVersionsList())) return false;
+    if (!getCurrentPlaybook().equals(other.getCurrentPlaybook())) return false;
+    if (hasLlmModelSettings() != other.hasLlmModelSettings()) return false;
+    if (hasLlmModelSettings()) {
+      if (!getLlmModelSettings().equals(other.getLlmModelSettings())) return false;
+    }
     if (!getChannel().equals(other.getChannel())) return false;
     if (hasSessionTtl() != other.hasSessionTtl()) return false;
     if (hasSessionTtl()) {
@@ -1297,6 +1439,12 @@ public int hashCode() {
       hash = (37 * hash) + FLOW_VERSIONS_FIELD_NUMBER;
       hash = (53 * hash) + getFlowVersionsList().hashCode();
     }
+    hash = (37 * hash) + CURRENT_PLAYBOOK_FIELD_NUMBER;
+    hash = (53 * hash) + getCurrentPlaybook().hashCode();
+    if (hasLlmModelSettings()) {
+      hash = (37 * hash) + LLM_MODEL_SETTINGS_FIELD_NUMBER;
+      hash = (53 * hash) + getLlmModelSettings().hashCode();
+    }
     hash = (37 * hash) + CHANNEL_FIELD_NUMBER;
     hash = (53 * hash) + getChannel().hashCode();
     if (hasSessionTtl()) {
@@ -1478,6 +1626,7 @@ private void maybeForceBuilderInitialization() {
         getSessionEntityTypesFieldBuilder();
         getPayloadFieldBuilder();
         getParametersFieldBuilder();
+        getLlmModelSettingsFieldBuilder();
         getSessionTtlFieldBuilder();
         getEndUserMetadataFieldBuilder();
         getSearchConfigFieldBuilder();
@@ -1516,6 +1665,12 @@ public Builder clear() {
       analyzeQueryTextSentiment_ = false;
       internalGetMutableWebhookHeaders().clear();
       flowVersions_ = com.google.protobuf.LazyStringArrayList.emptyList();
+      currentPlaybook_ = "";
+      llmModelSettings_ = null;
+      if (llmModelSettingsBuilder_ != null) {
+        llmModelSettingsBuilder_.dispose();
+        llmModelSettingsBuilder_ = null;
+      }
       channel_ = "";
       sessionTtl_ = null;
       if (sessionTtlBuilder_ != null) {
@@ -1617,21 +1772,29 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryParameter
         result.flowVersions_ = flowVersions_;
       }
       if (((from_bitField0_ & 0x00000400) != 0)) {
-        result.channel_ = channel_;
+        result.currentPlaybook_ = currentPlaybook_;
       }
       if (((from_bitField0_ & 0x00000800) != 0)) {
-        result.sessionTtl_ = sessionTtlBuilder_ == null ? sessionTtl_ : sessionTtlBuilder_.build();
+        result.llmModelSettings_ =
+            llmModelSettingsBuilder_ == null ? llmModelSettings_ : llmModelSettingsBuilder_.build();
         to_bitField0_ |= 0x00000008;
       }
       if (((from_bitField0_ & 0x00001000) != 0)) {
+        result.channel_ = channel_;
+      }
+      if (((from_bitField0_ & 0x00002000) != 0)) {
+        result.sessionTtl_ = sessionTtlBuilder_ == null ? sessionTtl_ : sessionTtlBuilder_.build();
+        to_bitField0_ |= 0x00000010;
+      }
+      if (((from_bitField0_ & 0x00004000) != 0)) {
         result.endUserMetadata_ =
             endUserMetadataBuilder_ == null ? endUserMetadata_ : endUserMetadataBuilder_.build();
-        to_bitField0_ |= 0x00000010;
+        to_bitField0_ |= 0x00000020;
       }
-      if (((from_bitField0_ & 0x00002000) != 0)) {
+      if (((from_bitField0_ & 0x00008000) != 0)) {
         result.searchConfig_ =
             searchConfigBuilder_ == null ? searchConfig_ : searchConfigBuilder_.build();
-        to_bitField0_ |= 0x00000020;
+        to_bitField0_ |= 0x00000040;
       }
       result.bitField0_ |= to_bitField0_;
     }
@@ -1746,9 +1909,17 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryParameters
         }
         onChanged();
       }
+      if (!other.getCurrentPlaybook().isEmpty()) {
+        currentPlaybook_ = other.currentPlaybook_;
+        bitField0_ |= 0x00000400;
+        onChanged();
+      }
+      if (other.hasLlmModelSettings()) {
+        mergeLlmModelSettings(other.getLlmModelSettings());
+      }
       if (!other.getChannel().isEmpty()) {
         channel_ = other.channel_;
-        bitField0_ |= 0x00000400;
+        bitField0_ |= 0x00001000;
         onChanged();
       }
       if (other.hasSessionTtl()) {
@@ -1864,27 +2035,40 @@ public Builder mergeFrom(
             case 122:
               {
                 channel_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000400;
+                bitField0_ |= 0x00001000;
                 break;
               } // case 122
             case 130:
               {
                 input.readMessage(getSessionTtlFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00000800;
+                bitField0_ |= 0x00002000;
                 break;
               } // case 130
             case 146:
               {
                 input.readMessage(getEndUserMetadataFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00001000;
+                bitField0_ |= 0x00004000;
                 break;
               } // case 146
+            case 154:
+              {
+                currentPlaybook_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000400;
+                break;
+              } // case 154
             case 162:
               {
                 input.readMessage(getSearchConfigFieldBuilder().getBuilder(), extensionRegistry);
-                bitField0_ |= 0x00002000;
+                bitField0_ |= 0x00008000;
                 break;
               } // case 162
+            case 170:
+              {
+                input.readMessage(
+                    getLlmModelSettingsFieldBuilder().getBuilder(), extensionRegistry);
+                bitField0_ |= 0x00000800;
+                break;
+              } // case 170
             default:
               {
                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -4022,6 +4206,361 @@ public Builder addFlowVersionsBytes(com.google.protobuf.ByteString value) {
       return this;
     }
 
+    private java.lang.Object currentPlaybook_ = "";
+    /**
+     *
+     *
+     * 
+     * Optional. Start the session with the specified
+     * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+     * specify the playbook at the beginning of the session. Otherwise, an error
+     * will be thrown.
+     *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + public java.lang.String getCurrentPlaybook() { + java.lang.Object ref = currentPlaybook_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + currentPlaybook_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Start the session with the specified
+     * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+     * specify the playbook at the beginning of the session. Otherwise, an error
+     * will be thrown.
+     *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + public com.google.protobuf.ByteString getCurrentPlaybookBytes() { + java.lang.Object ref = currentPlaybook_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + currentPlaybook_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Start the session with the specified
+     * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+     * specify the playbook at the beginning of the session. Otherwise, an error
+     * will be thrown.
+     *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The currentPlaybook to set. + * @return This builder for chaining. + */ + public Builder setCurrentPlaybook(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + currentPlaybook_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Start the session with the specified
+     * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+     * specify the playbook at the beginning of the session. Otherwise, an error
+     * will be thrown.
+     *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCurrentPlaybook() { + currentPlaybook_ = getDefaultInstance().getCurrentPlaybook(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Start the session with the specified
+     * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+     * specify the playbook at the beginning of the session. Otherwise, an error
+     * will be thrown.
+     *
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/playbooks/<Playbook ID>`.
+     * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for currentPlaybook to set. + * @return This builder for chaining. + */ + public Builder setCurrentPlaybookBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + currentPlaybook_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llmModelSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + llmModelSettingsBuilder_; + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + public boolean hasLlmModelSettings() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings() { + if (llmModelSettingsBuilder_ == null) { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } else { + return llmModelSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + llmModelSettings_ = value; + } else { + llmModelSettingsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder builderForValue) { + if (llmModelSettingsBuilder_ == null) { + llmModelSettings_ = builderForValue.build(); + } else { + llmModelSettingsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeLlmModelSettings( + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings value) { + if (llmModelSettingsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && llmModelSettings_ != null + && llmModelSettings_ + != com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance()) { + getLlmModelSettingsBuilder().mergeFrom(value); + } else { + llmModelSettings_ = value; + } + } else { + llmModelSettingsBuilder_.mergeFrom(value); + } + if (llmModelSettings_ != null) { + bitField0_ |= 0x00000800; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearLlmModelSettings() { + bitField0_ = (bitField0_ & ~0x00000800); + llmModelSettings_ = null; + if (llmModelSettingsBuilder_ != null) { + llmModelSettingsBuilder_.dispose(); + llmModelSettingsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder + getLlmModelSettingsBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getLlmModelSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder + getLlmModelSettingsOrBuilder() { + if (llmModelSettingsBuilder_ != null) { + return llmModelSettingsBuilder_.getMessageOrBuilder(); + } else { + return llmModelSettings_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.getDefaultInstance() + : llmModelSettings_; + } + } + /** + * + * + *
+     * Optional. Use the specified LLM model settings for processing the request.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder> + getLlmModelSettingsFieldBuilder() { + if (llmModelSettingsBuilder_ == null) { + llmModelSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings.Builder, + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder>( + getLlmModelSettings(), getParentForChildren(), isClean()); + llmModelSettings_ = null; + } + return llmModelSettingsBuilder_; + } + private java.lang.Object channel_ = ""; /** * @@ -4120,7 +4659,7 @@ public Builder setChannel(java.lang.String value) { throw new NullPointerException(); } channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4149,7 +4688,7 @@ public Builder setChannel(java.lang.String value) { */ public Builder clearChannel() { channel_ = getDefaultInstance().getChannel(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); return this; } @@ -4183,7 +4722,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); channel_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00001000; onChanged(); return this; } @@ -4198,7 +4737,7 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4210,13 +4749,13 @@ public Builder setChannelBytes(com.google.protobuf.ByteString value) {
      * @return Whether the sessionTtl field is set.
      */
     public boolean hasSessionTtl() {
-      return ((bitField0_ & 0x00000800) != 0);
+      return ((bitField0_ & 0x00002000) != 0);
     }
     /**
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4240,7 +4779,7 @@ public com.google.protobuf.Duration getSessionTtl() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4258,7 +4797,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration value) {
       } else {
         sessionTtlBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -4266,7 +4805,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration value) {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4281,7 +4820,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu
       } else {
         sessionTtlBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -4289,7 +4828,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4300,7 +4839,7 @@ public Builder setSessionTtl(com.google.protobuf.Duration.Builder builderForValu
      */
     public Builder mergeSessionTtl(com.google.protobuf.Duration value) {
       if (sessionTtlBuilder_ == null) {
-        if (((bitField0_ & 0x00000800) != 0)
+        if (((bitField0_ & 0x00002000) != 0)
             && sessionTtl_ != null
             && sessionTtl_ != com.google.protobuf.Duration.getDefaultInstance()) {
           getSessionTtlBuilder().mergeFrom(value);
@@ -4311,7 +4850,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) {
         sessionTtlBuilder_.mergeFrom(value);
       }
       if (sessionTtl_ != null) {
-        bitField0_ |= 0x00000800;
+        bitField0_ |= 0x00002000;
         onChanged();
       }
       return this;
@@ -4320,7 +4859,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4330,7 +4869,7 @@ public Builder mergeSessionTtl(com.google.protobuf.Duration value) {
      * 
      */
     public Builder clearSessionTtl() {
-      bitField0_ = (bitField0_ & ~0x00000800);
+      bitField0_ = (bitField0_ & ~0x00002000);
       sessionTtl_ = null;
       if (sessionTtlBuilder_ != null) {
         sessionTtlBuilder_.dispose();
@@ -4343,7 +4882,7 @@ public Builder clearSessionTtl() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4353,7 +4892,7 @@ public Builder clearSessionTtl() {
      * 
      */
     public com.google.protobuf.Duration.Builder getSessionTtlBuilder() {
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00002000;
       onChanged();
       return getSessionTtlFieldBuilder().getBuilder();
     }
@@ -4361,7 +4900,7 @@ public com.google.protobuf.Duration.Builder getSessionTtlBuilder() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4383,7 +4922,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() {
      *
      *
      * 
-     * Optional. Sets Dialogflow session life time.
+     * Optional. Configure lifetime of the Dialogflow session.
      * By default, a Dialogflow session remains active and its data is stored for
      * 30 minutes after the last request is sent for the session.
      * This value should be no longer than 1 day.
@@ -4445,7 +4984,7 @@ public com.google.protobuf.DurationOrBuilder getSessionTtlOrBuilder() {
      * @return Whether the endUserMetadata field is set.
      */
     public boolean hasEndUserMetadata() {
-      return ((bitField0_ & 0x00001000) != 0);
+      return ((bitField0_ & 0x00004000) != 0);
     }
     /**
      *
@@ -4521,7 +5060,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct value) {
       } else {
         endUserMetadataBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00004000;
       onChanged();
       return this;
     }
@@ -4558,7 +5097,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForV
       } else {
         endUserMetadataBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00004000;
       onChanged();
       return this;
     }
@@ -4591,7 +5130,7 @@ public Builder setEndUserMetadata(com.google.protobuf.Struct.Builder builderForV
      */
     public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) {
       if (endUserMetadataBuilder_ == null) {
-        if (((bitField0_ & 0x00001000) != 0)
+        if (((bitField0_ & 0x00004000) != 0)
             && endUserMetadata_ != null
             && endUserMetadata_ != com.google.protobuf.Struct.getDefaultInstance()) {
           getEndUserMetadataBuilder().mergeFrom(value);
@@ -4602,7 +5141,7 @@ public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) {
         endUserMetadataBuilder_.mergeFrom(value);
       }
       if (endUserMetadata_ != null) {
-        bitField0_ |= 0x00001000;
+        bitField0_ |= 0x00004000;
         onChanged();
       }
       return this;
@@ -4635,7 +5174,7 @@ public Builder mergeEndUserMetadata(com.google.protobuf.Struct value) {
      * 
      */
     public Builder clearEndUserMetadata() {
-      bitField0_ = (bitField0_ & ~0x00001000);
+      bitField0_ = (bitField0_ & ~0x00004000);
       endUserMetadata_ = null;
       if (endUserMetadataBuilder_ != null) {
         endUserMetadataBuilder_.dispose();
@@ -4672,7 +5211,7 @@ public Builder clearEndUserMetadata() {
      * 
      */
     public com.google.protobuf.Struct.Builder getEndUserMetadataBuilder() {
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00004000;
       onChanged();
       return getEndUserMetadataFieldBuilder().getBuilder();
     }
@@ -4776,7 +5315,7 @@ public com.google.protobuf.StructOrBuilder getEndUserMetadataOrBuilder() {
      * @return Whether the searchConfig field is set.
      */
     public boolean hasSearchConfig() {
-      return ((bitField0_ & 0x00002000) != 0);
+      return ((bitField0_ & 0x00008000) != 0);
     }
     /**
      *
@@ -4820,7 +5359,7 @@ public Builder setSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchConf
       } else {
         searchConfigBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00002000;
+      bitField0_ |= 0x00008000;
       onChanged();
       return this;
     }
@@ -4842,7 +5381,7 @@ public Builder setSearchConfig(
       } else {
         searchConfigBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00002000;
+      bitField0_ |= 0x00008000;
       onChanged();
       return this;
     }
@@ -4859,7 +5398,7 @@ public Builder setSearchConfig(
      */
     public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchConfig value) {
       if (searchConfigBuilder_ == null) {
-        if (((bitField0_ & 0x00002000) != 0)
+        if (((bitField0_ & 0x00008000) != 0)
             && searchConfig_ != null
             && searchConfig_
                 != com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.getDefaultInstance()) {
@@ -4871,7 +5410,7 @@ public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchCo
         searchConfigBuilder_.mergeFrom(value);
       }
       if (searchConfig_ != null) {
-        bitField0_ |= 0x00002000;
+        bitField0_ |= 0x00008000;
         onChanged();
       }
       return this;
@@ -4888,7 +5427,7 @@ public Builder mergeSearchConfig(com.google.cloud.dialogflow.cx.v3beta1.SearchCo
      * 
      */
     public Builder clearSearchConfig() {
-      bitField0_ = (bitField0_ & ~0x00002000);
+      bitField0_ = (bitField0_ & ~0x00008000);
       searchConfig_ = null;
       if (searchConfigBuilder_ != null) {
         searchConfigBuilder_.dispose();
@@ -4909,7 +5448,7 @@ public Builder clearSearchConfig() {
      * 
      */
     public com.google.cloud.dialogflow.cx.v3beta1.SearchConfig.Builder getSearchConfigBuilder() {
-      bitField0_ |= 0x00002000;
+      bitField0_ |= 0x00008000;
       onChanged();
       return getSearchConfigFieldBuilder().getBuilder();
     }
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java
index 03ab9cfdb979..801ec5151d39 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryParametersOrBuilder.java
@@ -574,6 +574,88 @@ java.lang.String getWebhookHeadersOrDefault(
    */
   com.google.protobuf.ByteString getFlowVersionsBytes(int index);
 
+  /**
+   *
+   *
+   * 
+   * Optional. Start the session with the specified
+   * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+   * specify the playbook at the beginning of the session. Otherwise, an error
+   * will be thrown.
+   *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The currentPlaybook. + */ + java.lang.String getCurrentPlaybook(); + /** + * + * + *
+   * Optional. Start the session with the specified
+   * [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only
+   * specify the playbook at the beginning of the session. Otherwise, an error
+   * will be thrown.
+   *
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/playbooks/<Playbook ID>`.
+   * 
+ * + * + * string current_playbook = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for currentPlaybook. + */ + com.google.protobuf.ByteString getCurrentPlaybookBytes(); + + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the llmModelSettings field is set. + */ + boolean hasLlmModelSettings(); + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The llmModelSettings. + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettings getLlmModelSettings(); + /** + * + * + *
+   * Optional. Use the specified LLM model settings for processing the request.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.LlmModelSettings llm_model_settings = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.LlmModelSettingsOrBuilder getLlmModelSettingsOrBuilder(); + /** * * @@ -627,7 +709,7 @@ java.lang.String getWebhookHeadersOrDefault( * * *
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -643,7 +725,7 @@ java.lang.String getWebhookHeadersOrDefault(
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
@@ -659,7 +741,7 @@ java.lang.String getWebhookHeadersOrDefault(
    *
    *
    * 
-   * Optional. Sets Dialogflow session life time.
+   * Optional. Configure lifetime of the Dialogflow session.
    * By default, a Dialogflow session remains active and its data is stored for
    * 30 minutes after the last request is sent for the session.
    * This value should be no longer than 1 day.
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java
index f6baa871eb05..b4a383b60cbf 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResult.java
@@ -41,6 +41,10 @@ private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder builder) {
   private QueryResult() {
     languageCode_ = "";
     responseMessages_ = java.util.Collections.emptyList();
+    webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList();
+    webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
+    webhookLatencies_ = java.util.Collections.emptyList();
+    webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList();
     webhookStatuses_ = java.util.Collections.emptyList();
     webhookPayloads_ = java.util.Collections.emptyList();
   }
@@ -716,6 +720,269 @@ public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage getResponseMessage
     return responseMessages_.get(index);
   }
 
+  public static final int WEBHOOK_IDS_FIELD_NUMBER = 25;
+
+  @SuppressWarnings("serial")
+  private com.google.protobuf.LazyStringArrayList webhookIds_ =
+      com.google.protobuf.LazyStringArrayList.emptyList();
+  /**
+   *
+   *
+   * 
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + public com.google.protobuf.ProtocolStringList getWebhookIdsList() { + return webhookIds_; + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + public int getWebhookIdsCount() { + return webhookIds_.size(); + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + public java.lang.String getWebhookIds(int index) { + return webhookIds_.get(index); + } + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { + return webhookIds_.getByteString(index); + } + + public static final int WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { + return webhookDisplayNames_; + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + public int getWebhookDisplayNamesCount() { + return webhookDisplayNames_.size(); + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + public java.lang.String getWebhookDisplayNames(int index) { + return webhookDisplayNames_.get(index); + } + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { + return webhookDisplayNames_.getByteString(index); + } + + public static final int WEBHOOK_LATENCIES_FIELD_NUMBER = 27; + + @SuppressWarnings("serial") + private java.util.List webhookLatencies_; + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public java.util.List getWebhookLatenciesList() { + return webhookLatencies_; + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public java.util.List + getWebhookLatenciesOrBuilderList() { + return webhookLatencies_; + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public int getWebhookLatenciesCount() { + return webhookLatencies_.size(); + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public com.google.protobuf.Duration getWebhookLatencies(int index) { + return webhookLatencies_.get(index); + } + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { + return webhookLatencies_.get(index); + } + + public static final int WEBHOOK_TAGS_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList webhookTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + public com.google.protobuf.ProtocolStringList getWebhookTagsList() { + return webhookTags_; + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + public int getWebhookTagsCount() { + return webhookTags_.size(); + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + public java.lang.String getWebhookTags(int index) { + return webhookTags_.get(index); + } + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { + return webhookTags_.getByteString(index); + } + public static final int WEBHOOK_STATUSES_FIELD_NUMBER = 13; @SuppressWarnings("serial") @@ -929,6 +1196,62 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil : currentPage_; } + public static final int CURRENT_FLOW_FIELD_NUMBER = 31; + private com.google.cloud.dialogflow.cx.v3beta1.Flow currentFlow_; + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + * + * @return Whether the currentFlow field is set. + */ + @java.lang.Override + public boolean hasCurrentFlow() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + * + * @return The currentFlow. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Flow getCurrentFlow() { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance() + : currentFlow_; + } + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getCurrentFlowOrBuilder() { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance() + : currentFlow_; + } + public static final int INTENT_FIELD_NUMBER = 8; private com.google.cloud.dialogflow.cx.v3beta1.Intent intent_; /** @@ -946,13 +1269,13 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return Whether the intent field is set. */ @java.lang.Override @java.lang.Deprecated public boolean hasIntent() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -969,7 +1292,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return The intent. */ @java.lang.Override @@ -1021,7 +1344,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=1006 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -1045,7 +1368,7 @@ public float getIntentDetectionConfidence() { */ @java.lang.Override public boolean hasMatch() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * @@ -1111,7 +1434,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder getMatchOrBuilder() */ @java.lang.Override public boolean hasDiagnosticInfo() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * @@ -1178,6 +1501,57 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { : diagnosticInfo_; } + public static final int GENERATIVE_INFO_FIELD_NUMBER = 33; + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generativeInfo_; + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return Whether the generativeInfo field is set. + */ + @java.lang.Override + public boolean hasGenerativeInfo() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return The generativeInfo. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getGenerativeInfo() { + return generativeInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance() + : generativeInfo_; + } + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder + getGenerativeInfoOrBuilder() { + return generativeInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance() + : generativeInfo_; + } + public static final int SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER = 17; private com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult sentimentAnalysisResult_; /** @@ -1198,7 +1572,7 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { */ @java.lang.Override public boolean hasSentimentAnalysisResult() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * @@ -1264,7 +1638,7 @@ public boolean hasSentimentAnalysisResult() { */ @java.lang.Override public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * @@ -1359,13 +1733,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(7, getCurrentPage()); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(8, getIntent()); } if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { output.writeFloat(9, intentDetectionConfidence_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(10, getDiagnosticInfo()); } if (queryCase_ == 11) { @@ -1380,22 +1754,41 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (queryCase_ == 14) { com.google.protobuf.GeneratedMessageV3.writeString(output, 14, query_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(15, getMatch()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { output.writeMessage(17, getSentimentAnalysisResult()); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { output.writeMessage(21, getAdvancedSettings()); } if (queryCase_ == 23) { output.writeMessage(23, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) query_); } + for (int i = 0; i < webhookIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 25, webhookIds_.getRaw(i)); + } + for (int i = 0; i < webhookDisplayNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 26, webhookDisplayNames_.getRaw(i)); + } + for (int i = 0; i < webhookLatencies_.size(); i++) { + output.writeMessage(27, webhookLatencies_.get(i)); + } + for (int i = 0; i < webhookTags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, webhookTags_.getRaw(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(31, getCurrentFlow()); + } if (allowAnswerFeedback_ != false) { output.writeBool(32, allowAnswerFeedback_); } - getUnknownFields().writeTo(output); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(33, getGenerativeInfo()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1422,13 +1815,13 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCurrentPage()); } - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getIntent()); } if (java.lang.Float.floatToRawIntBits(intentDetectionConfidence_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, intentDetectionConfidence_); } - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDiagnosticInfo()); } if (queryCase_ == 11) { @@ -1443,15 +1836,15 @@ public int getSerializedSize() { if (queryCase_ == 14) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, query_); } - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getMatch()); } - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 17, getSentimentAnalysisResult()); } - if (((bitField0_ & 0x00000040) != 0)) { + if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getAdvancedSettings()); } if (queryCase_ == 23) { @@ -1459,9 +1852,43 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 23, (com.google.cloud.dialogflow.cx.v3beta1.DtmfInput) query_); } + { + int dataSize = 0; + for (int i = 0; i < webhookIds_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookIds_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < webhookDisplayNames_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookDisplayNames_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookDisplayNamesList().size(); + } + for (int i = 0; i < webhookLatencies_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(27, webhookLatencies_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < webhookTags_.size(); i++) { + dataSize += computeStringSizeNoTag(webhookTags_.getRaw(i)); + } + size += dataSize; + size += 2 * getWebhookTagsList().size(); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, getCurrentFlow()); + } if (allowAnswerFeedback_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(32, allowAnswerFeedback_); } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, getGenerativeInfo()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1484,12 +1911,20 @@ public boolean equals(final java.lang.Object obj) { if (!getParameters().equals(other.getParameters())) return false; } if (!getResponseMessagesList().equals(other.getResponseMessagesList())) return false; + if (!getWebhookIdsList().equals(other.getWebhookIdsList())) return false; + if (!getWebhookDisplayNamesList().equals(other.getWebhookDisplayNamesList())) return false; + if (!getWebhookLatenciesList().equals(other.getWebhookLatenciesList())) return false; + if (!getWebhookTagsList().equals(other.getWebhookTagsList())) return false; if (!getWebhookStatusesList().equals(other.getWebhookStatusesList())) return false; if (!getWebhookPayloadsList().equals(other.getWebhookPayloadsList())) return false; if (hasCurrentPage() != other.hasCurrentPage()) return false; if (hasCurrentPage()) { if (!getCurrentPage().equals(other.getCurrentPage())) return false; } + if (hasCurrentFlow() != other.hasCurrentFlow()) return false; + if (hasCurrentFlow()) { + if (!getCurrentFlow().equals(other.getCurrentFlow())) return false; + } if (hasIntent() != other.hasIntent()) return false; if (hasIntent()) { if (!getIntent().equals(other.getIntent())) return false; @@ -1504,6 +1939,10 @@ public boolean equals(final java.lang.Object obj) { if (hasDiagnosticInfo()) { if (!getDiagnosticInfo().equals(other.getDiagnosticInfo())) return false; } + if (hasGenerativeInfo() != other.hasGenerativeInfo()) return false; + if (hasGenerativeInfo()) { + if (!getGenerativeInfo().equals(other.getGenerativeInfo())) return false; + } if (hasSentimentAnalysisResult() != other.hasSentimentAnalysisResult()) return false; if (hasSentimentAnalysisResult()) { if (!getSentimentAnalysisResult().equals(other.getSentimentAnalysisResult())) return false; @@ -1554,6 +1993,22 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getResponseMessagesList().hashCode(); } + if (getWebhookIdsCount() > 0) { + hash = (37 * hash) + WEBHOOK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getWebhookIdsList().hashCode(); + } + if (getWebhookDisplayNamesCount() > 0) { + hash = (37 * hash) + WEBHOOK_DISPLAY_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getWebhookDisplayNamesList().hashCode(); + } + if (getWebhookLatenciesCount() > 0) { + hash = (37 * hash) + WEBHOOK_LATENCIES_FIELD_NUMBER; + hash = (53 * hash) + getWebhookLatenciesList().hashCode(); + } + if (getWebhookTagsCount() > 0) { + hash = (37 * hash) + WEBHOOK_TAGS_FIELD_NUMBER; + hash = (53 * hash) + getWebhookTagsList().hashCode(); + } if (getWebhookStatusesCount() > 0) { hash = (37 * hash) + WEBHOOK_STATUSES_FIELD_NUMBER; hash = (53 * hash) + getWebhookStatusesList().hashCode(); @@ -1566,6 +2021,10 @@ public int hashCode() { hash = (37 * hash) + CURRENT_PAGE_FIELD_NUMBER; hash = (53 * hash) + getCurrentPage().hashCode(); } + if (hasCurrentFlow()) { + hash = (37 * hash) + CURRENT_FLOW_FIELD_NUMBER; + hash = (53 * hash) + getCurrentFlow().hashCode(); + } if (hasIntent()) { hash = (37 * hash) + INTENT_FIELD_NUMBER; hash = (53 * hash) + getIntent().hashCode(); @@ -1580,6 +2039,10 @@ public int hashCode() { hash = (37 * hash) + DIAGNOSTIC_INFO_FIELD_NUMBER; hash = (53 * hash) + getDiagnosticInfo().hashCode(); } + if (hasGenerativeInfo()) { + hash = (37 * hash) + GENERATIVE_INFO_FIELD_NUMBER; + hash = (53 * hash) + getGenerativeInfo().hashCode(); + } if (hasSentimentAnalysisResult()) { hash = (37 * hash) + SENTIMENT_ANALYSIS_RESULT_FIELD_NUMBER; hash = (53 * hash) + getSentimentAnalysisResult().hashCode(); @@ -1756,12 +2219,15 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getParametersFieldBuilder(); getResponseMessagesFieldBuilder(); + getWebhookLatenciesFieldBuilder(); getWebhookStatusesFieldBuilder(); getWebhookPayloadsFieldBuilder(); getCurrentPageFieldBuilder(); + getCurrentFlowFieldBuilder(); getIntentFieldBuilder(); getMatchFieldBuilder(); getDiagnosticInfoFieldBuilder(); + getGenerativeInfoFieldBuilder(); getSentimentAnalysisResultFieldBuilder(); getAdvancedSettingsFieldBuilder(); } @@ -1787,25 +2253,40 @@ public Builder clear() { responseMessagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); + webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (webhookLatenciesBuilder_ == null) { + webhookLatencies_ = java.util.Collections.emptyList(); + } else { + webhookLatencies_ = null; + webhookLatenciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); } else { webhookStatuses_ = null; webhookStatusesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); } else { webhookPayloads_ = null; webhookPayloadsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); currentPage_ = null; if (currentPageBuilder_ != null) { currentPageBuilder_.dispose(); currentPageBuilder_ = null; } + currentFlow_ = null; + if (currentFlowBuilder_ != null) { + currentFlowBuilder_.dispose(); + currentFlowBuilder_ = null; + } intent_ = null; if (intentBuilder_ != null) { intentBuilder_.dispose(); @@ -1822,6 +2303,11 @@ public Builder clear() { diagnosticInfoBuilder_.dispose(); diagnosticInfoBuilder_ = null; } + generativeInfo_ = null; + if (generativeInfoBuilder_ != null) { + generativeInfoBuilder_.dispose(); + generativeInfoBuilder_ = null; + } sentimentAnalysisResult_ = null; if (sentimentAnalysisResultBuilder_ != null) { sentimentAnalysisResultBuilder_.dispose(); @@ -1882,19 +2368,28 @@ private void buildPartialRepeatedFields( } else { result.responseMessages_ = responseMessagesBuilder_.build(); } + if (webhookLatenciesBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + webhookLatencies_ = java.util.Collections.unmodifiableList(webhookLatencies_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.webhookLatencies_ = webhookLatencies_; + } else { + result.webhookLatencies_ = webhookLatenciesBuilder_.build(); + } if (webhookStatusesBuilder_ == null) { - if (((bitField0_ & 0x00000100) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { webhookStatuses_ = java.util.Collections.unmodifiableList(webhookStatuses_); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); } result.webhookStatuses_ = webhookStatuses_; } else { result.webhookStatuses_ = webhookStatusesBuilder_.build(); } if (webhookPayloadsBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { + if (((bitField0_ & 0x00002000) != 0)) { webhookPayloads_ = java.util.Collections.unmodifiableList(webhookPayloads_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); } result.webhookPayloads_ = webhookPayloads_; } else { @@ -1912,40 +2407,62 @@ private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.QueryResult re result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { + webhookIds_.makeImmutable(); + result.webhookIds_ = webhookIds_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + webhookDisplayNames_.makeImmutable(); + result.webhookDisplayNames_ = webhookDisplayNames_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + webhookTags_.makeImmutable(); + result.webhookTags_ = webhookTags_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { result.currentPage_ = currentPageBuilder_ == null ? currentPage_ : currentPageBuilder_.build(); to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); + if (((from_bitField0_ & 0x00008000) != 0)) { + result.currentFlow_ = + currentFlowBuilder_ == null ? currentFlow_ : currentFlowBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00001000) != 0)) { + if (((from_bitField0_ & 0x00010000) != 0)) { + result.intent_ = intentBuilder_ == null ? intent_ : intentBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00020000) != 0)) { result.intentDetectionConfidence_ = intentDetectionConfidence_; } - if (((from_bitField0_ & 0x00002000) != 0)) { + if (((from_bitField0_ & 0x00040000) != 0)) { result.match_ = matchBuilder_ == null ? match_ : matchBuilder_.build(); - to_bitField0_ |= 0x00000008; + to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00080000) != 0)) { result.diagnosticInfo_ = diagnosticInfoBuilder_ == null ? diagnosticInfo_ : diagnosticInfoBuilder_.build(); - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000020; } - if (((from_bitField0_ & 0x00008000) != 0)) { + if (((from_bitField0_ & 0x00100000) != 0)) { + result.generativeInfo_ = + generativeInfoBuilder_ == null ? generativeInfo_ : generativeInfoBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00200000) != 0)) { result.sentimentAnalysisResult_ = sentimentAnalysisResultBuilder_ == null ? sentimentAnalysisResult_ : sentimentAnalysisResultBuilder_.build(); - to_bitField0_ |= 0x00000020; + to_bitField0_ |= 0x00000080; } - if (((from_bitField0_ & 0x00010000) != 0)) { + if (((from_bitField0_ & 0x00400000) != 0)) { result.advancedSettings_ = advancedSettingsBuilder_ == null ? advancedSettings_ : advancedSettingsBuilder_.build(); - to_bitField0_ |= 0x00000040; + to_bitField0_ |= 0x00000100; } - if (((from_bitField0_ & 0x00020000) != 0)) { + if (((from_bitField0_ & 0x00800000) != 0)) { result.allowAnswerFeedback_ = allowAnswerFeedback_; } result.bitField0_ |= to_bitField0_; @@ -2040,11 +2557,68 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe } } } + if (!other.webhookIds_.isEmpty()) { + if (webhookIds_.isEmpty()) { + webhookIds_ = other.webhookIds_; + bitField0_ |= 0x00000100; + } else { + ensureWebhookIdsIsMutable(); + webhookIds_.addAll(other.webhookIds_); + } + onChanged(); + } + if (!other.webhookDisplayNames_.isEmpty()) { + if (webhookDisplayNames_.isEmpty()) { + webhookDisplayNames_ = other.webhookDisplayNames_; + bitField0_ |= 0x00000200; + } else { + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.addAll(other.webhookDisplayNames_); + } + onChanged(); + } + if (webhookLatenciesBuilder_ == null) { + if (!other.webhookLatencies_.isEmpty()) { + if (webhookLatencies_.isEmpty()) { + webhookLatencies_ = other.webhookLatencies_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.addAll(other.webhookLatencies_); + } + onChanged(); + } + } else { + if (!other.webhookLatencies_.isEmpty()) { + if (webhookLatenciesBuilder_.isEmpty()) { + webhookLatenciesBuilder_.dispose(); + webhookLatenciesBuilder_ = null; + webhookLatencies_ = other.webhookLatencies_; + bitField0_ = (bitField0_ & ~0x00000400); + webhookLatenciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getWebhookLatenciesFieldBuilder() + : null; + } else { + webhookLatenciesBuilder_.addAllMessages(other.webhookLatencies_); + } + } + } + if (!other.webhookTags_.isEmpty()) { + if (webhookTags_.isEmpty()) { + webhookTags_ = other.webhookTags_; + bitField0_ |= 0x00000800; + } else { + ensureWebhookTagsIsMutable(); + webhookTags_.addAll(other.webhookTags_); + } + onChanged(); + } if (webhookStatusesBuilder_ == null) { if (!other.webhookStatuses_.isEmpty()) { if (webhookStatuses_.isEmpty()) { webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); } else { ensureWebhookStatusesIsMutable(); webhookStatuses_.addAll(other.webhookStatuses_); @@ -2057,7 +2631,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe webhookStatusesBuilder_.dispose(); webhookStatusesBuilder_ = null; webhookStatuses_ = other.webhookStatuses_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); webhookStatusesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookStatusesFieldBuilder() @@ -2071,7 +2645,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe if (!other.webhookPayloads_.isEmpty()) { if (webhookPayloads_.isEmpty()) { webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); } else { ensureWebhookPayloadsIsMutable(); webhookPayloads_.addAll(other.webhookPayloads_); @@ -2084,7 +2658,7 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe webhookPayloadsBuilder_.dispose(); webhookPayloadsBuilder_ = null; webhookPayloads_ = other.webhookPayloads_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); webhookPayloadsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebhookPayloadsFieldBuilder() @@ -2097,6 +2671,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe if (other.hasCurrentPage()) { mergeCurrentPage(other.getCurrentPage()); } + if (other.hasCurrentFlow()) { + mergeCurrentFlow(other.getCurrentFlow()); + } if (other.hasIntent()) { mergeIntent(other.getIntent()); } @@ -2109,6 +2686,9 @@ public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.QueryResult othe if (other.hasDiagnosticInfo()) { mergeDiagnosticInfo(other.getDiagnosticInfo()); } + if (other.hasGenerativeInfo()) { + mergeGenerativeInfo(other.getGenerativeInfo()); + } if (other.hasSentimentAnalysisResult()) { mergeSentimentAnalysisResult(other.getSentimentAnalysisResult()); } @@ -2231,25 +2811,25 @@ public Builder mergeFrom( case 58: { input.readMessage(getCurrentPageFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000400; + bitField0_ |= 0x00004000; break; } // case 58 case 66: { input.readMessage(getIntentFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; break; } // case 66 case 77: { intentDetectionConfidence_ = input.readFloat(); - bitField0_ |= 0x00001000; + bitField0_ |= 0x00020000; break; } // case 77 case 82: { input.readMessage(getDiagnosticInfoFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; break; } // case 82 case 90: @@ -2288,21 +2868,21 @@ public Builder mergeFrom( case 122: { input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; break; } // case 122 case 138: { input.readMessage( getSentimentAnalysisResultFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00008000; + bitField0_ |= 0x00200000; break; } // case 138 case 170: { input.readMessage( getAdvancedSettingsFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00010000; + bitField0_ |= 0x00400000; break; } // case 170 case 186: @@ -2311,12 +2891,57 @@ public Builder mergeFrom( queryCase_ = 23; break; } // case 186 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookIdsIsMutable(); + webhookIds_.add(s); + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(s); + break; + } // case 210 + case 218: + { + com.google.protobuf.Duration m = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(m); + } else { + webhookLatenciesBuilder_.addMessage(m); + } + break; + } // case 218 + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWebhookTagsIsMutable(); + webhookTags_.add(s); + break; + } // case 234 + case 250: + { + input.readMessage(getCurrentFlowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 250 case 256: { allowAnswerFeedback_ = input.readBool(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00800000; break; } // case 256 + case 266: + { + input.readMessage(getGenerativeInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 266 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -3914,101 +4539,975 @@ public Builder removeResponseMessages(int index) { * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; + * + */ + public java.util.List + getResponseMessagesOrBuilderList() { + if (responseMessagesBuilder_ != null) { + return responseMessagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responseMessages_); + } + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder + addResponseMessagesBuilder() { + return getResponseMessagesFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder + addResponseMessagesBuilder(int index) { + return getResponseMessagesFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rich messages returned to the client. Responses vary from
+     * simple text messages to more sophisticated, structured payloads used
+     * to drive complex logic.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; + * + */ + public java.util.List + getResponseMessagesBuilderList() { + return getResponseMessagesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder> + getResponseMessagesFieldBuilder() { + if (responseMessagesBuilder_ == null) { + responseMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder>( + responseMessages_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + responseMessages_ = null; + } + return responseMessagesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList webhookIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookIdsIsMutable() { + if (!webhookIds_.isModifiable()) { + webhookIds_ = new com.google.protobuf.LazyStringArrayList(webhookIds_); + } + bitField0_ |= 0x00000100; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + public com.google.protobuf.ProtocolStringList getWebhookIdsList() { + webhookIds_.makeImmutable(); + return webhookIds_; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + public int getWebhookIdsCount() { + return webhookIds_.size(); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + public java.lang.String getWebhookIds(int index) { + return webhookIds_.get(index); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + public com.google.protobuf.ByteString getWebhookIdsBytes(int index) { + return webhookIds_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index to set the value at. + * @param value The webhookIds to set. + * @return This builder for chaining. + */ + public Builder setWebhookIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookIdsIsMutable(); + webhookIds_.set(index, value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param value The webhookIds to add. + * @return This builder for chaining. + */ + public Builder addWebhookIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookIdsIsMutable(); + webhookIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param values The webhookIds to add. + * @return This builder for chaining. + */ + public Builder addAllWebhookIds(java.lang.Iterable values) { + ensureWebhookIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookIds_); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @return This builder for chaining. + */ + public Builder clearWebhookIds() { + webhookIds_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook ids in the order of call sequence.
+     * 
+ * + * repeated string webhook_ids = 25; + * + * @param value The bytes of the webhookIds to add. + * @return This builder for chaining. + */ + public Builder addWebhookIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWebhookIdsIsMutable(); + webhookIds_.add(value); + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList webhookDisplayNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookDisplayNamesIsMutable() { + if (!webhookDisplayNames_.isModifiable()) { + webhookDisplayNames_ = new com.google.protobuf.LazyStringArrayList(webhookDisplayNames_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + public com.google.protobuf.ProtocolStringList getWebhookDisplayNamesList() { + webhookDisplayNames_.makeImmutable(); + return webhookDisplayNames_; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + public int getWebhookDisplayNamesCount() { + return webhookDisplayNames_.size(); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + public java.lang.String getWebhookDisplayNames(int index) { + return webhookDisplayNames_.get(index); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + public com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index) { + return webhookDisplayNames_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index to set the value at. + * @param value The webhookDisplayNames to set. + * @return This builder for chaining. + */ + public Builder setWebhookDisplayNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param value The webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addWebhookDisplayNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param values The webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addAllWebhookDisplayNames(java.lang.Iterable values) { + ensureWebhookDisplayNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookDisplayNames_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @return This builder for chaining. + */ + public Builder clearWebhookDisplayNames() { + webhookDisplayNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook display names in the order of call sequence.
+     * 
+ * + * repeated string webhook_display_names = 26; + * + * @param value The bytes of the webhookDisplayNames to add. + * @return This builder for chaining. + */ + public Builder addWebhookDisplayNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWebhookDisplayNamesIsMutable(); + webhookDisplayNames_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List webhookLatencies_ = + java.util.Collections.emptyList(); + + private void ensureWebhookLatenciesIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + webhookLatencies_ = + new java.util.ArrayList(webhookLatencies_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + webhookLatenciesBuilder_; + + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List getWebhookLatenciesList() { + if (webhookLatenciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(webhookLatencies_); + } else { + return webhookLatenciesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public int getWebhookLatenciesCount() { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.size(); + } else { + return webhookLatenciesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration getWebhookLatencies(int index) { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.get(index); + } else { + return webhookLatenciesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder setWebhookLatencies(int index, com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.set(index, value); + onChanged(); + } else { + webhookLatenciesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder setWebhookLatencies( + int index, com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.set(index, builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(value); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(int index, com.google.protobuf.Duration value) { + if (webhookLatenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(index, value); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies(com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addWebhookLatencies( + int index, com.google.protobuf.Duration.Builder builderForValue) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.add(index, builderForValue.build()); + onChanged(); + } else { + webhookLatenciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder addAllWebhookLatencies( + java.lang.Iterable values) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookLatencies_); + onChanged(); + } else { + webhookLatenciesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder clearWebhookLatencies() { + if (webhookLatenciesBuilder_ == null) { + webhookLatencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + webhookLatenciesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public Builder removeWebhookLatencies(int index) { + if (webhookLatenciesBuilder_ == null) { + ensureWebhookLatenciesIsMutable(); + webhookLatencies_.remove(index); + onChanged(); + } else { + webhookLatenciesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder getWebhookLatenciesBuilder(int index) { + return getWebhookLatenciesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index) { + if (webhookLatenciesBuilder_ == null) { + return webhookLatencies_.get(index); + } else { + return webhookLatenciesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List + getWebhookLatenciesOrBuilderList() { + if (webhookLatenciesBuilder_ != null) { + return webhookLatenciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(webhookLatencies_); + } + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder() { + return getWebhookLatenciesFieldBuilder() + .addBuilder(com.google.protobuf.Duration.getDefaultInstance()); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public com.google.protobuf.Duration.Builder addWebhookLatenciesBuilder(int index) { + return getWebhookLatenciesFieldBuilder() + .addBuilder(index, com.google.protobuf.Duration.getDefaultInstance()); + } + /** + * + * + *
+     * The list of webhook latencies in the order of call sequence.
+     * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + public java.util.List getWebhookLatenciesBuilderList() { + return getWebhookLatenciesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getWebhookLatenciesFieldBuilder() { + if (webhookLatenciesBuilder_ == null) { + webhookLatenciesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + webhookLatencies_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + webhookLatencies_ = null; + } + return webhookLatenciesBuilder_; + } + + private com.google.protobuf.LazyStringArrayList webhookTags_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWebhookTagsIsMutable() { + if (!webhookTags_.isModifiable()) { + webhookTags_ = new com.google.protobuf.LazyStringArrayList(webhookTags_); + } + bitField0_ |= 0x00000800; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + public com.google.protobuf.ProtocolStringList getWebhookTagsList() { + webhookTags_.makeImmutable(); + return webhookTags_; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + public int getWebhookTagsCount() { + return webhookTags_.size(); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + public java.lang.String getWebhookTags(int index) { + return webhookTags_.get(index); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + public com.google.protobuf.ByteString getWebhookTagsBytes(int index) { + return webhookTags_.getByteString(index); + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
+     * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index to set the value at. + * @param value The webhookTags to set. + * @return This builder for chaining. + */ + public Builder setWebhookTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWebhookTagsIsMutable(); + webhookTags_.set(index, value); + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; - * + * repeated string webhook_tags = 29; + * + * @param value The webhookTags to add. + * @return This builder for chaining. */ - public java.util.List - getResponseMessagesOrBuilderList() { - if (responseMessagesBuilder_ != null) { - return responseMessagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(responseMessages_); + public Builder addWebhookTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureWebhookTagsIsMutable(); + webhookTags_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; - * + * repeated string webhook_tags = 29; + * + * @param values The webhookTags to add. + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder - addResponseMessagesBuilder() { - return getResponseMessagesFieldBuilder() - .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.getDefaultInstance()); + public Builder addAllWebhookTags(java.lang.Iterable values) { + ensureWebhookTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webhookTags_); + bitField0_ |= 0x00000800; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; - * + * repeated string webhook_tags = 29; + * + * @return This builder for chaining. */ - public com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder - addResponseMessagesBuilder(int index) { - return getResponseMessagesFieldBuilder() - .addBuilder( - index, com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.getDefaultInstance()); + public Builder clearWebhookTags() { + webhookTags_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + ; + onChanged(); + return this; } /** * * *
-     * The list of rich messages returned to the client. Responses vary from
-     * simple text messages to more sophisticated, structured payloads used
-     * to drive complex logic.
+     * The list of webhook tags in the order of call sequence.
      * 
* - * repeated .google.cloud.dialogflow.cx.v3beta1.ResponseMessage response_messages = 4; - * + * repeated string webhook_tags = 29; + * + * @param value The bytes of the webhookTags to add. + * @return This builder for chaining. */ - public java.util.List - getResponseMessagesBuilderList() { - return getResponseMessagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder> - getResponseMessagesFieldBuilder() { - if (responseMessagesBuilder_ == null) { - responseMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessage.Builder, - com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder>( - responseMessages_, - ((bitField0_ & 0x00000080) != 0), - getParentForChildren(), - isClean()); - responseMessages_ = null; + public Builder addWebhookTagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return responseMessagesBuilder_; + checkByteStringIsUtf8(value); + ensureWebhookTagsIsMutable(); + webhookTags_.add(value); + bitField0_ |= 0x00000800; + onChanged(); + return this; } private java.util.List webhookStatuses_ = java.util.Collections.emptyList(); private void ensureWebhookStatusesIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { + if (!((bitField0_ & 0x00001000) != 0)) { webhookStatuses_ = new java.util.ArrayList(webhookStatuses_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00001000; } } @@ -4219,7 +5718,7 @@ public Builder addAllWebhookStatuses( public Builder clearWebhookStatuses() { if (webhookStatusesBuilder_ == null) { webhookStatuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { webhookStatusesBuilder_.clear(); @@ -4339,7 +5838,7 @@ public java.util.List getWebhookStatusesBuilderLi com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( webhookStatuses_, - ((bitField0_ & 0x00000100) != 0), + ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); webhookStatuses_ = null; @@ -4351,9 +5850,9 @@ public java.util.List getWebhookStatusesBuilderLi java.util.Collections.emptyList(); private void ensureWebhookPayloadsIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { + if (!((bitField0_ & 0x00002000) != 0)) { webhookPayloads_ = new java.util.ArrayList(webhookPayloads_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00002000; } } @@ -4601,7 +6100,7 @@ public Builder addAllWebhookPayloads( public Builder clearWebhookPayloads() { if (webhookPayloadsBuilder_ == null) { webhookPayloads_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); } else { webhookPayloadsBuilder_.clear(); @@ -4744,79 +6243,283 @@ public java.util.List getWebhookPayloadsBuil com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( webhookPayloads_, - ((bitField0_ & 0x00000200) != 0), + ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); webhookPayloads_ = null; } - return webhookPayloadsBuilder_; + return webhookPayloadsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> + currentPageBuilder_; + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * + * @return Whether the currentPage field is set. + */ + public boolean hasCurrentPage() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * + * @return The currentPage. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { + if (currentPageBuilder_ == null) { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() + : currentPage_; + } else { + return currentPageBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (currentPageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + currentPage_ = value; + } else { + currentPageBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public Builder setCurrentPage( + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue) { + if (currentPageBuilder_ == null) { + currentPage_ = builderForValue.build(); + } else { + currentPageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { + if (currentPageBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && currentPage_ != null + && currentPage_ != com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()) { + getCurrentPageBuilder().mergeFrom(value); + } else { + currentPage_ = value; + } + } else { + currentPageBuilder_.mergeFrom(value); + } + if (currentPage_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public Builder clearCurrentPage() { + bitField0_ = (bitField0_ & ~0x00004000); + currentPage_ = null; + if (currentPageBuilder_ != null) { + currentPageBuilder_.dispose(); + currentPageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getCurrentPageBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getCurrentPageFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ + public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() { + if (currentPageBuilder_ != null) { + return currentPageBuilder_.getMessageOrBuilder(); + } else { + return currentPage_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() + : currentPage_; + } } - - private com.google.cloud.dialogflow.cx.v3beta1.Page currentPage_; + /** + * + * + *
+     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * fields are filled in this message, including but not limited to `name` and
+     * `display_name`.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.Page, com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> - currentPageBuilder_; + getCurrentPageFieldBuilder() { + if (currentPageBuilder_ == null) { + currentPageBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Page, + com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>( + getCurrentPage(), getParentForChildren(), isClean()); + currentPage_ = null; + } + return currentPageBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Flow currentFlow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder> + currentFlowBuilder_; /** * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; * - * @return Whether the currentPage field is set. + * @return Whether the currentFlow field is set. */ - public boolean hasCurrentPage() { - return ((bitField0_ & 0x00000400) != 0); + public boolean hasCurrentFlow() { + return ((bitField0_ & 0x00008000) != 0); } /** * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; * - * @return The currentPage. + * @return The currentFlow. */ - public com.google.cloud.dialogflow.cx.v3beta1.Page getCurrentPage() { - if (currentPageBuilder_ == null) { - return currentPage_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() - : currentPage_; + public com.google.cloud.dialogflow.cx.v3beta1.Flow getCurrentFlow() { + if (currentFlowBuilder_ == null) { + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance() + : currentFlow_; } else { - return currentPageBuilder_.getMessage(); + return currentFlowBuilder_.getMessage(); } } /** * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { - if (currentPageBuilder_ == null) { + public Builder setCurrentFlow(com.google.cloud.dialogflow.cx.v3beta1.Flow value) { + if (currentFlowBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - currentPage_ = value; + currentFlow_ = value; } else { - currentPageBuilder_.setMessage(value); + currentFlowBuilder_.setMessage(value); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4824,21 +6527,21 @@ public Builder setCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public Builder setCurrentPage( - com.google.cloud.dialogflow.cx.v3beta1.Page.Builder builderForValue) { - if (currentPageBuilder_ == null) { - currentPage_ = builderForValue.build(); + public Builder setCurrentFlow( + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder builderForValue) { + if (currentFlowBuilder_ == null) { + currentFlow_ = builderForValue.build(); } else { - currentPageBuilder_.setMessage(builderForValue.build()); + currentFlowBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00008000; onChanged(); return this; } @@ -4846,27 +6549,27 @@ public Builder setCurrentPage( * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page value) { - if (currentPageBuilder_ == null) { - if (((bitField0_ & 0x00000400) != 0) - && currentPage_ != null - && currentPage_ != com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance()) { - getCurrentPageBuilder().mergeFrom(value); + public Builder mergeCurrentFlow(com.google.cloud.dialogflow.cx.v3beta1.Flow value) { + if (currentFlowBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && currentFlow_ != null + && currentFlow_ != com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance()) { + getCurrentFlowBuilder().mergeFrom(value); } else { - currentPage_ = value; + currentFlow_ = value; } } else { - currentPageBuilder_.mergeFrom(value); + currentFlowBuilder_.mergeFrom(value); } - if (currentPage_ != null) { - bitField0_ |= 0x00000400; + if (currentFlow_ != null) { + bitField0_ |= 0x00008000; onChanged(); } return this; @@ -4875,19 +6578,19 @@ public Builder mergeCurrentPage(com.google.cloud.dialogflow.cx.v3beta1.Page valu * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public Builder clearCurrentPage() { - bitField0_ = (bitField0_ & ~0x00000400); - currentPage_ = null; - if (currentPageBuilder_ != null) { - currentPageBuilder_.dispose(); - currentPageBuilder_ = null; + public Builder clearCurrentFlow() { + bitField0_ = (bitField0_ & ~0x00008000); + currentFlow_ = null; + if (currentFlowBuilder_ != null) { + currentFlowBuilder_.dispose(); + currentFlowBuilder_ = null; } onChanged(); return this; @@ -4896,64 +6599,64 @@ public Builder clearCurrentPage() { * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public com.google.cloud.dialogflow.cx.v3beta1.Page.Builder getCurrentPageBuilder() { - bitField0_ |= 0x00000400; + public com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder getCurrentFlowBuilder() { + bitField0_ |= 0x00008000; onChanged(); - return getCurrentPageFieldBuilder().getBuilder(); + return getCurrentFlowFieldBuilder().getBuilder(); } /** * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ - public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder() { - if (currentPageBuilder_ != null) { - return currentPageBuilder_.getMessageOrBuilder(); + public com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getCurrentFlowOrBuilder() { + if (currentFlowBuilder_ != null) { + return currentFlowBuilder_.getMessageOrBuilder(); } else { - return currentPage_ == null - ? com.google.cloud.dialogflow.cx.v3beta1.Page.getDefaultInstance() - : currentPage_; + return currentFlow_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Flow.getDefaultInstance() + : currentFlow_; } } /** * * *
-     * The current [Page][google.cloud.dialogflow.cx.v3beta1.Page]. Some, not all
+     * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
      * fields are filled in this message, including but not limited to `name` and
      * `display_name`.
      * 
* - * .google.cloud.dialogflow.cx.v3beta1.Page current_page = 7; + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Page, - com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, - com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder> - getCurrentPageFieldBuilder() { - if (currentPageBuilder_ == null) { - currentPageBuilder_ = + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder> + getCurrentFlowFieldBuilder() { + if (currentFlowBuilder_ == null) { + currentFlowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dialogflow.cx.v3beta1.Page, - com.google.cloud.dialogflow.cx.v3beta1.Page.Builder, - com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder>( - getCurrentPage(), getParentForChildren(), isClean()); - currentPage_ = null; + com.google.cloud.dialogflow.cx.v3beta1.Flow, + com.google.cloud.dialogflow.cx.v3beta1.Flow.Builder, + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder>( + getCurrentFlow(), getParentForChildren(), isClean()); + currentFlow_ = null; } - return currentPageBuilder_; + return currentFlowBuilder_; } private com.google.cloud.dialogflow.cx.v3beta1.Intent intent_; @@ -4977,12 +6680,12 @@ public com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuil * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return Whether the intent field is set. */ @java.lang.Deprecated public boolean hasIntent() { - return ((bitField0_ & 0x00000800) != 0); + return ((bitField0_ & 0x00010000) != 0); } /** * @@ -4999,7 +6702,7 @@ public boolean hasIntent() { * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return The intent. */ @java.lang.Deprecated @@ -5036,7 +6739,7 @@ public Builder setIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) { } else { intentBuilder_.setMessage(value); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5062,7 +6765,7 @@ public Builder setIntent( } else { intentBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return this; } @@ -5083,7 +6786,7 @@ public Builder setIntent( @java.lang.Deprecated public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) { if (intentBuilder_ == null) { - if (((bitField0_ & 0x00000800) != 0) + if (((bitField0_ & 0x00010000) != 0) && intent_ != null && intent_ != com.google.cloud.dialogflow.cx.v3beta1.Intent.getDefaultInstance()) { getIntentBuilder().mergeFrom(value); @@ -5094,7 +6797,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) intentBuilder_.mergeFrom(value); } if (intent_ != null) { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); } return this; @@ -5115,7 +6818,7 @@ public Builder mergeIntent(com.google.cloud.dialogflow.cx.v3beta1.Intent value) */ @java.lang.Deprecated public Builder clearIntent() { - bitField0_ = (bitField0_ & ~0x00000800); + bitField0_ = (bitField0_ & ~0x00010000); intent_ = null; if (intentBuilder_ != null) { intentBuilder_.dispose(); @@ -5140,7 +6843,7 @@ public Builder clearIntent() { */ @java.lang.Deprecated public com.google.cloud.dialogflow.cx.v3beta1.Intent.Builder getIntentBuilder() { - bitField0_ |= 0x00000800; + bitField0_ |= 0x00010000; onChanged(); return getIntentFieldBuilder().getBuilder(); } @@ -5218,7 +6921,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.IntentOrBuilder getIntentOrBuilder * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=1006 * @return The intentDetectionConfidence. */ @java.lang.Override @@ -5244,7 +6947,7 @@ public float getIntentDetectionConfidence() { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=1006 * @param value The intentDetectionConfidence to set. * @return This builder for chaining. */ @@ -5252,7 +6955,7 @@ public float getIntentDetectionConfidence() { public Builder setIntentDetectionConfidence(float value) { intentDetectionConfidence_ = value; - bitField0_ |= 0x00001000; + bitField0_ |= 0x00020000; onChanged(); return this; } @@ -5274,12 +6977,12 @@ public Builder setIntentDetectionConfidence(float value) { * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=1006 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearIntentDetectionConfidence() { - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00020000); intentDetectionConfidence_ = 0F; onChanged(); return this; @@ -5303,7 +7006,7 @@ public Builder clearIntentDetectionConfidence() { * @return Whether the match field is set. */ public boolean hasMatch() { - return ((bitField0_ & 0x00002000) != 0); + return ((bitField0_ & 0x00040000) != 0); } /** * @@ -5343,7 +7046,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3beta1.Match value) { } else { matchBuilder_.setMessage(value); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5362,7 +7065,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3beta1.Match.Builder bui } else { matchBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return this; } @@ -5377,7 +7080,7 @@ public Builder setMatch(com.google.cloud.dialogflow.cx.v3beta1.Match.Builder bui */ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3beta1.Match value) { if (matchBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0) + if (((bitField0_ & 0x00040000) != 0) && match_ != null && match_ != com.google.cloud.dialogflow.cx.v3beta1.Match.getDefaultInstance()) { getMatchBuilder().mergeFrom(value); @@ -5388,7 +7091,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3beta1.Match value) { matchBuilder_.mergeFrom(value); } if (match_ != null) { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); } return this; @@ -5403,7 +7106,7 @@ public Builder mergeMatch(com.google.cloud.dialogflow.cx.v3beta1.Match value) { * .google.cloud.dialogflow.cx.v3beta1.Match match = 15; */ public Builder clearMatch() { - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00040000); match_ = null; if (matchBuilder_ != null) { matchBuilder_.dispose(); @@ -5422,7 +7125,7 @@ public Builder clearMatch() { * .google.cloud.dialogflow.cx.v3beta1.Match match = 15; */ public com.google.cloud.dialogflow.cx.v3beta1.Match.Builder getMatchBuilder() { - bitField0_ |= 0x00002000; + bitField0_ |= 0x00040000; onChanged(); return getMatchFieldBuilder().getBuilder(); } @@ -5504,7 +7207,7 @@ public com.google.cloud.dialogflow.cx.v3beta1.MatchOrBuilder getMatchOrBuilder() * @return Whether the diagnosticInfo field is set. */ public boolean hasDiagnosticInfo() { - return ((bitField0_ & 0x00004000) != 0); + return ((bitField0_ & 0x00080000) != 0); } /** * @@ -5576,7 +7279,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct value) { } else { diagnosticInfoBuilder_.setMessage(value); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5611,7 +7314,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa } else { diagnosticInfoBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return this; } @@ -5642,7 +7345,7 @@ public Builder setDiagnosticInfo(com.google.protobuf.Struct.Builder builderForVa */ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { if (diagnosticInfoBuilder_ == null) { - if (((bitField0_ & 0x00004000) != 0) + if (((bitField0_ & 0x00080000) != 0) && diagnosticInfo_ != null && diagnosticInfo_ != com.google.protobuf.Struct.getDefaultInstance()) { getDiagnosticInfoBuilder().mergeFrom(value); @@ -5653,7 +7356,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { diagnosticInfoBuilder_.mergeFrom(value); } if (diagnosticInfo_ != null) { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); } return this; @@ -5684,7 +7387,7 @@ public Builder mergeDiagnosticInfo(com.google.protobuf.Struct value) { * .google.protobuf.Struct diagnostic_info = 10; */ public Builder clearDiagnosticInfo() { - bitField0_ = (bitField0_ & ~0x00004000); + bitField0_ = (bitField0_ & ~0x00080000); diagnosticInfo_ = null; if (diagnosticInfoBuilder_ != null) { diagnosticInfoBuilder_.dispose(); @@ -5719,7 +7422,7 @@ public Builder clearDiagnosticInfo() { * .google.protobuf.Struct diagnostic_info = 10; */ public com.google.protobuf.Struct.Builder getDiagnosticInfoBuilder() { - bitField0_ |= 0x00004000; + bitField0_ |= 0x00080000; onChanged(); return getDiagnosticInfoFieldBuilder().getBuilder(); } @@ -5799,6 +7502,196 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { return diagnosticInfoBuilder_; } + private com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generativeInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder> + generativeInfoBuilder_; + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return Whether the generativeInfo field is set. + */ + public boolean hasGenerativeInfo() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return The generativeInfo. + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getGenerativeInfo() { + if (generativeInfoBuilder_ == null) { + return generativeInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance() + : generativeInfo_; + } else { + return generativeInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public Builder setGenerativeInfo(com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo value) { + if (generativeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + generativeInfo_ = value; + } else { + generativeInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public Builder setGenerativeInfo( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder builderForValue) { + if (generativeInfoBuilder_ == null) { + generativeInfo_ = builderForValue.build(); + } else { + generativeInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public Builder mergeGenerativeInfo( + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo value) { + if (generativeInfoBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) + && generativeInfo_ != null + && generativeInfo_ + != com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance()) { + getGenerativeInfoBuilder().mergeFrom(value); + } else { + generativeInfo_ = value; + } + } else { + generativeInfoBuilder_.mergeFrom(value); + } + if (generativeInfo_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public Builder clearGenerativeInfo() { + bitField0_ = (bitField0_ & ~0x00100000); + generativeInfo_ = null; + if (generativeInfoBuilder_ != null) { + generativeInfoBuilder_.dispose(); + generativeInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder + getGenerativeInfoBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getGenerativeInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + public com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder + getGenerativeInfoOrBuilder() { + if (generativeInfoBuilder_ != null) { + return generativeInfoBuilder_.getMessageOrBuilder(); + } else { + return generativeInfo_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.getDefaultInstance() + : generativeInfo_; + } + } + /** + * + * + *
+     * The information of a query if handled by generative agent resources.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder> + getGenerativeInfoFieldBuilder() { + if (generativeInfoBuilder_ == null) { + generativeInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo.Builder, + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder>( + getGenerativeInfo(), getParentForChildren(), isClean()); + generativeInfo_ = null; + } + return generativeInfoBuilder_; + } + private com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult sentimentAnalysisResult_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult, @@ -5822,7 +7715,7 @@ public com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder() { * @return Whether the sentimentAnalysisResult field is set. */ public boolean hasSentimentAnalysisResult() { - return ((bitField0_ & 0x00008000) != 0); + return ((bitField0_ & 0x00200000) != 0); } /** * @@ -5874,7 +7767,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(value); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5899,7 +7792,7 @@ public Builder setSentimentAnalysisResult( } else { sentimentAnalysisResultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00008000; + bitField0_ |= 0x00200000; onChanged(); return this; } @@ -5920,7 +7813,7 @@ public Builder setSentimentAnalysisResult( public Builder mergeSentimentAnalysisResult( com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult value) { if (sentimentAnalysisResultBuilder_ == null) { - if (((bitField0_ & 0x00008000) != 0) + if (((bitField0_ & 0x00200000) != 0) && sentimentAnalysisResult_ != null && sentimentAnalysisResult_ != com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult @@ -5933,7 +7826,7 @@ public Builder mergeSentimentAnalysisResult( sentimentAnalysisResultBuilder_.mergeFrom(value); } if (sentimentAnalysisResult_ != null) { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00200000; onChanged(); } return this; @@ -5953,7 +7846,7 @@ public Builder mergeSentimentAnalysisResult( * */ public Builder clearSentimentAnalysisResult() { - bitField0_ = (bitField0_ & ~0x00008000); + bitField0_ = (bitField0_ & ~0x00200000); sentimentAnalysisResult_ = null; if (sentimentAnalysisResultBuilder_ != null) { sentimentAnalysisResultBuilder_.dispose(); @@ -5978,7 +7871,7 @@ public Builder clearSentimentAnalysisResult() { */ public com.google.cloud.dialogflow.cx.v3beta1.SentimentAnalysisResult.Builder getSentimentAnalysisResultBuilder() { - bitField0_ |= 0x00008000; + bitField0_ |= 0x00200000; onChanged(); return getSentimentAnalysisResultFieldBuilder().getBuilder(); } @@ -6059,7 +7952,7 @@ public Builder clearSentimentAnalysisResult() { * @return Whether the advancedSettings field is set. */ public boolean hasAdvancedSettings() { - return ((bitField0_ & 0x00010000) != 0); + return ((bitField0_ & 0x00400000) != 0); } /** * @@ -6108,7 +8001,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(value); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6132,7 +8025,7 @@ public Builder setAdvancedSettings( } else { advancedSettingsBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00010000; + bitField0_ |= 0x00400000; onChanged(); return this; } @@ -6152,7 +8045,7 @@ public Builder setAdvancedSettings( public Builder mergeAdvancedSettings( com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings value) { if (advancedSettingsBuilder_ == null) { - if (((bitField0_ & 0x00010000) != 0) + if (((bitField0_ & 0x00400000) != 0) && advancedSettings_ != null && advancedSettings_ != com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.getDefaultInstance()) { @@ -6164,7 +8057,7 @@ public Builder mergeAdvancedSettings( advancedSettingsBuilder_.mergeFrom(value); } if (advancedSettings_ != null) { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00400000; onChanged(); } return this; @@ -6183,7 +8076,7 @@ public Builder mergeAdvancedSettings( * .google.cloud.dialogflow.cx.v3beta1.AdvancedSettings advanced_settings = 21; */ public Builder clearAdvancedSettings() { - bitField0_ = (bitField0_ & ~0x00010000); + bitField0_ = (bitField0_ & ~0x00400000); advancedSettings_ = null; if (advancedSettingsBuilder_ != null) { advancedSettingsBuilder_.dispose(); @@ -6207,7 +8100,7 @@ public Builder clearAdvancedSettings() { */ public com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.Builder getAdvancedSettingsBuilder() { - bitField0_ |= 0x00010000; + bitField0_ |= 0x00400000; onChanged(); return getAdvancedSettingsFieldBuilder().getBuilder(); } @@ -6297,7 +8190,7 @@ public boolean getAllowAnswerFeedback() { public Builder setAllowAnswerFeedback(boolean value) { allowAnswerFeedback_ = value; - bitField0_ |= 0x00020000; + bitField0_ |= 0x00800000; onChanged(); return this; } @@ -6314,7 +8207,7 @@ public Builder setAllowAnswerFeedback(boolean value) { * @return This builder for chaining. */ public Builder clearAllowAnswerFeedback() { - bitField0_ = (bitField0_ & ~0x00020000); + bitField0_ = (bitField0_ & ~0x00800000); allowAnswerFeedback_ = false; onChanged(); return this; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java index f65ade77f8d0..ae83c7adfaac 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/QueryResultOrBuilder.java @@ -410,6 +410,211 @@ public interface QueryResultOrBuilder com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessagesOrBuilder( int index); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return A list containing the webhookIds. + */ + java.util.List getWebhookIdsList(); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @return The count of webhookIds. + */ + int getWebhookIdsCount(); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the element to return. + * @return The webhookIds at the given index. + */ + java.lang.String getWebhookIds(int index); + /** + * + * + *
+   * The list of webhook ids in the order of call sequence.
+   * 
+ * + * repeated string webhook_ids = 25; + * + * @param index The index of the value to return. + * @return The bytes of the webhookIds at the given index. + */ + com.google.protobuf.ByteString getWebhookIdsBytes(int index); + + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return A list containing the webhookDisplayNames. + */ + java.util.List getWebhookDisplayNamesList(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @return The count of webhookDisplayNames. + */ + int getWebhookDisplayNamesCount(); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the element to return. + * @return The webhookDisplayNames at the given index. + */ + java.lang.String getWebhookDisplayNames(int index); + /** + * + * + *
+   * The list of webhook display names in the order of call sequence.
+   * 
+ * + * repeated string webhook_display_names = 26; + * + * @param index The index of the value to return. + * @return The bytes of the webhookDisplayNames at the given index. + */ + com.google.protobuf.ByteString getWebhookDisplayNamesBytes(int index); + + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + java.util.List getWebhookLatenciesList(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + com.google.protobuf.Duration getWebhookLatencies(int index); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + int getWebhookLatenciesCount(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + java.util.List + getWebhookLatenciesOrBuilderList(); + /** + * + * + *
+   * The list of webhook latencies in the order of call sequence.
+   * 
+ * + * repeated .google.protobuf.Duration webhook_latencies = 27; + */ + com.google.protobuf.DurationOrBuilder getWebhookLatenciesOrBuilder(int index); + + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return A list containing the webhookTags. + */ + java.util.List getWebhookTagsList(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @return The count of webhookTags. + */ + int getWebhookTagsCount(); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the element to return. + * @return The webhookTags at the given index. + */ + java.lang.String getWebhookTags(int index); + /** + * + * + *
+   * The list of webhook tags in the order of call sequence.
+   * 
+ * + * repeated string webhook_tags = 29; + * + * @param index The index of the value to return. + * @return The bytes of the webhookTags at the given index. + */ + com.google.protobuf.ByteString getWebhookTagsBytes(int index); + /** * * @@ -568,6 +773,47 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa */ com.google.cloud.dialogflow.cx.v3beta1.PageOrBuilder getCurrentPageOrBuilder(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + * + * @return Whether the currentFlow field is set. + */ + boolean hasCurrentFlow(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + * + * @return The currentFlow. + */ + com.google.cloud.dialogflow.cx.v3beta1.Flow getCurrentFlow(); + /** + * + * + *
+   * The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all
+   * fields are filled in this message, including but not limited to `name` and
+   * `display_name`.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Flow current_flow = 31; + */ + com.google.cloud.dialogflow.cx.v3beta1.FlowOrBuilder getCurrentFlowOrBuilder(); + /** * * @@ -583,7 +829,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return Whether the intent field is set. */ @java.lang.Deprecated @@ -603,7 +849,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * .google.cloud.dialogflow.cx.v3beta1.Intent intent = 8 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent is deprecated. See - * google/cloud/dialogflow/cx/v3beta1/session.proto;l=921 + * google/cloud/dialogflow/cx/v3beta1/session.proto;l=995 * @return The intent. */ @java.lang.Deprecated @@ -643,7 +889,7 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa * float intent_detection_confidence = 9 [deprecated = true]; * * @deprecated google.cloud.dialogflow.cx.v3beta1.QueryResult.intent_detection_confidence is - * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=932 + * deprecated. See google/cloud/dialogflow/cx/v3beta1/session.proto;l=1006 * @return The intentDetectionConfidence. */ @java.lang.Deprecated @@ -767,6 +1013,41 @@ com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageOrBuilder getResponseMessa */ com.google.protobuf.StructOrBuilder getDiagnosticInfoOrBuilder(); + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return Whether the generativeInfo field is set. + */ + boolean hasGenerativeInfo(); + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + * + * @return The generativeInfo. + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfo getGenerativeInfo(); + /** + * + * + *
+   * The information of a query if handled by generative agent resources.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.GenerativeInfo generative_info = 33; + */ + com.google.cloud.dialogflow.cx.v3beta1.GenerativeInfoOrBuilder getGenerativeInfoOrBuilder(); + /** * * diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java index 57a58fc9878c..2c936a326f41 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SessionProto.java @@ -96,6 +96,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -160,223 +164,253 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "behavior.proto\032\031google/api/resource.prot" + "o\032:google/cloud/dialogflow/cx/v3beta1/ad" + "vanced_settings.proto\0325google/cloud/dial" - + "ogflow/cx/v3beta1/audio_config.proto\032/go" - + "ogle/cloud/dialogflow/cx/v3beta1/intent." - + "proto\032-google/cloud/dialogflow/cx/v3beta" - + "1/page.proto\0329google/cloud/dialogflow/cx" - + "/v3beta1/response_message.proto\032.google.cloud.dialogfl" - + "ow.cx.v3beta1.StreamingRecognitionResult" - + "H\000\022Z\n\026detect_intent_response\030\002 \001(\01328.goo" - + "gle.cloud.dialogflow.cx.v3beta1.DetectIn" - + "tentResponseH\000\022Z\n\016debugging_info\030\004 \001(\0132B" - + ".google.cloud.dialogflow.cx.v3beta1.Clou" - + "dConversationDebuggingInfoB\n\n\010response\"\300" - + "\003\n\032StreamingRecognitionResult\022`\n\014message" - + "_type\030\001 \001(\0162J.google.cloud.dialogflow.cx" - + ".v3beta1.StreamingRecognitionResult.Mess" - + "ageType\022\022\n\ntranscript\030\002 \001(\t\022\020\n\010is_final\030" - + "\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\tstability\030\006" - + " \001(\002\022L\n\020speech_word_info\030\007 \003(\01322.google." - + "cloud.dialogflow.cx.v3beta1.SpeechWordIn" - + "fo\0224\n\021speech_end_offset\030\010 \001(\0132\031.google.p" - + "rotobuf.Duration\022\025\n\rlanguage_code\030\n \001(\t\"" - + "X\n\013MessageType\022\034\n\030MESSAGE_TYPE_UNSPECIFI" - + "ED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_OF_SINGLE_UT" - + "TERANCE\020\002\"\232\006\n\017QueryParameters\022\021\n\ttime_zo" - + "ne\030\001 \001(\t\022)\n\014geo_location\030\002 \001(\0132\023.google." - + "type.LatLng\022S\n\024session_entity_types\030\003 \003(" - + "\01325.google.cloud.dialogflow.cx.v3beta1.S" - + "essionEntityType\022(\n\007payload\030\004 \001(\0132\027.goog" - + "le.protobuf.Struct\022+\n\nparameters\030\005 \001(\0132\027" - + ".google.protobuf.Struct\0229\n\014current_page\030" - + "\006 \001(\tB#\372A \n\036dialogflow.googleapis.com/Pa" - + "ge\022\027\n\017disable_webhook\030\007 \001(\010\022$\n\034analyze_q" - + "uery_text_sentiment\030\010 \001(\010\022`\n\017webhook_hea" - + "ders\030\n \003(\0132G.google.cloud.dialogflow.cx." - + "v3beta1.QueryParameters.WebhookHeadersEn" - + "try\022=\n\rflow_versions\030\016 \003(\tB&\372A#\n!dialogf" - + "low.googleapis.com/Version\022\017\n\007channel\030\017 " - + "\001(\t\0223\n\013session_ttl\030\020 \001(\0132\031.google.protob" - + "uf.DurationB\003\340A\001\0227\n\021end_user_metadata\030\022 " - + "\001(\0132\027.google.protobuf.StructB\003\340A\001\022L\n\rsea" - + "rch_config\030\024 \001(\01320.google.cloud.dialogfl" - + "ow.cx.v3beta1.SearchConfigB\003\340A\001\0325\n\023Webho" - + "okHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\"\244\001\n\014SearchConfig\022H\n\013boost_specs\030\001" - + " \003(\0132..google.cloud.dialogflow.cx.v3beta" - + "1.BoostSpecsB\003\340A\001\022J\n\014filter_specs\030\002 \003(\0132" - + "/.google.cloud.dialogflow.cx.v3beta1.Fil" - + "terSpecsB\003\340A\001\"\263\001\n\tBoostSpec\022d\n\025condition" - + "_boost_specs\030\001 \003(\0132@.google.cloud.dialog" - + "flow.cx.v3beta1.BoostSpec.ConditionBoost" - + "SpecB\003\340A\001\032@\n\022ConditionBoostSpec\022\026\n\tcondi" - + "tion\030\001 \001(\tB\003\340A\001\022\022\n\005boost\030\002 \001(\002B\003\340A\001\"\225\001\n\n" - + "BoostSpecs\022E\n\013data_stores\030\001 \003(\tB0\340A\001\372A*\n" + + "ogflow/cx/v3beta1/audio_config.proto\0320go" + + "ogle/cloud/dialogflow/cx/v3beta1/example" + + ".proto\032-google/cloud/dialogflow/cx/v3bet" + + "a1/flow.proto\032.google.clo" + + "ud.dialogflow.cx.v3beta1.StreamingRecogn" + + "itionResultH\000\022Z\n\026detect_intent_response\030" + + "\002 \001(\01328.google.cloud.dialogflow.cx.v3bet" + + "a1.DetectIntentResponseH\000\022Z\n\016debugging_i" + + "nfo\030\004 \001(\0132B.google.cloud.dialogflow.cx.v" + + "3beta1.CloudConversationDebuggingInfoB\n\n" + + "\010response\"\300\003\n\032StreamingRecognitionResult" + + "\022`\n\014message_type\030\001 \001(\0162J.google.cloud.di" + + "alogflow.cx.v3beta1.StreamingRecognition" + + "Result.MessageType\022\022\n\ntranscript\030\002 \001(\t\022\020" + + "\n\010is_final\030\003 \001(\010\022\022\n\nconfidence\030\004 \001(\002\022\021\n\t" + + "stability\030\006 \001(\002\022L\n\020speech_word_info\030\007 \003(" + + "\01322.google.cloud.dialogflow.cx.v3beta1.S" + + "peechWordInfo\0224\n\021speech_end_offset\030\010 \001(\013" + + "2\031.google.protobuf.Duration\022\025\n\rlanguage_" + + "code\030\n \001(\t\"X\n\013MessageType\022\034\n\030MESSAGE_TYP" + + "E_UNSPECIFIED\020\000\022\016\n\nTRANSCRIPT\020\001\022\033\n\027END_O" + + "F_SINGLE_UTTERANCE\020\002\"\267\007\n\017QueryParameters" + + "\022\021\n\ttime_zone\030\001 \001(\t\022)\n\014geo_location\030\002 \001(" + + "\0132\023.google.type.LatLng\022S\n\024session_entity" + + "_types\030\003 \003(\01325.google.cloud.dialogflow.c" + + "x.v3beta1.SessionEntityType\022(\n\007payload\030\004" + + " \001(\0132\027.google.protobuf.Struct\022+\n\nparamet" + + "ers\030\005 \001(\0132\027.google.protobuf.Struct\0229\n\014cu" + + "rrent_page\030\006 \001(\tB#\372A \n\036dialogflow.google" + + "apis.com/Page\022\027\n\017disable_webhook\030\007 \001(\010\022$" + + "\n\034analyze_query_text_sentiment\030\010 \001(\010\022`\n\017" + + "webhook_headers\030\n \003(\0132G.google.cloud.dia" + + "logflow.cx.v3beta1.QueryParameters.Webho" + + "okHeadersEntry\022=\n\rflow_versions\030\016 \003(\tB&\372" + + "A#\n!dialogflow.googleapis.com/Version\022D\n" + + "\020current_playbook\030\023 \001(\tB*\340A\001\372A$\n\"dialogf" + + "low.googleapis.com/Playbook\022U\n\022llm_model" + + "_settings\030\025 \001(\01324.google.cloud.dialogflo" + + "w.cx.v3beta1.LlmModelSettingsB\003\340A\001\022\017\n\007ch" + + "annel\030\017 \001(\t\0223\n\013session_ttl\030\020 \001(\0132\031.googl" + + "e.protobuf.DurationB\003\340A\001\0227\n\021end_user_met" + + "adata\030\022 \001(\0132\027.google.protobuf.StructB\003\340A" + + "\001\022L\n\rsearch_config\030\024 \001(\01320.google.cloud." + + "dialogflow.cx.v3beta1.SearchConfigB\003\340A\001\032" + + "5\n\023WebhookHeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"\244\001\n\014SearchConfig\022H\n\013boost" + + "_specs\030\001 \003(\0132..google.cloud.dialogflow.c" + + "x.v3beta1.BoostSpecsB\003\340A\001\022J\n\014filter_spec" + + "s\030\002 \003(\0132/.google.cloud.dialogflow.cx.v3b" + + "eta1.FilterSpecsB\003\340A\001\"\263\001\n\tBoostSpec\022d\n\025c" + + "ondition_boost_specs\030\001 \003(\0132@.google.clou" + + "d.dialogflow.cx.v3beta1.BoostSpec.Condit" + + "ionBoostSpecB\003\340A\001\032@\n\022ConditionBoostSpec\022" + + "\026\n\tcondition\030\001 \001(\tB\003\340A\001\022\022\n\005boost\030\002 \001(\002B\003" + + "\340A\001\"\225\001\n\nBoostSpecs\022E\n\013data_stores\030\001 \003(\tB" + + "0\340A\001\372A*\n(discoveryengine.googleapis.com/" + + "DataStore\022@\n\004spec\030\002 \003(\0132-.google.cloud.d" + + "ialogflow.cx.v3beta1.BoostSpecB\003\340A\001\"i\n\013F" + + "ilterSpecs\022E\n\013data_stores\030\001 \003(\tB0\340A\001\372A*\n" + "(discoveryengine.googleapis.com/DataStor" - + "e\022@\n\004spec\030\002 \003(\0132-.google.cloud.dialogflo" - + "w.cx.v3beta1.BoostSpecB\003\340A\001\"i\n\013FilterSpe" - + "cs\022E\n\013data_stores\030\001 \003(\tB0\340A\001\372A*\n(discove" - + "ryengine.googleapis.com/DataStore\022\023\n\006fil" - + "ter\030\002 \001(\tB\003\340A\001\"\364\002\n\nQueryInput\022=\n\004text\030\002 " - + "\001(\0132-.google.cloud.dialogflow.cx.v3beta1" - + ".TextInputH\000\022A\n\006intent\030\003 \001(\0132/.google.cl" - + "oud.dialogflow.cx.v3beta1.IntentInputH\000\022" - + "?\n\005audio\030\005 \001(\0132..google.cloud.dialogflow" - + ".cx.v3beta1.AudioInputH\000\022?\n\005event\030\006 \001(\0132" - + "..google.cloud.dialogflow.cx.v3beta1.Eve" - + "ntInputH\000\022=\n\004dtmf\030\007 \001(\0132-.google.cloud.d" - + "ialogflow.cx.v3beta1.DtmfInputH\000\022\032\n\rlang" - + "uage_code\030\004 \001(\tB\003\340A\002B\007\n\005input\"\257\007\n\013QueryR" - + "esult\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_intent\030" - + "\013 \001(\tB%\372A\"\n dialogflow.googleapis.com/In" - + "tentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rtrigger_" - + "event\030\016 \001(\tH\000\022=\n\004dtmf\030\027 \001(\0132-.google.clo" - + "ud.dialogflow.cx.v3beta1.DtmfInputH\000\022\025\n\r" - + "language_code\030\002 \001(\t\022+\n\nparameters\030\003 \001(\0132" - + "\027.google.protobuf.Struct\022N\n\021response_mes" - + "sages\030\004 \003(\01323.google.cloud.dialogflow.cx" - + ".v3beta1.ResponseMessage\022,\n\020webhook_stat" - + "uses\030\r \003(\0132\022.google.rpc.Status\0221\n\020webhoo" - + "k_payloads\030\006 \003(\0132\027.google.protobuf.Struc" - + "t\022>\n\014current_page\030\007 \001(\0132(.google.cloud.d" - + "ialogflow.cx.v3beta1.Page\022>\n\006intent\030\010 \001(" - + "\0132*.google.cloud.dialogflow.cx.v3beta1.I" - + "ntentB\002\030\001\022\'\n\033intent_detection_confidence" - + "\030\t \001(\002B\002\030\001\0228\n\005match\030\017 \001(\0132).google.cloud" - + ".dialogflow.cx.v3beta1.Match\0220\n\017diagnost" - + "ic_info\030\n \001(\0132\027.google.protobuf.Struct\022^" - + "\n\031sentiment_analysis_result\030\021 \001(\0132;.goog" - + "le.cloud.dialogflow.cx.v3beta1.Sentiment" - + "AnalysisResult\022O\n\021advanced_settings\030\025 \001(" - + "\01324.google.cloud.dialogflow.cx.v3beta1.A" - + "dvancedSettings\022\035\n\025allow_answer_feedback" - + "\030 \001(\010B\007\n\005query\"\036\n\tTextInput\022\021\n\004text\030\001 \001" - + "(\tB\003\340A\002\"G\n\013IntentInput\0228\n\006intent\030\001 \001(\tB(" - + "\340A\002\372A\"\n dialogflow.googleapis.com/Intent" - + "\"f\n\nAudioInput\022I\n\006config\030\001 \001(\01324.google." - + "cloud.dialogflow.cx.v3beta1.InputAudioCo" - + "nfigB\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r" - + "\n\005event\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001" - + "(\t\022\024\n\014finish_digit\030\002 \001(\t\"\373\002\n\005Match\022:\n\006in" - + "tent\030\001 \001(\0132*.google.cloud.dialogflow.cx." - + "v3beta1.Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparamet" - + "ers\030\002 \001(\0132\027.google.protobuf.Struct\022\026\n\016re" - + "solved_input\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623" + + "e\022\023\n\006filter\030\002 \001(\tB\003\340A\001\"\304\003\n\nQueryInput\022=\n" + + "\004text\030\002 \001(\0132-.google.cloud.dialogflow.cx" + + ".v3beta1.TextInputH\000\022A\n\006intent\030\003 \001(\0132/.g" + + "oogle.cloud.dialogflow.cx.v3beta1.Intent" + + "InputH\000\022?\n\005audio\030\005 \001(\0132..google.cloud.di" + + "alogflow.cx.v3beta1.AudioInputH\000\022?\n\005even" + + "t\030\006 \001(\0132..google.cloud.dialogflow.cx.v3b" + + "eta1.EventInputH\000\022=\n\004dtmf\030\007 \001(\0132-.google" + + ".cloud.dialogflow.cx.v3beta1.DtmfInputH\000" + + "\022N\n\020tool_call_result\030\013 \001(\01322.google.clou" + + "d.dialogflow.cx.v3beta1.ToolCallResultH\000" + + "\022\032\n\rlanguage_code\030\004 \001(\tB\003\340A\002B\007\n\005input\"u\n" + + "\016GenerativeInfo\022\031\n\021current_playbooks\030\001 \003" + + "(\t\022H\n\023action_tracing_info\030\002 \001(\0132+.google" + + ".cloud.dialogflow.cx.v3beta1.Example\"\274\t\n" + + "\013QueryResult\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger_" + + "intent\030\013 \001(\tB%\372A\"\n dialogflow.googleapis" + + ".com/IntentH\000\022\024\n\ntranscript\030\014 \001(\tH\000\022\027\n\rt" + + "rigger_event\030\016 \001(\tH\000\022=\n\004dtmf\030\027 \001(\0132-.goo" + + "gle.cloud.dialogflow.cx.v3beta1.DtmfInpu" + + "tH\000\022\025\n\rlanguage_code\030\002 \001(\t\022+\n\nparameters" + + "\030\003 \001(\0132\027.google.protobuf.Struct\022N\n\021respo" + + "nse_messages\030\004 \003(\01323.google.cloud.dialog" + + "flow.cx.v3beta1.ResponseMessage\022\023\n\013webho" + + "ok_ids\030\031 \003(\t\022\035\n\025webhook_display_names\030\032 " + + "\003(\t\0224\n\021webhook_latencies\030\033 \003(\0132\031.google." + + "protobuf.Duration\022\024\n\014webhook_tags\030\035 \003(\t\022" + + ",\n\020webhook_statuses\030\r \003(\0132\022.google.rpc.S" + + "tatus\0221\n\020webhook_payloads\030\006 \003(\0132\027.google" + + ".protobuf.Struct\022>\n\014current_page\030\007 \001(\0132(" + + ".google.cloud.dialogflow.cx.v3beta1.Page" + + "\022>\n\014current_flow\030\037 \001(\0132(.google.cloud.di" + + "alogflow.cx.v3beta1.Flow\022>\n\006intent\030\010 \001(\013" + + "2*.google.cloud.dialogflow.cx.v3beta1.In" + + "tentB\002\030\001\022\'\n\033intent_detection_confidence\030" + + "\t \001(\002B\002\030\001\0228\n\005match\030\017 \001(\0132).google.cloud." + + "dialogflow.cx.v3beta1.Match\0220\n\017diagnosti" + + "c_info\030\n \001(\0132\027.google.protobuf.Struct\022K\n" + + "\017generative_info\030! \001(\01322.google.cloud.di" + + "alogflow.cx.v3beta1.GenerativeInfo\022^\n\031se" + + "ntiment_analysis_result\030\021 \001(\0132;.google.c" + + "loud.dialogflow.cx.v3beta1.SentimentAnal" + + "ysisResult\022O\n\021advanced_settings\030\025 \001(\01324." + + "google.cloud.dialogflow.cx.v3beta1.Advan" + + "cedSettings\022\035\n\025allow_answer_feedback\030 \001" + + "(\010B\007\n\005query\"\036\n\tTextInput\022\021\n\004text\030\001 \001(\tB\003" + + "\340A\002\"G\n\013IntentInput\0228\n\006intent\030\001 \001(\tB(\340A\002\372" + + "A\"\n dialogflow.googleapis.com/Intent\"f\n\n" + + "AudioInput\022I\n\006config\030\001 \001(\01324.google.clou" + + "d.dialogflow.cx.v3beta1.InputAudioConfig" + + "B\003\340A\002\022\r\n\005audio\030\002 \001(\014\"\033\n\nEventInput\022\r\n\005ev" + + "ent\030\001 \001(\t\"1\n\tDtmfInput\022\016\n\006digits\030\001 \001(\t\022\024" + + "\n\014finish_digit\030\002 \001(\t\"\373\002\n\005Match\022:\n\006intent" + + "\030\001 \001(\0132*.google.cloud.dialogflow.cx.v3be" + + "ta1.Intent\022\r\n\005event\030\006 \001(\t\022+\n\nparameters\030" + + "\002 \001(\0132\027.google.protobuf.Struct\022\026\n\016resolv" + + "ed_input\030\003 \001(\t\022G\n\nmatch_type\030\004 \001(\01623.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Match.Ma" + + "tchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatchTyp" + + "e\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INTENT\020" + + "\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FILLIN" + + "G\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005EVENT" + + "\020\006\"\210\002\n\022MatchIntentRequest\022:\n\007session\030\001 \001" + + "(\tB)\340A\002\372A#\n!dialogflow.googleapis.com/Se" + + "ssion\022I\n\014query_params\030\002 \001(\01323.google.clo" + + "ud.dialogflow.cx.v3beta1.QueryParameters" + + "\022H\n\013query_input\030\003 \001(\0132..google.cloud.dia" + + "logflow.cx.v3beta1.QueryInputB\003\340A\002\022!\n\031pe" + + "rsist_parameter_changes\030\005 \001(\010\"\232\002\n\023MatchI" + + "ntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016trigger" + + "_intent\030\002 \001(\tB%\372A\"\n dialogflow.googleapi" + + "s.com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000\022\027\n\r" + + "trigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003(\0132)" + ".google.cloud.dialogflow.cx.v3beta1.Matc" - + "h.MatchType\022\022\n\nconfidence\030\005 \001(\002\"\204\001\n\tMatc" - + "hType\022\032\n\026MATCH_TYPE_UNSPECIFIED\020\000\022\n\n\006INT" - + "ENT\020\001\022\021\n\rDIRECT_INTENT\020\002\022\025\n\021PARAMETER_FI" - + "LLING\020\003\022\014\n\010NO_MATCH\020\004\022\014\n\010NO_INPUT\020\005\022\t\n\005E" - + "VENT\020\006\"\210\002\n\022MatchIntentRequest\022:\n\007session" - + "\030\001 \001(\tB)\340A\002\372A#\n!dialogflow.googleapis.co" - + "m/Session\022I\n\014query_params\030\002 \001(\01323.google" - + ".cloud.dialogflow.cx.v3beta1.QueryParame" - + "ters\022H\n\013query_input\030\003 \001(\0132..google.cloud" - + ".dialogflow.cx.v3beta1.QueryInputB\003\340A\002\022!" - + "\n\031persist_parameter_changes\030\005 \001(\010\"\232\002\n\023Ma" - + "tchIntentResponse\022\016\n\004text\030\001 \001(\tH\000\022?\n\016tri" - + "gger_intent\030\002 \001(\tB%\372A\"\n dialogflow.googl" - + "eapis.com/IntentH\000\022\024\n\ntranscript\030\003 \001(\tH\000" - + "\022\027\n\rtrigger_event\030\006 \001(\tH\000\022:\n\007matches\030\004 \003" - + "(\0132).google.cloud.dialogflow.cx.v3beta1." - + "Match\022>\n\014current_page\030\005 \001(\0132(.google.clo" - + "ud.dialogflow.cx.v3beta1.PageB\007\n\005query\"\372" - + "\001\n\024FulfillIntentRequest\022T\n\024match_intent_" - + "request\030\001 \001(\01326.google.cloud.dialogflow." - + "cx.v3beta1.MatchIntentRequest\0228\n\005match\030\002" - + " \001(\0132).google.cloud.dialogflow.cx.v3beta" - + "1.Match\022R\n\023output_audio_config\030\003 \001(\01325.g" - + "oogle.cloud.dialogflow.cx.v3beta1.Output" - + "AudioConfig\"\335\001\n\025FulfillIntentResponse\022\023\n" - + "\013response_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\013" - + "2/.google.cloud.dialogflow.cx.v3beta1.Qu" - + "eryResult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023outpu" - + "t_audio_config\030\004 \001(\01325.google.cloud.dial" - + "ogflow.cx.v3beta1.OutputAudioConfig\";\n\027S" - + "entimentAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n" - + "\tmagnitude\030\002 \001(\0022\367\013\n\010Sessions\022\272\002\n\014Detect" - + "Intent\0227.google.cloud.dialogflow.cx.v3be" - + "ta1.DetectIntentRequest\0328.google.cloud.d" - + "ialogflow.cx.v3beta1.DetectIntentRespons" - + "e\"\266\001\202\323\344\223\002\257\001\"J/v3beta1/{session=projects/" - + "*/locations/*/agents/*/sessions/*}:detec" - + "tIntent:\001*Z^\"Y/v3beta1/{session=projects" - + "/*/locations/*/agents/*/environments/*/s" - + "essions/*}:detectIntent:\001*\022\242\001\n\025Streaming" + + "h\022>\n\014current_page\030\005 \001(\0132(.google.cloud.d" + + "ialogflow.cx.v3beta1.PageB\007\n\005query\"\372\001\n\024F" + + "ulfillIntentRequest\022T\n\024match_intent_requ" + + "est\030\001 \001(\01326.google.cloud.dialogflow.cx.v" + + "3beta1.MatchIntentRequest\0228\n\005match\030\002 \001(\013" + + "2).google.cloud.dialogflow.cx.v3beta1.Ma" + + "tch\022R\n\023output_audio_config\030\003 \001(\01325.googl" + + "e.cloud.dialogflow.cx.v3beta1.OutputAudi" + + "oConfig\"\335\001\n\025FulfillIntentResponse\022\023\n\013res" + + "ponse_id\030\001 \001(\t\022E\n\014query_result\030\002 \001(\0132/.g" + + "oogle.cloud.dialogflow.cx.v3beta1.QueryR" + + "esult\022\024\n\014output_audio\030\003 \001(\014\022R\n\023output_au" + + "dio_config\030\004 \001(\01325.google.cloud.dialogfl" + + "ow.cx.v3beta1.OutputAudioConfig\";\n\027Senti" + + "mentAnalysisResult\022\r\n\005score\030\001 \001(\002\022\021\n\tmag" + + "nitude\030\002 \001(\0022\343\016\n\010Sessions\022\272\002\n\014DetectInte" + + "nt\0227.google.cloud.dialogflow.cx.v3beta1." + + "DetectIntentRequest\0328.google.cloud.dialo" + + "gflow.cx.v3beta1.DetectIntentResponse\"\266\001" + + "\202\323\344\223\002\257\001\"J/v3beta1/{session=projects/*/lo" + + "cations/*/agents/*/sessions/*}:detectInt" + + "ent:\001*Z^\"Y/v3beta1/{session=projects/*/l" + + "ocations/*/agents/*/environments/*/sessi" + + "ons/*}:detectIntent:\001*\022\351\002\n\033ServerStreami" + + "ngDetectIntent\0227.google.cloud.dialogflow" + + ".cx.v3beta1.DetectIntentRequest\0328.google" + + ".cloud.dialogflow.cx.v3beta1.DetectInten" + + "tResponse\"\324\001\202\323\344\223\002\315\001\"Y/v3beta1/{session=p" + + "rojects/*/locations/*/agents/*/sessions/" + + "*}:serverStreamingDetectIntent:\001*Zm\"h/v3" + + "beta1/{session=projects/*/locations/*/ag" + + "ents/*/environments/*/sessions/*}:server" + + "StreamingDetectIntent:\001*0\001\022\242\001\n\025Streaming" + "DetectIntent\022@.google.cloud.dialogflow.c" + "x.v3beta1.StreamingDetectIntentRequest\032A" + ".google.cloud.dialogflow.cx.v3beta1.Stre" @@ -434,10 +468,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.ExampleProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(), com.google.cloud.dialogflow.cx.v3beta1.SessionEntityTypeProto.getDescriptor(), + com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), @@ -568,6 +606,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AnalyzeQueryTextSentiment", "WebhookHeaders", "FlowVersions", + "CurrentPlaybook", + "LlmModelSettings", "Channel", "SessionTtl", "EndUserMetadata", @@ -631,10 +671,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_QueryInput_descriptor, new java.lang.String[] { - "Text", "Intent", "Audio", "Event", "Dtmf", "LanguageCode", "Input", + "Text", "Intent", "Audio", "Event", "Dtmf", "ToolCallResult", "LanguageCode", "Input", }); - internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor = getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_GenerativeInfo_descriptor, + new java.lang.String[] { + "CurrentPlaybooks", "ActionTracingInfo", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor = + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_QueryResult_descriptor, @@ -647,20 +695,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "LanguageCode", "Parameters", "ResponseMessages", + "WebhookIds", + "WebhookDisplayNames", + "WebhookLatencies", + "WebhookTags", "WebhookStatuses", "WebhookPayloads", "CurrentPage", + "CurrentFlow", "Intent", "IntentDetectionConfidence", "Match", "DiagnosticInfo", + "GenerativeInfo", "SentimentAnalysisResult", "AdvancedSettings", "AllowAnswerFeedback", "Query", }); internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_TextInput_descriptor, @@ -668,7 +722,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Text", }); internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_IntentInput_descriptor, @@ -676,7 +730,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", }); internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_AudioInput_descriptor, @@ -684,7 +738,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Config", "Audio", }); internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_EventInput_descriptor, @@ -692,7 +746,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Event", }); internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_DtmfInput_descriptor, @@ -700,7 +754,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Digits", "FinishDigit", }); internal_static_google_cloud_dialogflow_cx_v3beta1_Match_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_dialogflow_cx_v3beta1_Match_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_Match_descriptor, @@ -708,7 +762,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Intent", "Event", "Parameters", "ResolvedInput", "MatchType", "Confidence", }); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentRequest_descriptor, @@ -716,7 +770,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Session", "QueryParams", "QueryInput", "PersistParameterChanges", }); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_MatchIntentResponse_descriptor, @@ -730,7 +784,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Query", }); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentRequest_descriptor, @@ -738,7 +792,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MatchIntentRequest", "Match", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_FulfillIntentResponse_descriptor, @@ -746,7 +800,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ResponseId", "QueryResult", "OutputAudio", "OutputAudioConfig", }); internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dialogflow_cx_v3beta1_SentimentAnalysisResult_descriptor, @@ -769,10 +823,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.AdvancedSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.AudioConfigProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.ExampleProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.FlowProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.GenerativeSettingsProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.IntentProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.PageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.ResponseMessageProto.getDescriptor(); com.google.cloud.dialogflow.cx.v3beta1.SessionEntityTypeProto.getDescriptor(); + com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechModelVariant.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechModelVariant.java index c4cf25463696..f5846ee50ee2 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechModelVariant.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/SpeechModelVariant.java @@ -53,10 +53,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu *
    * Use the best available variant of the [Speech
    * model][InputAudioConfig.model] that the caller is eligible for.
-   *
-   * Please see the [Dialogflow
-   * docs](https://cloud.google.com/dialogflow/docs/data-logging) for
-   * how to make your project eligible for enhanced models.
    * 
* * USE_BEST_AVAILABLE = 1; @@ -88,11 +84,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu * The [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * describes which models have enhanced variants. - * - * * If the API caller isn't eligible for enhanced models, Dialogflow returns - * an error. Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) - * for how to make your project eligible. *
* * USE_ENHANCED = 3; @@ -118,10 +109,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu *
    * Use the best available variant of the [Speech
    * model][InputAudioConfig.model] that the caller is eligible for.
-   *
-   * Please see the [Dialogflow
-   * docs](https://cloud.google.com/dialogflow/docs/data-logging) for
-   * how to make your project eligible for enhanced models.
    * 
* * USE_BEST_AVAILABLE = 1; @@ -153,11 +140,6 @@ public enum SpeechModelVariant implements com.google.protobuf.ProtocolMessageEnu * The [Cloud Speech * documentation](https://cloud.google.com/speech-to-text/docs/enhanced-models) * describes which models have enhanced variants. - * - * * If the API caller isn't eligible for enhanced models, Dialogflow returns - * an error. Please see the [Dialogflow - * docs](https://cloud.google.com/dialogflow/docs/data-logging) - * for how to make your project eligible. *
* * USE_ENHANCED = 3; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingRecognitionResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingRecognitionResult.java index aa3db3bc1d93..d6e583069e4d 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingRecognitionResult.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/StreamingRecognitionResult.java @@ -136,9 +136,9 @@ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Event indicates that the server has detected the end of the user's speech
-     * utterance and expects no additional speech. Therefore, the server will
-     * not process additional audio (although it may subsequently return
+     * This event indicates that the server has detected the end of the user's
+     * speech utterance and expects no additional speech. Therefore, the server
+     * will not process additional audio (although it may subsequently return
      * additional results). The client should stop sending additional audio
      * data, half-close the gRPC connection, and wait for any additional results
      * until the server closes the gRPC connection. This message is only sent if
@@ -176,9 +176,9 @@ public enum MessageType implements com.google.protobuf.ProtocolMessageEnum {
      *
      *
      * 
-     * Event indicates that the server has detected the end of the user's speech
-     * utterance and expects no additional speech. Therefore, the server will
-     * not process additional audio (although it may subsequently return
+     * This event indicates that the server has detected the end of the user's
+     * speech utterance and expects no additional speech. Therefore, the server
+     * will not process additional audio (although it may subsequently return
      * additional results). The client should stop sending additional audio
      * data, half-close the gRPC connection, and wait for any additional results
      * until the server closes the gRPC connection. This message is only sent if
diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInput.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInput.java
index ef3bb2a41c9e..77883b3183e3 100644
--- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInput.java
+++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInput.java
@@ -71,8 +71,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *
    *
    * 
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -95,8 +94,7 @@ public java.lang.String getText() { * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -463,8 +461,7 @@ public Builder mergeFrom( * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -486,8 +483,7 @@ public java.lang.String getText() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -509,8 +505,7 @@ public com.google.protobuf.ByteString getTextBytes() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -531,8 +526,7 @@ public Builder setText(java.lang.String value) { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -549,8 +543,7 @@ public Builder clearText() { * * *
-     * Required. The UTF-8 encoded natural language text to be processed. Text
-     * length must not exceed 256 characters.
+     * Required. The UTF-8 encoded natural language text to be processed.
      * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInputOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInputOrBuilder.java index 7c99c2285efe..5a0a55aaefc0 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInputOrBuilder.java +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TextInputOrBuilder.java @@ -28,8 +28,7 @@ public interface TextInputOrBuilder * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -41,8 +40,7 @@ public interface TextInputOrBuilder * * *
-   * Required. The UTF-8 encoded natural language text to be processed. Text
-   * length must not exceed 256 characters.
+   * Required. The UTF-8 encoded natural language text to be processed.
    * 
* * string text = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java new file mode 100644 index 000000000000..9f7c53101398 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/Tool.java @@ -0,0 +1,15248 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * A tool provides a list of actions which are available to the
+ * [Playbook][google.cloud.dialogflow.cx.v3beta1.Playbook] to attain its goal. A
+ * Tool consists of a description of the tool's usage and a specification of the
+ * tool which contains the schema and authentication information.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool} + */ +public final class Tool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool) + ToolOrBuilder { + private static final long serialVersionUID = 0L; + // Use Tool.newBuilder() to construct. + private Tool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Tool() { + name_ = ""; + displayName_ = ""; + description_ = ""; + actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); + toolType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Tool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder.class); + } + + /** + * + * + *
+   * Represents the type of the tool.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Tool.ToolType} + */ + public enum ToolType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TOOL_TYPE_UNSPECIFIED = 0; + */ + TOOL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Customer provided tool.
+     * 
+ * + * CUSTOMIZED_TOOL = 1; + */ + CUSTOMIZED_TOOL(1), + /** + * + * + *
+     * First party built-in tool created by Dialogflow which cannot be modified.
+     * 
+ * + * BUILTIN_TOOL = 2; + */ + BUILTIN_TOOL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This value is unused.
+     * 
+ * + * TOOL_TYPE_UNSPECIFIED = 0; + */ + public static final int TOOL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Customer provided tool.
+     * 
+ * + * CUSTOMIZED_TOOL = 1; + */ + public static final int CUSTOMIZED_TOOL_VALUE = 1; + /** + * + * + *
+     * First party built-in tool created by Dialogflow which cannot be modified.
+     * 
+ * + * BUILTIN_TOOL = 2; + */ + public static final int BUILTIN_TOOL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ToolType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ToolType forNumber(int value) { + switch (value) { + case 0: + return TOOL_TYPE_UNSPECIFIED; + case 1: + return CUSTOMIZED_TOOL; + case 2: + return BUILTIN_TOOL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ToolType findValueByNumber(int number) { + return ToolType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.getDescriptor().getEnumTypes().get(0); + } + + private static final ToolType[] VALUES = values(); + + public static ToolType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ToolType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ToolType) + } + + public interface OpenApiToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + boolean hasTextSchema(); + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + java.lang.String getTextSchema(); + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + com.google.protobuf.ByteString getTextSchemaBytes(); + + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + boolean hasAuthentication(); + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication(); + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder + getAuthenticationOrBuilder(); + + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + boolean hasTlsConfig(); + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig(); + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.SchemaCase getSchemaCase(); + } + /** + * + * + *
+   * An OpenAPI tool is a way to provide the Tool specifications in the Open API
+   * schema format.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool} + */ + public static final class OpenApiTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) + OpenApiToolOrBuilder { + private static final long serialVersionUID = 0L; + // Use OpenApiTool.newBuilder() to construct. + private OpenApiTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OpenApiTool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OpenApiTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder.class); + } + + private int bitField0_; + private int schemaCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object schema_; + + public enum SchemaCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TEXT_SCHEMA(1), + SCHEMA_NOT_SET(0); + private final int value; + + private SchemaCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SchemaCase valueOf(int value) { + return forNumber(value); + } + + public static SchemaCase forNumber(int value) { + switch (value) { + case 1: + return TEXT_SCHEMA; + case 0: + return SCHEMA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public static final int TEXT_SCHEMA_FIELD_NUMBER = 1; + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + public boolean hasTextSchema() { + return schemaCase_ == 1; + } + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + public java.lang.String getTextSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (schemaCase_ == 1) { + schema_ = s; + } + return s; + } + } + /** + * + * + *
+     * Required. The OpenAPI schema specified as a text.
+     * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + public com.google.protobuf.ByteString getTextSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 1) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHENTICATION_FIELD_NUMBER = 2; + private com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication_; + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + @java.lang.Override + public boolean hasAuthentication() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication() { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance() + : authentication_; + } + /** + * + * + *
+     * Optional. Authentication information required by the API.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder + getAuthenticationOrBuilder() { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance() + : authentication_; + } + + public static final int TLS_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tlsConfig_; + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + @java.lang.Override + public boolean hasTlsConfig() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig() { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + /** + * + * + *
+     * Optional. TLS configuration for the HTTPS verification.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder getTlsConfigOrBuilder() { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (schemaCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAuthentication()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getTlsConfig()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (schemaCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAuthentication()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTlsConfig()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) obj; + + if (hasAuthentication() != other.hasAuthentication()) return false; + if (hasAuthentication()) { + if (!getAuthentication().equals(other.getAuthentication())) return false; + } + if (hasTlsConfig() != other.hasTlsConfig()) return false; + if (hasTlsConfig()) { + if (!getTlsConfig().equals(other.getTlsConfig())) return false; + } + if (!getSchemaCase().equals(other.getSchemaCase())) return false; + switch (schemaCase_) { + case 1: + if (!getTextSchema().equals(other.getTextSchema())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAuthentication()) { + hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER; + hash = (53 * hash) + getAuthentication().hashCode(); + } + if (hasTlsConfig()) { + hash = (37 * hash) + TLS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTlsConfig().hashCode(); + } + switch (schemaCase_) { + case 1: + hash = (37 * hash) + TEXT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getTextSchema().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An OpenAPI tool is a way to provide the Tool specifications in the Open API
+     * schema format.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAuthenticationFieldBuilder(); + getTlsConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + authentication_ = null; + if (authenticationBuilder_ != null) { + authenticationBuilder_.dispose(); + authenticationBuilder_ = null; + } + tlsConfig_ = null; + if (tlsConfigBuilder_ != null) { + tlsConfigBuilder_.dispose(); + tlsConfigBuilder_ = null; + } + schemaCase_ = 0; + schema_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authentication_ = + authenticationBuilder_ == null ? authentication_ : authenticationBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tlsConfig_ = tlsConfigBuilder_ == null ? tlsConfig_ : tlsConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool result) { + result.schemaCase_ = schemaCase_; + result.schema_ = this.schema_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance()) + return this; + if (other.hasAuthentication()) { + mergeAuthentication(other.getAuthentication()); + } + if (other.hasTlsConfig()) { + mergeTlsConfig(other.getTlsConfig()); + } + switch (other.getSchemaCase()) { + case TEXT_SCHEMA: + { + schemaCase_ = 1; + schema_ = other.schema_; + onChanged(); + break; + } + case SCHEMA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + schemaCase_ = 1; + schema_ = s; + break; + } // case 10 + case 18: + { + input.readMessage( + getAuthenticationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTlsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int schemaCase_ = 0; + private java.lang.Object schema_; + + public SchemaCase getSchemaCase() { + return SchemaCase.forNumber(schemaCase_); + } + + public Builder clearSchema() { + schemaCase_ = 0; + schema_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the textSchema field is set. + */ + @java.lang.Override + public boolean hasTextSchema() { + return schemaCase_ == 1; + } + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The textSchema. + */ + @java.lang.Override + public java.lang.String getTextSchema() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (schemaCase_ == 1) { + schema_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for textSchema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextSchemaBytes() { + java.lang.Object ref = ""; + if (schemaCase_ == 1) { + ref = schema_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (schemaCase_ == 1) { + schema_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The textSchema to set. + * @return This builder for chaining. + */ + public Builder setTextSchema(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + schemaCase_ = 1; + schema_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTextSchema() { + if (schemaCase_ == 1) { + schemaCase_ = 0; + schema_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. The OpenAPI schema specified as a text.
+       * 
+ * + * string text_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for textSchema to set. + * @return This builder for chaining. + */ + public Builder setTextSchemaBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaCase_ = 1; + schema_ = value; + onChanged(); + return this; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder> + authenticationBuilder_; + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the authentication field is set. + */ + public boolean hasAuthentication() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The authentication. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getAuthentication() { + if (authenticationBuilder_ == null) { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance() + : authentication_; + } else { + return authenticationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthentication( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication value) { + if (authenticationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authentication_ = value; + } else { + authenticationBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAuthentication( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder builderForValue) { + if (authenticationBuilder_ == null) { + authentication_ = builderForValue.build(); + } else { + authenticationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAuthentication( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication value) { + if (authenticationBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && authentication_ != null + && authentication_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .getDefaultInstance()) { + getAuthenticationBuilder().mergeFrom(value); + } else { + authentication_ = value; + } + } else { + authenticationBuilder_.mergeFrom(value); + } + if (authentication_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAuthentication() { + bitField0_ = (bitField0_ & ~0x00000002); + authentication_ = null; + if (authenticationBuilder_ != null) { + authenticationBuilder_.dispose(); + authenticationBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder + getAuthenticationBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthenticationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder + getAuthenticationOrBuilder() { + if (authenticationBuilder_ != null) { + return authenticationBuilder_.getMessageOrBuilder(); + } else { + return authentication_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance() + : authentication_; + } + } + /** + * + * + *
+       * Optional. Authentication information required by the API.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication authentication = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder> + getAuthenticationFieldBuilder() { + if (authenticationBuilder_ == null) { + authenticationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder>( + getAuthentication(), getParentForChildren(), isClean()); + authentication_ = null; + } + return authenticationBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tlsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder> + tlsConfigBuilder_; + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the tlsConfig field is set. + */ + public boolean hasTlsConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The tlsConfig. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getTlsConfig() { + if (tlsConfigBuilder_ == null) { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } else { + return tlsConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTlsConfig(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig value) { + if (tlsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tlsConfig_ = value; + } else { + tlsConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setTlsConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder builderForValue) { + if (tlsConfigBuilder_ == null) { + tlsConfig_ = builderForValue.build(); + } else { + tlsConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeTlsConfig(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig value) { + if (tlsConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && tlsConfig_ != null + && tlsConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()) { + getTlsConfigBuilder().mergeFrom(value); + } else { + tlsConfig_ = value; + } + } else { + tlsConfigBuilder_.mergeFrom(value); + } + if (tlsConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearTlsConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + tlsConfig_ = null; + if (tlsConfigBuilder_ != null) { + tlsConfigBuilder_.dispose(); + tlsConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder getTlsConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTlsConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder + getTlsConfigOrBuilder() { + if (tlsConfigBuilder_ != null) { + return tlsConfigBuilder_.getMessageOrBuilder(); + } else { + return tlsConfig_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance() + : tlsConfig_; + } + } + /** + * + * + *
+       * Optional. TLS configuration for the HTTPS verification.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig tls_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder> + getTlsConfigFieldBuilder() { + if (tlsConfigBuilder_ == null) { + tlsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder>( + getTlsConfig(), getParentForChildren(), isClean()); + tlsConfig_ = null; + } + return tlsConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OpenApiTool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataStoreToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDataStoreConnectionsList(); + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections(int index); + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getDataStoreConnectionsCount(); + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getDataStoreConnectionsOrBuilderList(); + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index); + + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + boolean hasFallbackPrompt(); + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt getFallbackPrompt(); + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder(); + } + /** + * + * + *
+   * A DataStoreTool is a way to provide specifications needed to search a
+   * list of data stores.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool} + */ + public static final class DataStoreTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) + DataStoreToolOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataStoreTool.newBuilder() to construct. + private DataStoreTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataStoreTool() { + dataStoreConnections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataStoreTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder.class); + } + + public interface FallbackPromptOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+     * A FallbackPrompt is a way to provide specifications for the Data Store
+     * fallback prompt when generating responses.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt} + */ + public static final class FallbackPrompt extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) + FallbackPromptOrBuilder { + private static final long serialVersionUID = 0L; + // Use FallbackPrompt.newBuilder() to construct. + private FallbackPrompt(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FallbackPrompt() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FallbackPrompt(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder + .class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * A FallbackPrompt is a way to provide specifications for the Data Store
+       * fallback prompt when generating responses.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FallbackPrompt parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DATA_STORE_CONNECTIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List + dataStoreConnections_; + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getDataStoreConnectionsList() { + return dataStoreConnections_; + } + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsOrBuilderList() { + return dataStoreConnections_; + } + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getDataStoreConnectionsCount() { + return dataStoreConnections_.size(); + } + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections( + int index) { + return dataStoreConnections_.get(index); + } + /** + * + * + *
+     * Required. List of data stores to search.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + return dataStoreConnections_.get(index); + } + + public static final int FALLBACK_PROMPT_FIELD_NUMBER = 3; + private com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + fallbackPrompt_; + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + @java.lang.Override + public boolean hasFallbackPrompt() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + getFallbackPrompt() { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } + /** + * + * + *
+     * Required. Fallback prompt configurations to use.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder() { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataStoreConnections_.size(); i++) { + output.writeMessage(1, dataStoreConnections_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getFallbackPrompt()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataStoreConnections_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, dataStoreConnections_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFallbackPrompt()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) obj; + + if (!getDataStoreConnectionsList().equals(other.getDataStoreConnectionsList())) return false; + if (hasFallbackPrompt() != other.hasFallbackPrompt()) return false; + if (hasFallbackPrompt()) { + if (!getFallbackPrompt().equals(other.getFallbackPrompt())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataStoreConnectionsCount() > 0) { + hash = (37 * hash) + DATA_STORE_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreConnectionsList().hashCode(); + } + if (hasFallbackPrompt()) { + hash = (37 * hash) + FALLBACK_PROMPT_FIELD_NUMBER; + hash = (53 * hash) + getFallbackPrompt().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A DataStoreTool is a way to provide specifications needed to search a
+     * list of data stores.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataStoreConnectionsFieldBuilder(); + getFallbackPromptFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + } else { + dataStoreConnections_ = null; + dataStoreConnectionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + fallbackPrompt_ = null; + if (fallbackPromptBuilder_ != null) { + fallbackPromptBuilder_.dispose(); + fallbackPromptBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result) { + if (dataStoreConnectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataStoreConnections_ = java.util.Collections.unmodifiableList(dataStoreConnections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataStoreConnections_ = dataStoreConnections_; + } else { + result.dataStoreConnections_ = dataStoreConnectionsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fallbackPrompt_ = + fallbackPromptBuilder_ == null ? fallbackPrompt_ : fallbackPromptBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance()) + return this; + if (dataStoreConnectionsBuilder_ == null) { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnections_.isEmpty()) { + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.addAll(other.dataStoreConnections_); + } + onChanged(); + } + } else { + if (!other.dataStoreConnections_.isEmpty()) { + if (dataStoreConnectionsBuilder_.isEmpty()) { + dataStoreConnectionsBuilder_.dispose(); + dataStoreConnectionsBuilder_ = null; + dataStoreConnections_ = other.dataStoreConnections_; + bitField0_ = (bitField0_ & ~0x00000001); + dataStoreConnectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataStoreConnectionsFieldBuilder() + : null; + } else { + dataStoreConnectionsBuilder_.addAllMessages(other.dataStoreConnections_); + } + } + } + if (other.hasFallbackPrompt()) { + mergeFallbackPrompt(other.getFallbackPrompt()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.parser(), + extensionRegistry); + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(m); + } else { + dataStoreConnectionsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + input.readMessage( + getFallbackPromptFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dataStoreConnections_ = java.util.Collections.emptyList(); + + private void ensureDataStoreConnectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataStoreConnections_ = + new java.util.ArrayList( + dataStoreConnections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + dataStoreConnectionsBuilder_; + + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDataStoreConnectionsList() { + if (dataStoreConnectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } else { + return dataStoreConnectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getDataStoreConnectionsCount() { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.size(); + } else { + return dataStoreConnectionsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection getDataStoreConnections( + int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.set(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + int index, com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection value) { + if (dataStoreConnectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, value); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addDataStoreConnections( + int index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder builderForValue) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.add(index, builderForValue.build()); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllDataStoreConnections( + java.lang.Iterable + values) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataStoreConnections_); + onChanged(); + } else { + dataStoreConnectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataStoreConnections() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataStoreConnectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeDataStoreConnections(int index) { + if (dataStoreConnectionsBuilder_ == null) { + ensureDataStoreConnectionsIsMutable(); + dataStoreConnections_.remove(index); + onChanged(); + } else { + dataStoreConnectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + getDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder + getDataStoreConnectionsOrBuilder(int index) { + if (dataStoreConnectionsBuilder_ == null) { + return dataStoreConnections_.get(index); + } else { + return dataStoreConnectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsOrBuilderList() { + if (dataStoreConnectionsBuilder_ != null) { + return dataStoreConnectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataStoreConnections_); + } + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + addDataStoreConnectionsBuilder() { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder + addDataStoreConnectionsBuilder(int index) { + return getDataStoreConnectionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.getDefaultInstance()); + } + /** + * + * + *
+       * Required. List of data stores to search.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.DataStoreConnection data_store_connections = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getDataStoreConnectionsBuilderList() { + return getDataStoreConnectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder> + getDataStoreConnectionsFieldBuilder() { + if (dataStoreConnectionsBuilder_ == null) { + dataStoreConnectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnection.Builder, + com.google.cloud.dialogflow.cx.v3beta1.DataStoreConnectionOrBuilder>( + dataStoreConnections_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataStoreConnections_ = null; + } + return dataStoreConnectionsBuilder_; + } + + private com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + fallbackPrompt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder> + fallbackPromptBuilder_; + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the fallbackPrompt field is set. + */ + public boolean hasFallbackPrompt() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The fallbackPrompt. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + getFallbackPrompt() { + if (fallbackPromptBuilder_ == null) { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } else { + return fallbackPromptBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFallbackPrompt( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt value) { + if (fallbackPromptBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fallbackPrompt_ = value; + } else { + fallbackPromptBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setFallbackPrompt( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder + builderForValue) { + if (fallbackPromptBuilder_ == null) { + fallbackPrompt_ = builderForValue.build(); + } else { + fallbackPromptBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeFallbackPrompt( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt value) { + if (fallbackPromptBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && fallbackPrompt_ != null + && fallbackPrompt_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance()) { + getFallbackPromptBuilder().mergeFrom(value); + } else { + fallbackPrompt_ = value; + } + } else { + fallbackPromptBuilder_.mergeFrom(value); + } + if (fallbackPrompt_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearFallbackPrompt() { + bitField0_ = (bitField0_ & ~0x00000002); + fallbackPrompt_ = null; + if (fallbackPromptBuilder_ != null) { + fallbackPromptBuilder_.dispose(); + fallbackPromptBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder + getFallbackPromptBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFallbackPromptFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder + getFallbackPromptOrBuilder() { + if (fallbackPromptBuilder_ != null) { + return fallbackPromptBuilder_.getMessageOrBuilder(); + } else { + return fallbackPrompt_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt + .getDefaultInstance() + : fallbackPrompt_; + } + } + /** + * + * + *
+       * Required. Fallback prompt configurations to use.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt fallback_prompt = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPromptOrBuilder> + getFallbackPromptFieldBuilder() { + if (fallbackPromptBuilder_ == null) { + fallbackPromptBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.FallbackPrompt.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool + .FallbackPromptOrBuilder>( + getFallbackPrompt(), getParentForChildren(), isClean()); + fallbackPrompt_ = null; + } + return fallbackPromptBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataStoreTool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ExtensionToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The full name of the referenced vertex extension.
+     * Formats:
+     * `projects/{project}/locations/{location}/extensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The full name of the referenced vertex extension.
+     * Formats:
+     * `projects/{project}/locations/{location}/extensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * An ExtensionTool is a way to use Vertex Extensions as a tool.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool} + */ + public static final class ExtensionTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) + ExtensionToolOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExtensionTool.newBuilder() to construct. + private ExtensionTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExtensionTool() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExtensionTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The full name of the referenced vertex extension.
+     * Formats:
+     * `projects/{project}/locations/{location}/extensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The full name of the referenced vertex extension.
+     * Formats:
+     * `projects/{project}/locations/{location}/extensions/{extension}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An ExtensionTool is a way to use Vertex Extensions as a tool.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The full name of the referenced vertex extension.
+       * Formats:
+       * `projects/{project}/locations/{location}/extensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The full name of the referenced vertex extension.
+       * Formats:
+       * `projects/{project}/locations/{location}/extensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The full name of the referenced vertex extension.
+       * Formats:
+       * `projects/{project}/locations/{location}/extensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the referenced vertex extension.
+       * Formats:
+       * `projects/{project}/locations/{location}/extensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The full name of the referenced vertex extension.
+       * Formats:
+       * `projects/{project}/locations/{location}/extensions/{extension}`
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExtensionTool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FunctionToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + boolean hasInputSchema(); + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + com.google.protobuf.Struct getInputSchema(); + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder(); + + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + boolean hasOutputSchema(); + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + com.google.protobuf.Struct getOutputSchema(); + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder(); + } + /** + * + * + *
+   * A Function tool describes the functions to be invoked on the client side.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool} + */ + public static final class FunctionTool extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) + FunctionToolOrBuilder { + private static final long serialVersionUID = 0L; + // Use FunctionTool.newBuilder() to construct. + private FunctionTool(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FunctionTool() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new FunctionTool(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder.class); + } + + private int bitField0_; + public static final int INPUT_SCHEMA_FIELD_NUMBER = 1; + private com.google.protobuf.Struct inputSchema_; + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + @java.lang.Override + public boolean hasInputSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getInputSchema() { + return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_; + } + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+     * the function. This input is a JSON object that contains the function's
+     * parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() { + return inputSchema_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputSchema_; + } + + public static final int OUTPUT_SCHEMA_FIELD_NUMBER = 2; + private com.google.protobuf.Struct outputSchema_; + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + @java.lang.Override + public boolean hasOutputSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputSchema() { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + /** + * + * + *
+     * Optional. The JSON schema is encapsulated in a
+     * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+     * of the function. This output is a JSON object that contains the
+     * function's parameters as properties of the object.
+     * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getInputSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getOutputSchema()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputSchema()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) obj; + + if (hasInputSchema() != other.hasInputSchema()) return false; + if (hasInputSchema()) { + if (!getInputSchema().equals(other.getInputSchema())) return false; + } + if (hasOutputSchema() != other.hasOutputSchema()) return false; + if (hasOutputSchema()) { + if (!getOutputSchema().equals(other.getOutputSchema())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInputSchema()) { + hash = (37 * hash) + INPUT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getInputSchema().hashCode(); + } + if (hasOutputSchema()) { + hash = (37 * hash) + OUTPUT_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getOutputSchema().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A Function tool describes the functions to be invoked on the client side.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputSchemaFieldBuilder(); + getOutputSchemaFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + inputSchema_ = null; + if (inputSchemaBuilder_ != null) { + inputSchemaBuilder_.dispose(); + inputSchemaBuilder_ = null; + } + outputSchema_ = null; + if (outputSchemaBuilder_ != null) { + outputSchemaBuilder_.dispose(); + outputSchemaBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.inputSchema_ = + inputSchemaBuilder_ == null ? inputSchema_ : inputSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.outputSchema_ = + outputSchemaBuilder_ == null ? outputSchema_ : outputSchemaBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance()) + return this; + if (other.hasInputSchema()) { + mergeInputSchema(other.getInputSchema()); + } + if (other.hasOutputSchema()) { + mergeOutputSchema(other.getOutputSchema()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInputSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getOutputSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.Struct inputSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + inputSchemaBuilder_; + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the inputSchema field is set. + */ + public boolean hasInputSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The inputSchema. + */ + public com.google.protobuf.Struct getInputSchema() { + if (inputSchemaBuilder_ == null) { + return inputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputSchema_; + } else { + return inputSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputSchema(com.google.protobuf.Struct value) { + if (inputSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputSchema_ = value; + } else { + inputSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (inputSchemaBuilder_ == null) { + inputSchema_ = builderForValue.build(); + } else { + inputSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeInputSchema(com.google.protobuf.Struct value) { + if (inputSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && inputSchema_ != null + && inputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) { + getInputSchemaBuilder().mergeFrom(value); + } else { + inputSchema_ = value; + } + } else { + inputSchemaBuilder_.mergeFrom(value); + } + if (inputSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearInputSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + inputSchema_ = null; + if (inputSchemaBuilder_ != null) { + inputSchemaBuilder_.dispose(); + inputSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getInputSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getInputSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getInputSchemaOrBuilder() { + if (inputSchemaBuilder_ != null) { + return inputSchemaBuilder_.getMessageOrBuilder(); + } else { + return inputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : inputSchema_; + } + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the input of
+       * the function. This input is a JSON object that contains the function's
+       * parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct input_schema = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getInputSchemaFieldBuilder() { + if (inputSchemaBuilder_ == null) { + inputSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getInputSchema(), getParentForChildren(), isClean()); + inputSchema_ = null; + } + return inputSchemaBuilder_; + } + + private com.google.protobuf.Struct outputSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputSchemaBuilder_; + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the outputSchema field is set. + */ + public boolean hasOutputSchema() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The outputSchema. + */ + public com.google.protobuf.Struct getOutputSchema() { + if (outputSchemaBuilder_ == null) { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } else { + return outputSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputSchema(com.google.protobuf.Struct value) { + if (outputSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputSchema_ = value; + } else { + outputSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOutputSchema(com.google.protobuf.Struct.Builder builderForValue) { + if (outputSchemaBuilder_ == null) { + outputSchema_ = builderForValue.build(); + } else { + outputSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOutputSchema(com.google.protobuf.Struct value) { + if (outputSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && outputSchema_ != null + && outputSchema_ != com.google.protobuf.Struct.getDefaultInstance()) { + getOutputSchemaBuilder().mergeFrom(value); + } else { + outputSchema_ = value; + } + } else { + outputSchemaBuilder_.mergeFrom(value); + } + if (outputSchema_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOutputSchema() { + bitField0_ = (bitField0_ & ~0x00000002); + outputSchema_ = null; + if (outputSchemaBuilder_ != null) { + outputSchemaBuilder_.dispose(); + outputSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Struct.Builder getOutputSchemaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOutputSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.StructOrBuilder getOutputSchemaOrBuilder() { + if (outputSchemaBuilder_ != null) { + return outputSchemaBuilder_.getMessageOrBuilder(); + } else { + return outputSchema_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : outputSchema_; + } + } + /** + * + * + *
+       * Optional. The JSON schema is encapsulated in a
+       * [google.protobuf.Struct][google.protobuf.Struct] to describe the output
+       * of the function. This output is a JSON object that contains the
+       * function's parameters as properties of the object.
+       * 
+ * + * .google.protobuf.Struct output_schema = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputSchemaFieldBuilder() { + if (outputSchemaBuilder_ == null) { + outputSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + getOutputSchema(), getParentForChildren(), isClean()); + outputSchema_ = null; + } + return outputSchemaBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FunctionTool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AuthenticationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + boolean hasApiKeyConfig(); + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig getApiKeyConfig(); + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder(); + + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return Whether the oauthConfig field is set. + */ + boolean hasOauthConfig(); + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return The oauthConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig getOauthConfig(); + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder(); + + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + boolean hasServiceAgentAuthConfig(); + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig(); + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.AuthConfigCase getAuthConfigCase(); + } + /** + * + * + *
+   * Authentication information required for API calls
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication} + */ + public static final class Authentication extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) + AuthenticationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Authentication.newBuilder() to construct. + private Authentication(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Authentication() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Authentication(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder.class); + } + + /** + * + * + *
+     * The location of the API key in the request.
+     * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation} + */ + public enum RequestLocation implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * REQUEST_LOCATION_UNSPECIFIED = 0; + */ + REQUEST_LOCATION_UNSPECIFIED(0), + /** + * + * + *
+       * Represents the key in http header.
+       * 
+ * + * HEADER = 1; + */ + HEADER(1), + /** + * + * + *
+       * Represents the key in query string.
+       * 
+ * + * QUERY_STRING = 2; + */ + QUERY_STRING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Default value. This value is unused.
+       * 
+ * + * REQUEST_LOCATION_UNSPECIFIED = 0; + */ + public static final int REQUEST_LOCATION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Represents the key in http header.
+       * 
+ * + * HEADER = 1; + */ + public static final int HEADER_VALUE = 1; + /** + * + * + *
+       * Represents the key in query string.
+       * 
+ * + * QUERY_STRING = 2; + */ + public static final int QUERY_STRING_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RequestLocation valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static RequestLocation forNumber(int value) { + switch (value) { + case 0: + return REQUEST_LOCATION_UNSPECIFIED; + case 1: + return HEADER; + case 2: + return QUERY_STRING; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RequestLocation findValueByNumber(int number) { + return RequestLocation.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RequestLocation[] VALUES = values(); + + public static RequestLocation valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private RequestLocation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation) + } + + public interface ApiKeyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + java.lang.String getKeyName(); + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + com.google.protobuf.ByteString getKeyNameBytes(); + + /** + * + * + *
+       * Required. The API key.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The apiKey. + */ + java.lang.String getApiKey(); + /** + * + * + *
+       * Required. The API key.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for apiKey. + */ + com.google.protobuf.ByteString getApiKeyBytes(); + + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + int getRequestLocationValue(); + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + getRequestLocation(); + } + /** + * + * + *
+     * Config for authentication with API key.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig} + */ + public static final class ApiKeyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + ApiKeyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ApiKeyConfig.newBuilder() to construct. + private ApiKeyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ApiKeyConfig() { + keyName_ = ""; + apiKey_ = ""; + requestLocation_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ApiKeyConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder + .class); + } + + public static final int KEY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object keyName_ = ""; + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + @java.lang.Override + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The parameter name or the header name of the API key.
+       * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+       * KEY>", "X-Api-Key" would be the parameter name.
+       * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int API_KEY_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiKey_ = ""; + /** + * + * + *
+       * Required. The API key.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The apiKey. + */ + @java.lang.Override + public java.lang.String getApiKey() { + java.lang.Object ref = apiKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiKey_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The API key.
+       * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for apiKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getApiKeyBytes() { + java.lang.Object ref = apiKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_LOCATION_FIELD_NUMBER = 3; + private int requestLocation_ = 0; + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + @java.lang.Override + public int getRequestLocationValue() { + return requestLocation_; + } + /** + * + * + *
+       * Required. Key location in the request.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + getRequestLocation() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation.forNumber( + requestLocation_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, keyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, apiKey_); + } + if (requestLocation_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + .REQUEST_LOCATION_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, requestLocation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, keyName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, apiKey_); + } + if (requestLocation_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + .REQUEST_LOCATION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, requestLocation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) obj; + + if (!getKeyName().equals(other.getKeyName())) return false; + if (!getApiKey().equals(other.getApiKey())) return false; + if (requestLocation_ != other.requestLocation_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKeyName().hashCode(); + hash = (37 * hash) + API_KEY_FIELD_NUMBER; + hash = (53 * hash) + getApiKey().hashCode(); + hash = (37 * hash) + REQUEST_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + requestLocation_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Config for authentication with API key.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + keyName_ = ""; + apiKey_ = ""; + requestLocation_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.keyName_ = keyName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.apiKey_ = apiKey_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestLocation_ = requestLocation_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance()) return this; + if (!other.getKeyName().isEmpty()) { + keyName_ = other.keyName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getApiKey().isEmpty()) { + apiKey_ = other.apiKey_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.requestLocation_ != 0) { + setRequestLocationValue(other.getRequestLocationValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + keyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + apiKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + requestLocation_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object keyName_ = ""; + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The keyName. + */ + public java.lang.String getKeyName() { + java.lang.Object ref = keyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + keyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for keyName. + */ + public com.google.protobuf.ByteString getKeyNameBytes() { + java.lang.Object ref = keyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + keyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearKeyName() { + keyName_ = getDefaultInstance().getKeyName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The parameter name or the header name of the API key.
+         * E.g., If the API request is "https://example.com/act?X-Api-Key=<API
+         * KEY>", "X-Api-Key" would be the parameter name.
+         * 
+ * + * string key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for keyName to set. + * @return This builder for chaining. + */ + public Builder setKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + keyName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object apiKey_ = ""; + /** + * + * + *
+         * Required. The API key.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The apiKey. + */ + public java.lang.String getApiKey() { + java.lang.Object ref = apiKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + apiKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The API key.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for apiKey. + */ + public com.google.protobuf.ByteString getApiKeyBytes() { + java.lang.Object ref = apiKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + apiKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The API key.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The apiKey to set. + * @return This builder for chaining. + */ + public Builder setApiKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + apiKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The API key.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearApiKey() { + apiKey_ = getDefaultInstance().getApiKey(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The API key.
+         * 
+ * + * string api_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for apiKey to set. + * @return This builder for chaining. + */ + public Builder setApiKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + apiKey_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int requestLocation_ = 0; + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for requestLocation. + */ + @java.lang.Override + public int getRequestLocationValue() { + return requestLocation_; + } + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for requestLocation to set. + * @return This builder for chaining. + */ + public Builder setRequestLocationValue(int value) { + requestLocation_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The requestLocation. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + getRequestLocation() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation.forNumber( + requestLocation_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The requestLocation to set. + * @return This builder for chaining. + */ + public Builder setRequestLocation( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + requestLocation_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Key location in the request.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.RequestLocation request_location = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequestLocation() { + bitField0_ = (bitField0_ & ~0x00000004); + requestLocation_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ApiKeyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + int getOauthGrantTypeValue(); + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType(); + + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + java.lang.String getClientId(); + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString getClientIdBytes(); + + /** + * + * + *
+       * Required. The client secret from the OAuth provider.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + java.lang.String getClientSecret(); + /** + * + * + *
+       * Required. The client secret from the OAuth provider.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + com.google.protobuf.ByteString getClientSecretBytes(); + + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + java.lang.String getTokenEndpoint(); + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + com.google.protobuf.ByteString getTokenEndpointBytes(); + } + /** + * + * + *
+     * Config for authentication with OAuth.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig} + */ + public static final class OAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + OAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OAuthConfig.newBuilder() to construct. + private OAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OAuthConfig() { + oauthGrantType_ = 0; + clientId_ = ""; + clientSecret_ = ""; + tokenEndpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder + .class); + } + + /** + * + * + *
+       * OAuth grant types. Only [client credential
+       * grant](https://oauth.net/2/grant-types/client-credentials) is
+       * supported.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType} + */ + public enum OauthGrantType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + */ + OAUTH_GRANT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * Represents the [client credential
+         * flow](https://oauth.net/2/grant-types/client-credentials).
+         * 
+ * + * CLIENT_CREDENTIAL = 1; + */ + CLIENT_CREDENTIAL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Default value. This value is unused.
+         * 
+ * + * OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + */ + public static final int OAUTH_GRANT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Represents the [client credential
+         * flow](https://oauth.net/2/grant-types/client-credentials).
+         * 
+ * + * CLIENT_CREDENTIAL = 1; + */ + public static final int CLIENT_CREDENTIAL_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OauthGrantType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static OauthGrantType forNumber(int value) { + switch (value) { + case 0: + return OAUTH_GRANT_TYPE_UNSPECIFIED; + case 1: + return CLIENT_CREDENTIAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public OauthGrantType findValueByNumber(int number) { + return OauthGrantType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final OauthGrantType[] VALUES = values(); + + public static OauthGrantType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private OauthGrantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType) + } + + public static final int OAUTH_GRANT_TYPE_FIELD_NUMBER = 1; + private int oauthGrantType_ = 0; + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + @java.lang.Override + public int getOauthGrantTypeValue() { + return oauthGrantType_; + } + /** + * + * + *
+       * Required. OAuth grant types.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .OauthGrantType.forNumber(oauthGrantType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + .UNRECOGNIZED + : result; + } + + public static final int CLIENT_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientId_ = ""; + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The client ID from the OAuth provider.
+       * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENT_SECRET_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object clientSecret_ = ""; + /** + * + * + *
+       * Required. The client secret from the OAuth provider.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + @java.lang.Override + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientSecret_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The client secret from the OAuth provider.
+       * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object tokenEndpoint_ = ""; + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + @java.lang.Override + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenEndpoint_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The token endpoint in the OAuth provider to exchange for an
+       * access token.
+       * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (oauthGrantType_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + .OAUTH_GRANT_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, oauthGrantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, tokenEndpoint_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oauthGrantType_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + .OAUTH_GRANT_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, oauthGrantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientSecret_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clientSecret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tokenEndpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, tokenEndpoint_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) obj; + + if (oauthGrantType_ != other.oauthGrantType_) return false; + if (!getClientId().equals(other.getClientId())) return false; + if (!getClientSecret().equals(other.getClientSecret())) return false; + if (!getTokenEndpoint().equals(other.getTokenEndpoint())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OAUTH_GRANT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + oauthGrantType_; + hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getClientId().hashCode(); + hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER; + hash = (53 * hash) + getClientSecret().hashCode(); + hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getTokenEndpoint().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Config for authentication with OAuth.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + oauthGrantType_ = 0; + clientId_ = ""; + clientSecret_ = ""; + tokenEndpoint_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.oauthGrantType_ = oauthGrantType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.clientSecret_ = clientSecret_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.tokenEndpoint_ = tokenEndpoint_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance()) return this; + if (other.oauthGrantType_ != 0) { + setOauthGrantTypeValue(other.getOauthGrantTypeValue()); + } + if (!other.getClientId().isEmpty()) { + clientId_ = other.clientId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getClientSecret().isEmpty()) { + clientSecret_ = other.clientSecret_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getTokenEndpoint().isEmpty()) { + tokenEndpoint_ = other.tokenEndpoint_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + oauthGrantType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + clientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + clientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + tokenEndpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int oauthGrantType_ = 0; + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for oauthGrantType. + */ + @java.lang.Override + public int getOauthGrantTypeValue() { + return oauthGrantType_; + } + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for oauthGrantType to set. + * @return This builder for chaining. + */ + public Builder setOauthGrantTypeValue(int value) { + oauthGrantType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The oauthGrantType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + getOauthGrantType() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .OauthGrantType.forNumber(oauthGrantType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .OauthGrantType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The oauthGrantType to set. + * @return This builder for chaining. + */ + public Builder setOauthGrantType( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + oauthGrantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. OAuth grant types.
+         * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearOauthGrantType() { + bitField0_ = (bitField0_ & ~0x00000001); + oauthGrantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object clientId_ = ""; + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientId. + */ + public java.lang.String getClientId() { + java.lang.Object ref = clientId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientId. + */ + public com.google.protobuf.ByteString getClientIdBytes() { + java.lang.Object ref = clientId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientId() { + clientId_ = getDefaultInstance().getClientId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The client ID from the OAuth provider.
+         * 
+ * + * string client_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object clientSecret_ = ""; + /** + * + * + *
+         * Required. The client secret from the OAuth provider.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The clientSecret. + */ + public java.lang.String getClientSecret() { + java.lang.Object ref = clientSecret_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clientSecret_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The client secret from the OAuth provider.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for clientSecret. + */ + public com.google.protobuf.ByteString getClientSecretBytes() { + java.lang.Object ref = clientSecret_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clientSecret_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The client secret from the OAuth provider.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecret(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The client secret from the OAuth provider.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearClientSecret() { + clientSecret_ = getDefaultInstance().getClientSecret(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The client secret from the OAuth provider.
+         * 
+ * + * string client_secret = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for clientSecret to set. + * @return This builder for chaining. + */ + public Builder setClientSecretBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clientSecret_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object tokenEndpoint_ = ""; + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tokenEndpoint. + */ + public java.lang.String getTokenEndpoint() { + java.lang.Object ref = tokenEndpoint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenEndpoint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tokenEndpoint. + */ + public com.google.protobuf.ByteString getTokenEndpointBytes() { + java.lang.Object ref = tokenEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tokenEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpoint(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tokenEndpoint_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTokenEndpoint() { + tokenEndpoint_ = getDefaultInstance().getTokenEndpoint(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The token endpoint in the OAuth provider to exchange for an
+         * access token.
+         * 
+ * + * string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tokenEndpoint to set. + * @return This builder for chaining. + */ + public Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tokenEndpoint_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OAuthConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ServiceAgentAuthConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+     * Config for auth using [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+     * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig} + */ + public static final class ServiceAgentAuthConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + ServiceAgentAuthConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServiceAgentAuthConfig.newBuilder() to construct. + private ServiceAgentAuthConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServiceAgentAuthConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServiceAgentAuthConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * Config for auth using [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
+       * 
+ * + * Protobuf type {@code + * google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig( + this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) { + return mergeFrom( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServiceAgentAuthConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int authConfigCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object authConfig_; + + public enum AuthConfigCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + API_KEY_CONFIG(1), + OAUTH_CONFIG(2), + SERVICE_AGENT_AUTH_CONFIG(3), + AUTHCONFIG_NOT_SET(0); + private final int value; + + private AuthConfigCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AuthConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AuthConfigCase forNumber(int value) { + switch (value) { + case 1: + return API_KEY_CONFIG; + case 2: + return OAUTH_CONFIG; + case 3: + return SERVICE_AGENT_AUTH_CONFIG; + case 0: + return AUTHCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AuthConfigCase getAuthConfigCase() { + return AuthConfigCase.forNumber(authConfigCase_); + } + + public static final int API_KEY_CONFIG_FIELD_NUMBER = 1; + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return authConfigCase_ == 1; + } + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + getApiKeyConfig() { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Config for API key auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder() { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + + public static final int OAUTH_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return Whether the oauthConfig field is set. + */ + @java.lang.Override + public boolean hasOauthConfig() { + return authConfigCase_ == 2; + } + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return The oauthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig getOauthConfig() { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Config for OAuth.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder() { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + + public static final int SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAgentAuthConfig() { + return authConfigCase_ == 3; + } + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig() { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + /** + * + * + *
+     * Config for [Diglogflow service
+     * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+     * auth.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder() { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (authConfigCase_ == 1) { + output.writeMessage( + 1, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) authConfig_); + } + if (authConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) authConfig_); + } + if (authConfigCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (authConfigCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_); + } + if (authConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + authConfig_); + } + if (authConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig) + authConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) obj; + + if (!getAuthConfigCase().equals(other.getAuthConfigCase())) return false; + switch (authConfigCase_) { + case 1: + if (!getApiKeyConfig().equals(other.getApiKeyConfig())) return false; + break; + case 2: + if (!getOauthConfig().equals(other.getOauthConfig())) return false; + break; + case 3: + if (!getServiceAgentAuthConfig().equals(other.getServiceAgentAuthConfig())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (authConfigCase_) { + case 1: + hash = (37 * hash) + API_KEY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getApiKeyConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + OAUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOauthConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + SERVICE_AGENT_AUTH_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceAgentAuthConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Authentication information required for API calls
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.Authentication} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) + com.google.cloud.dialogflow.cx.v3beta1.Tool.AuthenticationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (apiKeyConfigBuilder_ != null) { + apiKeyConfigBuilder_.clear(); + } + if (oauthConfigBuilder_ != null) { + oauthConfigBuilder_.clear(); + } + if (serviceAgentAuthConfigBuilder_ != null) { + serviceAgentAuthConfigBuilder_.clear(); + } + authConfigCase_ = 0; + authConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication result) { + result.authConfigCase_ = authConfigCase_; + result.authConfig_ = this.authConfig_; + if (authConfigCase_ == 1 && apiKeyConfigBuilder_ != null) { + result.authConfig_ = apiKeyConfigBuilder_.build(); + } + if (authConfigCase_ == 2 && oauthConfigBuilder_ != null) { + result.authConfig_ = oauthConfigBuilder_.build(); + } + if (authConfigCase_ == 3 && serviceAgentAuthConfigBuilder_ != null) { + result.authConfig_ = serviceAgentAuthConfigBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.getDefaultInstance()) + return this; + switch (other.getAuthConfigCase()) { + case API_KEY_CONFIG: + { + mergeApiKeyConfig(other.getApiKeyConfig()); + break; + } + case OAUTH_CONFIG: + { + mergeOauthConfig(other.getOauthConfig()); + break; + } + case SERVICE_AGENT_AUTH_CONFIG: + { + mergeServiceAgentAuthConfig(other.getServiceAgentAuthConfig()); + break; + } + case AUTHCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getApiKeyConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getOauthConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getServiceAgentAuthConfigFieldBuilder().getBuilder(), extensionRegistry); + authConfigCase_ = 3; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int authConfigCase_ = 0; + private java.lang.Object authConfig_; + + public AuthConfigCase getAuthConfigCase() { + return AuthConfigCase.forNumber(authConfigCase_); + } + + public Builder clearAuthConfig() { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder> + apiKeyConfigBuilder_; + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return Whether the apiKeyConfig field is set. + */ + @java.lang.Override + public boolean hasApiKeyConfig() { + return authConfigCase_ == 1; + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + * + * @return The apiKeyConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + getApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 1) { + return apiKeyConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder setApiKeyConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + authConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder setApiKeyConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder + builderForValue) { + if (apiKeyConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + apiKeyConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder mergeApiKeyConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig value) { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 1) { + apiKeyConfigBuilder_.mergeFrom(value); + } else { + apiKeyConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 1; + return this; + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public Builder clearApiKeyConfig() { + if (apiKeyConfigBuilder_ == null) { + if (authConfigCase_ == 1) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 1) { + authConfigCase_ = 0; + authConfig_ = null; + } + apiKeyConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder + getApiKeyConfigBuilder() { + return getApiKeyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder + getApiKeyConfigOrBuilder() { + if ((authConfigCase_ == 1) && (apiKeyConfigBuilder_ != null)) { + return apiKeyConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 1) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for API key auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig api_key_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder> + getApiKeyConfigFieldBuilder() { + if (apiKeyConfigBuilder_ == null) { + if (!(authConfigCase_ == 1)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig + .getDefaultInstance(); + } + apiKeyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ApiKeyConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 1; + onChanged(); + return apiKeyConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder> + oauthConfigBuilder_; + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return Whether the oauthConfig field is set. + */ + @java.lang.Override + public boolean hasOauthConfig() { + return authConfigCase_ == 2; + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + * + * @return The oauthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + getOauthConfig() { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 2) { + return oauthConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder setOauthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig value) { + if (oauthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + oauthConfigBuilder_.setMessage(value); + } + authConfigCase_ = 2; + return this; + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder setOauthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder + builderForValue) { + if (oauthConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + oauthConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 2; + return this; + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder mergeOauthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig value) { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 2) { + oauthConfigBuilder_.mergeFrom(value); + } else { + oauthConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 2; + return this; + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public Builder clearOauthConfig() { + if (oauthConfigBuilder_ == null) { + if (authConfigCase_ == 2) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 2) { + authConfigCase_ = 0; + authConfig_ = null; + } + oauthConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder + getOauthConfigBuilder() { + return getOauthConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder + getOauthConfigOrBuilder() { + if ((authConfigCase_ == 2) && (oauthConfigBuilder_ != null)) { + return oauthConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 2) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for OAuth.
+       * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig oauth_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder> + getOauthConfigFieldBuilder() { + if (oauthConfigBuilder_ == null) { + if (!(authConfigCase_ == 2)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig + .getDefaultInstance(); + } + oauthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.OAuthConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 2; + onChanged(); + return oauthConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder> + serviceAgentAuthConfigBuilder_; + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return Whether the serviceAgentAuthConfig field is set. + */ + @java.lang.Override + public boolean hasServiceAgentAuthConfig() { + return authConfigCase_ == 3; + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + * + * @return The serviceAgentAuthConfig. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + getServiceAgentAuthConfig() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } else { + if (authConfigCase_ == 3) { + return serviceAgentAuthConfigBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder setServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig value) { + if (serviceAgentAuthConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authConfig_ = value; + onChanged(); + } else { + serviceAgentAuthConfigBuilder_.setMessage(value); + } + authConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder setServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig.Builder + builderForValue) { + if (serviceAgentAuthConfigBuilder_ == null) { + authConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceAgentAuthConfigBuilder_.setMessage(builderForValue.build()); + } + authConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder mergeServiceAgentAuthConfig( + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig value) { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3 + && authConfig_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig.getDefaultInstance()) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig) + authConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + authConfig_ = value; + } + onChanged(); + } else { + if (authConfigCase_ == 3) { + serviceAgentAuthConfigBuilder_.mergeFrom(value); + } else { + serviceAgentAuthConfigBuilder_.setMessage(value); + } + } + authConfigCase_ = 3; + return this; + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public Builder clearServiceAgentAuthConfig() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (authConfigCase_ == 3) { + authConfigCase_ = 0; + authConfig_ = null; + onChanged(); + } + } else { + if (authConfigCase_ == 3) { + authConfigCase_ = 0; + authConfig_ = null; + } + serviceAgentAuthConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder + getServiceAgentAuthConfigBuilder() { + return getServiceAgentAuthConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder + getServiceAgentAuthConfigOrBuilder() { + if ((authConfigCase_ == 3) && (serviceAgentAuthConfigBuilder_ != null)) { + return serviceAgentAuthConfigBuilder_.getMessageOrBuilder(); + } else { + if (authConfigCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig) + authConfig_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Config for [Diglogflow service
+       * agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
+       * auth.
+       * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig service_agent_auth_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder> + getServiceAgentAuthConfigFieldBuilder() { + if (serviceAgentAuthConfigBuilder_ == null) { + if (!(authConfigCase_ == 3)) { + authConfig_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .getDefaultInstance(); + } + serviceAgentAuthConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication.ServiceAgentAuthConfig + .Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfigOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + .ServiceAgentAuthConfig) + authConfig_, + getParentForChildren(), + isClean()); + authConfig_ = null; + } + authConfigCase_ = 3; + onChanged(); + return serviceAgentAuthConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.Authentication) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Authentication parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Authentication getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TLSConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getCaCertsList(); + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index); + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getCaCertsCount(); + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getCaCertsOrBuilderList(); + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder getCaCertsOrBuilder( + int index); + } + /** + * + * + *
+   * The TLS configuration.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig} + */ + public static final class TLSConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) + TLSConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TLSConfig.newBuilder() to construct. + private TLSConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TLSConfig() { + caCerts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TLSConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder.class); + } + + public interface CACertOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+       * Required. The allowed custom CA certificates (in DER format) for
+       * HTTPS verification. This overrides the default SSL trust store. If this
+       * is empty or unspecified, Dialogflow will use Google's default trust
+       * store to verify certificates. N.B. Make sure the HTTPS server
+       * certificates are signed with "subject alt name". For instance a
+       * certificate can be self-signed using the following command,
+       *    openssl x509 -req -days 200 -in example.com.csr \
+       *      -signkey example.com.key \
+       *      -out example.com.crt \
+       *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+       * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + com.google.protobuf.ByteString getCert(); + } + /** + * + * + *
+     * The CA certificate.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert} + */ + public static final class CACert extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) + CACertOrBuilder { + private static final long serialVersionUID = 0L; + // Use CACert.newBuilder() to construct. + private CACert(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CACert() { + displayName_ = ""; + cert_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CACert(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The name of the allowed custom CA certificates. This
+       * can be used to disambiguate the custom CA certificates.
+       * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CERT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+       * Required. The allowed custom CA certificates (in DER format) for
+       * HTTPS verification. This overrides the default SSL trust store. If this
+       * is empty or unspecified, Dialogflow will use Google's default trust
+       * store to verify certificates. N.B. Make sure the HTTPS server
+       * certificates are signed with "subject alt name". For instance a
+       * certificate can be self-signed using the following command,
+       *    openssl x509 -req -days 200 -in example.com.csr \
+       *      -signkey example.com.key \
+       *      -out example.com.crt \
+       *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+       * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCert() { + return cert_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!cert_.isEmpty()) { + output.writeBytes(2, cert_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!cert_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, cert_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getCert().equals(other.getCert())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + CERT_FIELD_NUMBER; + hash = (53 * hash) + getCert().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+       * The CA certificate.
+       * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayName_ = ""; + cert_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cert_ = cert_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getCert() != com.google.protobuf.ByteString.EMPTY) { + setCert(other.getCert()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + cert_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The name of the allowed custom CA certificates. This
+         * can be used to disambiguate the custom CA certificates.
+         * 
+ * + * string display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString cert_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command,
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The cert. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCert() { + return cert_; + } + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command,
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The cert to set. + * @return This builder for chaining. + */ + public Builder setCert(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + cert_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The allowed custom CA certificates (in DER format) for
+         * HTTPS verification. This overrides the default SSL trust store. If this
+         * is empty or unspecified, Dialogflow will use Google's default trust
+         * store to verify certificates. N.B. Make sure the HTTPS server
+         * certificates are signed with "subject alt name". For instance a
+         * certificate can be self-signed using the following command,
+         *    openssl x509 -req -days 200 -in example.com.csr \
+         *      -signkey example.com.key \
+         *      -out example.com.crt \
+         *      -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
+         * 
+ * + * bytes cert = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearCert() { + bitField0_ = (bitField0_ & ~0x00000002); + cert_ = getDefaultInstance().getCert(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CACert parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int CA_CERTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List caCerts_; + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getCaCertsList() { + return caCerts_; + } + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder> + getCaCertsOrBuilderList() { + return caCerts_; + } + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getCaCertsCount() { + return caCerts_.size(); + } + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index) { + return caCerts_.get(index); + } + /** + * + * + *
+     * Required. Specifies a list of allowed custom CA certificates for HTTPS
+     * verification.
+     * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder + getCaCertsOrBuilder(int index) { + return caCerts_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < caCerts_.size(); i++) { + output.writeMessage(1, caCerts_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < caCerts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, caCerts_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) obj; + + if (!getCaCertsList().equals(other.getCaCertsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getCaCertsCount() > 0) { + hash = (37 * hash) + CA_CERTS_FIELD_NUMBER; + hash = (53 * hash) + getCaCertsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * The TLS configuration.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + } else { + caCerts_ = null; + caCertsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result) { + if (caCertsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + caCerts_ = java.util.Collections.unmodifiableList(caCerts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.caCerts_ = caCerts_; + } else { + result.caCerts_ = caCertsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.getDefaultInstance()) + return this; + if (caCertsBuilder_ == null) { + if (!other.caCerts_.isEmpty()) { + if (caCerts_.isEmpty()) { + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCaCertsIsMutable(); + caCerts_.addAll(other.caCerts_); + } + onChanged(); + } + } else { + if (!other.caCerts_.isEmpty()) { + if (caCertsBuilder_.isEmpty()) { + caCertsBuilder_.dispose(); + caCertsBuilder_ = null; + caCerts_ = other.caCerts_; + bitField0_ = (bitField0_ & ~0x00000001); + caCertsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCaCertsFieldBuilder() + : null; + } else { + caCertsBuilder_.addAllMessages(other.caCerts_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.parser(), + extensionRegistry); + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(m); + } else { + caCertsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + caCerts_ = java.util.Collections.emptyList(); + + private void ensureCaCertsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + caCerts_ = + new java.util.ArrayList( + caCerts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder> + caCertsBuilder_; + + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getCaCertsList() { + if (caCertsBuilder_ == null) { + return java.util.Collections.unmodifiableList(caCerts_); + } else { + return caCertsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getCaCertsCount() { + if (caCertsBuilder_ == null) { + return caCerts_.size(); + } else { + return caCertsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert getCaCerts(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCaCerts( + int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.set(index, value); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCaCerts( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.set(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(value); + onChanged(); + } else { + caCertsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + int index, com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert value) { + if (caCertsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCaCertsIsMutable(); + caCerts_.add(index, value); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addCaCerts( + int index, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder builderForValue) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.add(index, builderForValue.build()); + onChanged(); + } else { + caCertsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllCaCerts( + java.lang.Iterable + values) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, caCerts_); + onChanged(); + } else { + caCertsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCaCerts() { + if (caCertsBuilder_ == null) { + caCerts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + caCertsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeCaCerts(int index) { + if (caCertsBuilder_ == null) { + ensureCaCertsIsMutable(); + caCerts_.remove(index); + onChanged(); + } else { + caCertsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder getCaCertsBuilder( + int index) { + return getCaCertsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder + getCaCertsOrBuilder(int index) { + if (caCertsBuilder_ == null) { + return caCerts_.get(index); + } else { + return caCertsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List< + ? extends com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder> + getCaCertsOrBuilderList() { + if (caCertsBuilder_ != null) { + return caCertsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(caCerts_); + } + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder + addCaCertsBuilder() { + return getCaCertsFieldBuilder() + .addBuilder( + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance()); + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder addCaCertsBuilder( + int index) { + return getCaCertsFieldBuilder() + .addBuilder( + index, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.getDefaultInstance()); + } + /** + * + * + *
+       * Required. Specifies a list of allowed custom CA certificates for HTTPS
+       * verification.
+       * 
+ * + * + * repeated .google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert ca_certs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getCaCertsBuilderList() { + return getCaCertsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder> + getCaCertsFieldBuilder() { + if (caCertsBuilder_ == null) { + caCertsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACert.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig.CACertOrBuilder>( + caCerts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + caCerts_ = null; + } + return caCertsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TLSConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.TLSConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int specificationCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object specification_; + + public enum SpecificationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + OPEN_API_SPEC(4), + DATA_STORE_SPEC(8), + EXTENSION_SPEC(11), + FUNCTION_SPEC(13), + SPECIFICATION_NOT_SET(0); + private final int value; + + private SpecificationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SpecificationCase valueOf(int value) { + return forNumber(value); + } + + public static SpecificationCase forNumber(int value) { + switch (value) { + case 4: + return OPEN_API_SPEC; + case 8: + return DATA_STORE_SPEC; + case 11: + return EXTENSION_SPEC; + case 13: + return FUNCTION_SPEC; + case 0: + return SPECIFICATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SpecificationCase getSpecificationCase() { + return SpecificationCase.forNumber(specificationCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIONS_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList actions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return A list containing the actions. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getActionsList() { + return actions_; + } + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return The count of actions. + */ + @java.lang.Deprecated + public int getActionsCount() { + return actions_.size(); + } + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the element to return. + * @return The actions at the given index. + */ + @java.lang.Deprecated + public java.lang.String getActions(int index) { + return actions_.get(index); + } + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the value to return. + * @return The bytes of the actions at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getActionsBytes(int index) { + return actions_.getByteString(index); + } + + public static final int SCHEMAS_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList schemas_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return A list containing the schemas. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getSchemasList() { + return schemas_; + } + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return The count of schemas. + */ + @java.lang.Deprecated + public int getSchemasCount() { + return schemas_.size(); + } + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + @java.lang.Deprecated + public java.lang.String getSchemas(int index) { + return schemas_.get(index); + } + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getSchemasBytes(int index) { + return schemas_.getByteString(index); + } + + public static final int OPEN_API_SPEC_FIELD_NUMBER = 4; + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + @java.lang.Override + public boolean hasOpenApiSpec() { + return specificationCase_ == 4; + } + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getOpenApiSpec() { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder + getOpenApiSpecOrBuilder() { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + + public static final int DATA_STORE_SPEC_FIELD_NUMBER = 8; + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + @java.lang.Override + public boolean hasDataStoreSpec() { + return specificationCase_ == 8; + } + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDataStoreSpec() { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder + getDataStoreSpecOrBuilder() { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + + public static final int EXTENSION_SPEC_FIELD_NUMBER = 11; + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return Whether the extensionSpec field is set. + */ + @java.lang.Override + public boolean hasExtensionSpec() { + return specificationCase_ == 11; + } + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return The extensionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getExtensionSpec() { + if (specificationCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder + getExtensionSpecOrBuilder() { + if (specificationCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + + public static final int FUNCTION_SPEC_FIELD_NUMBER = 13; + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + @java.lang.Override + public boolean hasFunctionSpec() { + return specificationCase_ == 13; + } + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getFunctionSpec() { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder + getFunctionSpecOrBuilder() { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + + public static final int TOOL_TYPE_FIELD_NUMBER = 12; + private int toolType_ = 0; + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + @java.lang.Override + public int getToolTypeValue() { + return toolType_; + } + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType getToolType() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.forNumber(toolType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (specificationCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_); + } + for (int i = 0; i < actions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, actions_.getRaw(i)); + } + for (int i = 0; i < schemas_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, schemas_.getRaw(i)); + } + if (specificationCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_); + } + if (specificationCase_ == 11) { + output.writeMessage( + 11, (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_); + } + if (toolType_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(12, toolType_); + } + if (specificationCase_ == 13) { + output.writeMessage( + 13, (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (specificationCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_); + } + { + int dataSize = 0; + for (int i = 0; i < actions_.size(); i++) { + dataSize += computeStringSizeNoTag(actions_.getRaw(i)); + } + size += dataSize; + size += 1 * getActionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < schemas_.size(); i++) { + dataSize += computeStringSizeNoTag(schemas_.getRaw(i)); + } + size += dataSize; + size += 1 * getSchemasList().size(); + } + if (specificationCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_); + } + if (specificationCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_); + } + if (toolType_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.TOOL_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, toolType_); + } + if (specificationCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.Tool other = + (com.google.cloud.dialogflow.cx.v3beta1.Tool) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getActionsList().equals(other.getActionsList())) return false; + if (!getSchemasList().equals(other.getSchemasList())) return false; + if (toolType_ != other.toolType_) return false; + if (!getSpecificationCase().equals(other.getSpecificationCase())) return false; + switch (specificationCase_) { + case 4: + if (!getOpenApiSpec().equals(other.getOpenApiSpec())) return false; + break; + case 8: + if (!getDataStoreSpec().equals(other.getDataStoreSpec())) return false; + break; + case 11: + if (!getExtensionSpec().equals(other.getExtensionSpec())) return false; + break; + case 13: + if (!getFunctionSpec().equals(other.getFunctionSpec())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (getSchemasCount() > 0) { + hash = (37 * hash) + SCHEMAS_FIELD_NUMBER; + hash = (53 * hash) + getSchemasList().hashCode(); + } + hash = (37 * hash) + TOOL_TYPE_FIELD_NUMBER; + hash = (53 * hash) + toolType_; + switch (specificationCase_) { + case 4: + hash = (37 * hash) + OPEN_API_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getOpenApiSpec().hashCode(); + break; + case 8: + hash = (37 * hash) + DATA_STORE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDataStoreSpec().hashCode(); + break; + case 11: + hash = (37 * hash) + EXTENSION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getExtensionSpec().hashCode(); + break; + case 13: + hash = (37 * hash) + FUNCTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getFunctionSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.Tool prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A tool provides a list of actions which are available to the
+   * [Playbook][google.cloud.dialogflow.cx.v3beta1.Playbook] to attain its goal. A
+   * Tool consists of a description of the tool's usage and a specification of the
+   * tool which contains the schema and authentication information.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.Tool} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.Tool) + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.Tool.class, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.Tool.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + description_ = ""; + actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (openApiSpecBuilder_ != null) { + openApiSpecBuilder_.clear(); + } + if (dataStoreSpecBuilder_ != null) { + dataStoreSpecBuilder_.clear(); + } + if (extensionSpecBuilder_ != null) { + extensionSpecBuilder_.clear(); + } + if (functionSpecBuilder_ != null) { + functionSpecBuilder_.clear(); + } + toolType_ = 0; + specificationCase_ = 0; + specification_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool build() { + com.google.cloud.dialogflow.cx.v3beta1.Tool result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.Tool result = + new com.google.cloud.dialogflow.cx.v3beta1.Tool(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.Tool result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + actions_.makeImmutable(); + result.actions_ = actions_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + schemas_.makeImmutable(); + result.schemas_ = schemas_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.toolType_ = toolType_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.Tool result) { + result.specificationCase_ = specificationCase_; + result.specification_ = this.specification_; + if (specificationCase_ == 4 && openApiSpecBuilder_ != null) { + result.specification_ = openApiSpecBuilder_.build(); + } + if (specificationCase_ == 8 && dataStoreSpecBuilder_ != null) { + result.specification_ = dataStoreSpecBuilder_.build(); + } + if (specificationCase_ == 11 && extensionSpecBuilder_ != null) { + result.specification_ = extensionSpecBuilder_.build(); + } + if (specificationCase_ == 13 && functionSpecBuilder_ != null) { + result.specification_ = functionSpecBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.Tool) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.Tool) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.Tool other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ |= 0x00000008; + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + if (!other.schemas_.isEmpty()) { + if (schemas_.isEmpty()) { + schemas_ = other.schemas_; + bitField0_ |= 0x00000010; + } else { + ensureSchemasIsMutable(); + schemas_.addAll(other.schemas_); + } + onChanged(); + } + if (other.toolType_ != 0) { + setToolTypeValue(other.getToolTypeValue()); + } + switch (other.getSpecificationCase()) { + case OPEN_API_SPEC: + { + mergeOpenApiSpec(other.getOpenApiSpec()); + break; + } + case DATA_STORE_SPEC: + { + mergeDataStoreSpec(other.getDataStoreSpec()); + break; + } + case EXTENSION_SPEC: + { + mergeExtensionSpec(other.getExtensionSpec()); + break; + } + case FUNCTION_SPEC: + { + mergeFunctionSpec(other.getFunctionSpec()); + break; + } + case SPECIFICATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getOpenApiSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 4; + break; + } // case 34 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureActionsIsMutable(); + actions_.add(s); + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSchemasIsMutable(); + schemas_.add(s); + break; + } // case 58 + case 66: + { + input.readMessage(getDataStoreSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 8; + break; + } // case 66 + case 90: + { + input.readMessage(getExtensionSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 11; + break; + } // case 90 + case 96: + { + toolType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 106: + { + input.readMessage(getFunctionSpecFieldBuilder().getBuilder(), extensionRegistry); + specificationCase_ = 13; + break; + } // case 106 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int specificationCase_ = 0; + private java.lang.Object specification_; + + public SpecificationCase getSpecificationCase() { + return SpecificationCase.forNumber(specificationCase_); + } + + public Builder clearSpecification() { + specificationCase_ = 0; + specification_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the Tool.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The human-readable name of the Tool, unique within an agent.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. High level description of the Tool and its usage.
+     * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList actions_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureActionsIsMutable() { + if (!actions_.isModifiable()) { + actions_ = new com.google.protobuf.LazyStringArrayList(actions_); + } + bitField0_ |= 0x00000008; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return A list containing the actions. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getActionsList() { + actions_.makeImmutable(); + return actions_; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return The count of actions. + */ + @java.lang.Deprecated + public int getActionsCount() { + return actions_.size(); + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the element to return. + * @return The actions at the given index. + */ + @java.lang.Deprecated + public java.lang.String getActions(int index) { + return actions_.get(index); + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the value to return. + * @return The bytes of the actions at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getActionsBytes(int index) { + return actions_.getByteString(index); + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index to set the value at. + * @param value The actions to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setActions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param value The actions to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addActions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param values The actions to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllActions(java.lang.Iterable values) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, actions_); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearActions() { + actions_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived action names for the tool.
+     * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param value The bytes of the actions to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addActionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureActionsIsMutable(); + actions_.add(value); + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList schemas_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSchemasIsMutable() { + if (!schemas_.isModifiable()) { + schemas_ = new com.google.protobuf.LazyStringArrayList(schemas_); + } + bitField0_ |= 0x00000010; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return A list containing the schemas. + */ + @java.lang.Deprecated + public com.google.protobuf.ProtocolStringList getSchemasList() { + schemas_.makeImmutable(); + return schemas_; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return The count of schemas. + */ + @java.lang.Deprecated + public int getSchemasCount() { + return schemas_.size(); + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + @java.lang.Deprecated + public java.lang.String getSchemas(int index) { + return schemas_.get(index); + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getSchemasBytes(int index) { + return schemas_.getByteString(index); + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index to set the value at. + * @param value The schemas to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setSchemas(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemasIsMutable(); + schemas_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param value The schemas to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addSchemas(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemasIsMutable(); + schemas_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param values The schemas to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addAllSchemas(java.lang.Iterable values) { + ensureSchemasIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, schemas_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearSchemas() { + schemas_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * The list of derived type schemas for the tool.
+     * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param value The bytes of the schemas to add. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder addSchemasBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSchemasIsMutable(); + schemas_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder> + openApiSpecBuilder_; + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + @java.lang.Override + public boolean hasOpenApiSpec() { + return specificationCase_ == 4; + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getOpenApiSpec() { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } else { + if (specificationCase_ == 4) { + return openApiSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder setOpenApiSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool value) { + if (openApiSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + openApiSpecBuilder_.setMessage(value); + } + specificationCase_ = 4; + return this; + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder setOpenApiSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder builderForValue) { + if (openApiSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + openApiSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 4; + return this; + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder mergeOpenApiSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool value) { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4 + && specification_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 4) { + openApiSpecBuilder_.mergeFrom(value); + } else { + openApiSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 4; + return this; + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + public Builder clearOpenApiSpec() { + if (openApiSpecBuilder_ == null) { + if (specificationCase_ == 4) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 4) { + specificationCase_ = 0; + specification_ = null; + } + openApiSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder getOpenApiSpecBuilder() { + return getOpenApiSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder + getOpenApiSpecOrBuilder() { + if ((specificationCase_ == 4) && (openApiSpecBuilder_ != null)) { + return openApiSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 4) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * OpenAPI specification of the Tool.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder> + getOpenApiSpecFieldBuilder() { + if (openApiSpecBuilder_ == null) { + if (!(specificationCase_ == 4)) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.getDefaultInstance(); + } + openApiSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 4; + onChanged(); + return openApiSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder> + dataStoreSpecBuilder_; + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + @java.lang.Override + public boolean hasDataStoreSpec() { + return specificationCase_ == 8; + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDataStoreSpec() { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } else { + if (specificationCase_ == 8) { + return dataStoreSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder setDataStoreSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool value) { + if (dataStoreSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + dataStoreSpecBuilder_.setMessage(value); + } + specificationCase_ = 8; + return this; + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder setDataStoreSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder builderForValue) { + if (dataStoreSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + dataStoreSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 8; + return this; + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder mergeDataStoreSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool value) { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8 + && specification_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 8) { + dataStoreSpecBuilder_.mergeFrom(value); + } else { + dataStoreSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 8; + return this; + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + public Builder clearDataStoreSpec() { + if (dataStoreSpecBuilder_ == null) { + if (specificationCase_ == 8) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 8) { + specificationCase_ = 0; + specification_ = null; + } + dataStoreSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder + getDataStoreSpecBuilder() { + return getDataStoreSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder + getDataStoreSpecOrBuilder() { + if ((specificationCase_ == 8) && (dataStoreSpecBuilder_ != null)) { + return dataStoreSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 8) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Data store search tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder> + getDataStoreSpecFieldBuilder() { + if (dataStoreSpecBuilder_ == null) { + if (!(specificationCase_ == 8)) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.getDefaultInstance(); + } + dataStoreSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 8; + onChanged(); + return dataStoreSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder> + extensionSpecBuilder_; + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return Whether the extensionSpec field is set. + */ + @java.lang.Override + public boolean hasExtensionSpec() { + return specificationCase_ == 11; + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return The extensionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getExtensionSpec() { + if (extensionSpecBuilder_ == null) { + if (specificationCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } else { + if (specificationCase_ == 11) { + return extensionSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + public Builder setExtensionSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool value) { + if (extensionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + extensionSpecBuilder_.setMessage(value); + } + specificationCase_ = 11; + return this; + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + public Builder setExtensionSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder builderForValue) { + if (extensionSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + extensionSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 11; + return this; + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + public Builder mergeExtensionSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool value) { + if (extensionSpecBuilder_ == null) { + if (specificationCase_ == 11 + && specification_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 11) { + extensionSpecBuilder_.mergeFrom(value); + } else { + extensionSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 11; + return this; + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + public Builder clearExtensionSpec() { + if (extensionSpecBuilder_ == null) { + if (specificationCase_ == 11) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 11) { + specificationCase_ = 0; + specification_ = null; + } + extensionSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder + getExtensionSpecBuilder() { + return getExtensionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder + getExtensionSpecOrBuilder() { + if ((specificationCase_ == 11) && (extensionSpecBuilder_ != null)) { + return extensionSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 11) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Vertex extension tool specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder> + getExtensionSpecFieldBuilder() { + if (extensionSpecBuilder_ == null) { + if (!(specificationCase_ == 11)) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.getDefaultInstance(); + } + extensionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 11; + onChanged(); + return extensionSpecBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder> + functionSpecBuilder_; + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + @java.lang.Override + public boolean hasFunctionSpec() { + return specificationCase_ == 13; + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getFunctionSpec() { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } else { + if (specificationCase_ == 13) { + return functionSpecBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + public Builder setFunctionSpec(com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool value) { + if (functionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + specification_ = value; + onChanged(); + } else { + functionSpecBuilder_.setMessage(value); + } + specificationCase_ = 13; + return this; + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + public Builder setFunctionSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder builderForValue) { + if (functionSpecBuilder_ == null) { + specification_ = builderForValue.build(); + onChanged(); + } else { + functionSpecBuilder_.setMessage(builderForValue.build()); + } + specificationCase_ = 13; + return this; + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + public Builder mergeFunctionSpec( + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool value) { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13 + && specification_ + != com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance()) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_) + .mergeFrom(value) + .buildPartial(); + } else { + specification_ = value; + } + onChanged(); + } else { + if (specificationCase_ == 13) { + functionSpecBuilder_.mergeFrom(value); + } else { + functionSpecBuilder_.setMessage(value); + } + } + specificationCase_ = 13; + return this; + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + public Builder clearFunctionSpec() { + if (functionSpecBuilder_ == null) { + if (specificationCase_ == 13) { + specificationCase_ = 0; + specification_ = null; + onChanged(); + } + } else { + if (specificationCase_ == 13) { + specificationCase_ = 0; + specification_ = null; + } + functionSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder + getFunctionSpecBuilder() { + return getFunctionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder + getFunctionSpecOrBuilder() { + if ((specificationCase_ == 13) && (functionSpecBuilder_ != null)) { + return functionSpecBuilder_.getMessageOrBuilder(); + } else { + if (specificationCase_ == 13) { + return (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_; + } + return com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + } + /** + * + * + *
+     * Client side executed function specification.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder> + getFunctionSpecFieldBuilder() { + if (functionSpecBuilder_ == null) { + if (!(specificationCase_ == 13)) { + specification_ = + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.getDefaultInstance(); + } + functionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool) specification_, + getParentForChildren(), + isClean()); + specification_ = null; + } + specificationCase_ = 13; + onChanged(); + return functionSpecBuilder_; + } + + private int toolType_ = 0; + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + @java.lang.Override + public int getToolTypeValue() { + return toolType_; + } + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for toolType to set. + * @return This builder for chaining. + */ + public Builder setToolTypeValue(int value) { + toolType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType getToolType() { + com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType result = + com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.forNumber(toolType_); + return result == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The toolType to set. + * @return This builder for chaining. + */ + public Builder setToolType(com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + toolType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tool type.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearToolType() { + bitField0_ = (bitField0_ & ~0x00000200); + toolType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.Tool) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.Tool) + private static final com.google.cloud.dialogflow.cx.v3beta1.Tool DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.Tool(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.Tool getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Tool parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java new file mode 100644 index 000000000000..0629bba2d9a2 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallProto.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ToolCallProto { + private ToolCallProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/dialogflow/cx/v3beta1/too" + + "l_call.proto\022\"google.cloud.dialogflow.cx" + + ".v3beta1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032\034google/protobuf/struct.proto\"\205\002\n\016To" + + "olCallResult\0224\n\004tool\030\001 \001(\tB&\340A\002\372A \n\036dial" + + "ogflow.googleapis.com/Tool\022\023\n\006action\030\002 \001" + + "(\tB\003\340A\002\022I\n\005error\030\003 \001(\01328.google.cloud.di" + + "alogflow.cx.v3beta1.ToolCallResult.Error" + + "H\000\0224\n\021output_parameters\030\004 \001(\0132\027.google.p" + + "rotobuf.StructH\000\032\035\n\005Error\022\024\n\007message\030\001 \001" + + "(\tB\003\340A\001B\010\n\006resultB\307\001\n&com.google.cloud.d" + + "ialogflow.cx.v3beta1B\rToolCallProtoP\001Z6c" + + "loud.google.com/go/dialogflow/cx/apiv3be" + + "ta1/cxpb;cxpb\370\001\001\242\002\002DF\252\002\"Google.Cloud.Dia" + + "logflow.Cx.V3Beta1\352\002&Google::Cloud::Dial" + + "ogflow::CX::V3beta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor, + new java.lang.String[] { + "Tool", "Action", "Error", "OutputParameters", "Result", + }); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor = + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor, + new java.lang.String[] { + "Message", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResult.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResult.java new file mode 100644 index 000000000000..0aa796861bf5 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResult.java @@ -0,0 +1,2152 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The result of calling a tool's action that has been executed by the client.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCallResult} + */ +public final class ToolCallResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ToolCallResult) + ToolCallResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use ToolCallResult.newBuilder() to construct. + private ToolCallResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolCallResult() { + tool_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolCallResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder.class); + } + + public interface ErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+     * The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + } + /** + * + * + *
+   * An error produced by the tool call.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error} + */ + public static final class Error extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) + ErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Error() { + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Error(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+     * The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + * + * + *
+     * The error message of the function.
+     * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error other = + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) obj; + + if (!getMessage().equals(other.getMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An error produced by the tool call.
+     * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_Error_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error build() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error result = + new com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.message_ = message_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance()) + return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object message_ = ""; + /** + * + * + *
+       * The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The error message of the function.
+       * 
+ * + * string message = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) + private static final com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ERROR(3), + OUTPUT_PARAMETERS(4), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 3: + return ERROR; + case 4: + return OUTPUT_PARAMETERS; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } + } + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_FIELD_NUMBER = 3; + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error getError() { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder getErrorOrBuilder() { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + + public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 4; + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + @java.lang.Override + public boolean hasOutputParameters() { + return resultCase_ == 4; + } + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputParameters() { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder() { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + if (resultCase_ == 3) { + output.writeMessage(3, (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_); + } + if (resultCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Struct) result_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + if (resultCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_); + } + if (resultCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Struct) result_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult other = + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getAction().equals(other.getAction())) return false; + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 3: + if (!getError().equals(other.getError())) return false; + break; + case 4: + if (!getOutputParameters().equals(other.getOutputParameters())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + switch (resultCase_) { + case 3: + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + break; + case 4: + hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParameters().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The result of calling a tool's action that has been executed by the client.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolCallResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ToolCallResult) + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + action_ = ""; + if (errorBuilder_ != null) { + errorBuilder_.clear(); + } + if (outputParametersBuilder_ != null) { + outputParametersBuilder_.clear(); + } + resultCase_ = 0; + result_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolCallResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult build() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult result = + new com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } + } + + private void buildPartialOneofs(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 3 && errorBuilder_ != null) { + result.result_ = errorBuilder_.build(); + } + if (resultCase_ == 4 && outputParametersBuilder_ != null) { + result.result_ = outputParametersBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.getDefaultInstance()) + return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000002; + onChanged(); + } + switch (other.getResultCase()) { + case ERROR: + { + mergeError(other.getError()); + break; + } + case OUTPUT_PARAMETERS: + { + mergeOutputParameters(other.getOutputParameters()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getOutputParametersFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 4; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object tool_ = ""; + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The [tool][Tool] associated with this call.
+     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+     * ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the tool's action associated with this call.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder> + errorBuilder_; + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return resultCase_ == 3; + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return The error. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error getError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } else { + if (resultCase_ == 3) { + return errorBuilder_.getMessage(); + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + public Builder setError(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + public Builder setError( + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + public Builder mergeError(com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error value) { + if (errorBuilder_ == null) { + if (resultCase_ == 3 + && result_ + != com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error + .getDefaultInstance()) { + result_ = + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.newBuilder( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 3) { + errorBuilder_.mergeFrom(value); + } else { + errorBuilder_.setMessage(value); + } + } + resultCase_ = 3; + return this; + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 3) { + resultCase_ = 0; + result_ = null; + } + errorBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder getErrorBuilder() { + return getErrorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder + getErrorOrBuilder() { + if ((resultCase_ == 3) && (errorBuilder_ != null)) { + return errorBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 3) { + return (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_; + } + return com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + } + /** + * + * + *
+     * The tool call's error.
+     * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + if (!(resultCase_ == 3)) { + result_ = + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.getDefaultInstance(); + } + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder>( + (com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 3; + onChanged(); + return errorBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + outputParametersBuilder_; + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + @java.lang.Override + public boolean hasOutputParameters() { + return resultCase_ == 4; + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + @java.lang.Override + public com.google.protobuf.Struct getOutputParameters() { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } else { + if (resultCase_ == 4) { + return outputParametersBuilder_.getMessage(); + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder setOutputParameters(com.google.protobuf.Struct value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + outputParametersBuilder_.setMessage(value); + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder setOutputParameters(com.google.protobuf.Struct.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + outputParametersBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder mergeOutputParameters(com.google.protobuf.Struct value) { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4 && result_ != com.google.protobuf.Struct.getDefaultInstance()) { + result_ = + com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 4) { + outputParametersBuilder_.mergeFrom(value); + } else { + outputParametersBuilder_.setMessage(value); + } + } + resultCase_ = 4; + return this; + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public Builder clearOutputParameters() { + if (outputParametersBuilder_ == null) { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 4) { + resultCase_ = 0; + result_ = null; + } + outputParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + public com.google.protobuf.Struct.Builder getOutputParametersBuilder() { + return getOutputParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder() { + if ((resultCase_ == 4) && (outputParametersBuilder_ != null)) { + return outputParametersBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 4) { + return (com.google.protobuf.Struct) result_; + } + return com.google.protobuf.Struct.getDefaultInstance(); + } + } + /** + * + * + *
+     * The tool call's output parameters.
+     * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder> + getOutputParametersFieldBuilder() { + if (outputParametersBuilder_ == null) { + if (!(resultCase_ == 4)) { + result_ = com.google.protobuf.Struct.getDefaultInstance(); + } + outputParametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, + com.google.protobuf.Struct.Builder, + com.google.protobuf.StructOrBuilder>( + (com.google.protobuf.Struct) result_, getParentForChildren(), isClean()); + result_ = null; + } + resultCase_ = 4; + onChanged(); + return outputParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ToolCallResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ToolCallResult) + private static final com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolCallResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResultOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResultOrBuilder.java new file mode 100644 index 000000000000..26a38d6d3dd3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolCallResultOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool_call.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ToolCallResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ToolCallResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + /** + * + * + *
+   * The [tool][Tool] associated with this call.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * The name of the tool's action associated with this call.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return Whether the error field is set. + */ + boolean hasError(); + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + * + * @return The error. + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error getError(); + /** + * + * + *
+   * The tool call's error.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.ToolCallResult.Error error = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ErrorOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return Whether the outputParameters field is set. + */ + boolean hasOutputParameters(); + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + * + * @return The outputParameters. + */ + com.google.protobuf.Struct getOutputParameters(); + /** + * + * + *
+   * The tool call's output parameters.
+   * 
+ * + * .google.protobuf.Struct output_parameters = 4; + */ + com.google.protobuf.StructOrBuilder getOutputParametersOrBuilder(); + + com.google.cloud.dialogflow.cx.v3beta1.ToolCallResult.ResultCase getResultCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolName.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolName.java new file mode 100644 index 000000000000..82789de9a6c3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ToolName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_AGENT_TOOL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String agent; + private final String tool; + + @Deprecated + protected ToolName() { + project = null; + location = null; + agent = null; + tool = null; + } + + private ToolName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + agent = Preconditions.checkNotNull(builder.getAgent()); + tool = Preconditions.checkNotNull(builder.getTool()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ToolName of(String project, String location, String agent, String tool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .build(); + } + + public static String format(String project, String location, String agent, String tool) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setAgent(agent) + .setTool(tool) + .build() + .toString(); + } + + public static ToolName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_AGENT_TOOL.validatedMatch( + formattedString, "ToolName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("agent"), + matchMap.get("tool")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ToolName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_AGENT_TOOL.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (agent != null) { + fieldMapBuilder.put("agent", agent); + } + if (tool != null) { + fieldMapBuilder.put("tool", tool); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_AGENT_TOOL.instantiate( + "project", project, "location", location, "agent", agent, "tool", tool); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ToolName that = ((ToolName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.agent, that.agent) + && Objects.equals(this.tool, that.tool); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(agent); + h *= 1000003; + h ^= Objects.hashCode(tool); + return h; + } + + /** Builder for projects/{project}/locations/{location}/agents/{agent}/tools/{tool}. */ + public static class Builder { + private String project; + private String location; + private String agent; + private String tool; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getAgent() { + return agent; + } + + public String getTool() { + return tool; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setAgent(String agent) { + this.agent = agent; + return this; + } + + public Builder setTool(String tool) { + this.tool = tool; + return this; + } + + private Builder(ToolName toolName) { + this.project = toolName.project; + this.location = toolName.location; + this.agent = toolName.agent; + this.tool = toolName.tool; + } + + public ToolName build() { + return new ToolName(this); + } + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java new file mode 100644 index 000000000000..c7fbdfdeb102 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolOrBuilder.java @@ -0,0 +1,402 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ToolOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.Tool) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The unique identifier of the Tool.
+   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
+   * ID>/tools/<Tool ID>`.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The human-readable name of the Tool, unique within an agent.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Required. High level description of the Tool and its usage.
+   * 
+ * + * string description = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return A list containing the actions. + */ + @java.lang.Deprecated + java.util.List getActionsList(); + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @return The count of actions. + */ + @java.lang.Deprecated + int getActionsCount(); + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the element to return. + * @return The actions at the given index. + */ + @java.lang.Deprecated + java.lang.String getActions(int index); + /** + * + * + *
+   * The list of derived action names for the tool.
+   * 
+ * + * repeated string actions = 6 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.actions is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=458 + * @param index The index of the value to return. + * @return The bytes of the actions at the given index. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getActionsBytes(int index); + + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return A list containing the schemas. + */ + @java.lang.Deprecated + java.util.List getSchemasList(); + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @return The count of schemas. + */ + @java.lang.Deprecated + int getSchemasCount(); + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the element to return. + * @return The schemas at the given index. + */ + @java.lang.Deprecated + java.lang.String getSchemas(int index); + /** + * + * + *
+   * The list of derived type schemas for the tool.
+   * 
+ * + * repeated string schemas = 7 [deprecated = true]; + * + * @deprecated google.cloud.dialogflow.cx.v3beta1.Tool.schemas is deprecated. See + * google/cloud/dialogflow/cx/v3beta1/tool.proto;l=461 + * @param index The index of the value to return. + * @return The bytes of the schemas at the given index. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getSchemasBytes(int index); + + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return Whether the openApiSpec field is set. + */ + boolean hasOpenApiSpec(); + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + * + * @return The openApiSpec. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool getOpenApiSpec(); + /** + * + * + *
+   * OpenAPI specification of the Tool.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiTool open_api_spec = 4; + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.OpenApiToolOrBuilder getOpenApiSpecOrBuilder(); + + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return Whether the dataStoreSpec field is set. + */ + boolean hasDataStoreSpec(); + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + * + * @return The dataStoreSpec. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool getDataStoreSpec(); + /** + * + * + *
+   * Data store search tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreTool data_store_spec = 8; + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.DataStoreToolOrBuilder getDataStoreSpecOrBuilder(); + + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return Whether the extensionSpec field is set. + */ + boolean hasExtensionSpec(); + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + * + * @return The extensionSpec. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool getExtensionSpec(); + /** + * + * + *
+   * Vertex extension tool specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionTool extension_spec = 11; + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.ExtensionToolOrBuilder getExtensionSpecOrBuilder(); + + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return Whether the functionSpec field is set. + */ + boolean hasFunctionSpec(); + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + * + * @return The functionSpec. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool getFunctionSpec(); + /** + * + * + *
+   * Client side executed function specification.
+   * 
+ * + * .google.cloud.dialogflow.cx.v3beta1.Tool.FunctionTool function_spec = 13; + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.FunctionToolOrBuilder getFunctionSpecOrBuilder(); + + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for toolType. + */ + int getToolTypeValue(); + /** + * + * + *
+   * Output only. The tool type.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool.ToolType tool_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The toolType. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool.ToolType getToolType(); + + com.google.cloud.dialogflow.cx.v3beta1.Tool.SpecificationCase getSpecificationCase(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java new file mode 100644 index 000000000000..3cb8d63f6dd3 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolProto.java @@ -0,0 +1,484 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public final class ToolProto { + private ToolProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_CreateToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ListToolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_GetToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_DeleteToolRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_OpenApiTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_DataStoreTool_FallbackPrompt_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_ExtensionTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_FunctionTool_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ApiKeyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_OAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_Authentication_ServiceAgentAuthConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_Tool_TLSConfig_CACert_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_cx_v3beta1_ExportToolsMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/dialogflow/cx/v3beta1/too" + + "l.proto\022\"google.cloud.dialogflow.cx.v3be" + + "ta1\032\034google/api/annotations.proto\032\027googl" + + "e/api/client.proto\032\037google/api/field_beh" + + "avior.proto\032\031google/api/resource.proto\032>" + + "google/cloud/dialogflow/cx/v3beta1/data_" + + "store_connection.proto\032/google/cloud/dia" + + "logflow/cx/v3beta1/inline.proto\032#google/" + + "longrunning/operations.proto\032\033google/pro" + + "tobuf/empty.proto\032 google/protobuf/field" + + "_mask.proto\032\034google/protobuf/struct.prot" + + "o\"\210\001\n\021CreateToolRequest\0226\n\006parent\030\001 \001(\tB" + + "&\340A\002\372A \022\036dialogflow.googleapis.com/Tool\022" + + ";\n\004tool\030\002 \001(\0132(.google.cloud.dialogflow." + + "cx.v3beta1.ToolB\003\340A\002\"q\n\020ListToolsRequest" + + "\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036dialogflow.goo" + + "gleapis.com/Tool\022\021\n\tpage_size\030\002 \001(\005\022\022\n\np" + + "age_token\030\003 \001(\t\"e\n\021ListToolsResponse\0227\n\005" + + "tools\030\001 \003(\0132(.google.cloud.dialogflow.cx" + + ".v3beta1.Tool\022\027\n\017next_page_token\030\002 \001(\t\"F" + + "\n\016GetToolRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036" + + "dialogflow.googleapis.com/Tool\"\355\002\n\022Expor" + + "tToolsRequest\0226\n\006parent\030\001 \001(\tB&\340A\002\372A \022\036d" + + "ialogflow.googleapis.com/Tool\0225\n\005tools\030\002" + + " \003(\tB&\340A\002\372A \n\036dialogflow.googleapis.com/" + + "Tool\022\030\n\ttools_uri\030\003 \001(\tB\003\340A\001H\000\022#\n\024tools_" + + "content_inline\030\004 \001(\010B\003\340A\001H\000\022[\n\013data_form" + + "at\030\005 \001(\0162A.google.cloud.dialogflow.cx.v3" + + "beta1.ExportToolsRequest.DataFormatB\003\340A\001" + + "\"=\n\nDataFormat\022\033\n\027DATA_FORMAT_UNSPECIFIE" + + "D\020\000\022\010\n\004BLOB\020\001\022\010\n\004JSON\020\002B\r\n\013destination\"\203" + + "\001\n\023ExportToolsResponse\022\023\n\ttools_uri\030\001 \001(" + + "\tH\000\022N\n\rtools_content\030\002 \001(\01325.google.clou" + + "d.dialogflow.cx.v3beta1.InlineDestinatio" + + "nH\000B\007\n\005tools\"\201\001\n\021UpdateToolRequest\022;\n\004to" + + "ol\030\001 \001(\0132(.google.cloud.dialogflow.cx.v3" + + "beta1.ToolB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g" + + "oogle.protobuf.FieldMask\"X\n\021DeleteToolRe" + + "quest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036dialogflow." + + "googleapis.com/Tool\022\r\n\005force\030\002 \001(\010\"\306\022\n\004T" + + "ool\022\014\n\004name\030\001 \001(\t\022\031\n\014display_name\030\002 \001(\tB" + + "\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\002\022\023\n\007action" + + "s\030\006 \003(\tB\002\030\001\022\023\n\007schemas\030\007 \003(\tB\002\030\001\022M\n\ropen" + + "_api_spec\030\004 \001(\01324.google.cloud.dialogflo" + + "w.cx.v3beta1.Tool.OpenApiToolH\000\022Q\n\017data_" + + "store_spec\030\010 \001(\01326.google.cloud.dialogfl" + + "ow.cx.v3beta1.Tool.DataStoreToolH\000\022P\n\016ex" + + "tension_spec\030\013 \001(\01326.google.cloud.dialog" + + "flow.cx.v3beta1.Tool.ExtensionToolH\000\022N\n\r" + + "function_spec\030\r \001(\01325.google.cloud.dialo" + + "gflow.cx.v3beta1.Tool.FunctionToolH\000\022I\n\t" + + "tool_type\030\014 \001(\01621.google.cloud.dialogflo" + + "w.cx.v3beta1.Tool.ToolTypeB\003\340A\003\032\326\001\n\013Open" + + "ApiTool\022\032\n\013text_schema\030\001 \001(\tB\003\340A\002H\000\022T\n\016a" + + "uthentication\030\002 \001(\01327.google.cloud.dialo" + + "gflow.cx.v3beta1.Tool.AuthenticationB\003\340A" + + "\001\022K\n\ntls_config\030\003 \001(\01322.google.cloud.dia" + + "logflow.cx.v3beta1.Tool.TLSConfigB\003\340A\001B\010" + + "\n\006schema\032\344\001\n\rDataStoreTool\022\\\n\026data_store" + + "_connections\030\001 \003(\01327.google.cloud.dialog" + + "flow.cx.v3beta1.DataStoreConnectionB\003\340A\002" + + "\022c\n\017fallback_prompt\030\003 \001(\0132E.google.cloud" + + ".dialogflow.cx.v3beta1.Tool.DataStoreToo" + + "l.FallbackPromptB\003\340A\002\032\020\n\016FallbackPrompt\032" + + "\"\n\rExtensionTool\022\021\n\004name\030\001 \001(\tB\003\340A\002\032w\n\014F" + + "unctionTool\0222\n\014input_schema\030\001 \001(\0132\027.goog" + + "le.protobuf.StructB\003\340A\001\0223\n\routput_schema" + + "\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\032\203\007\n" + + "\016Authentication\022^\n\016api_key_config\030\001 \001(\0132" + + "D.google.cloud.dialogflow.cx.v3beta1.Too" + + "l.Authentication.ApiKeyConfigH\000\022[\n\014oauth" + + "_config\030\002 \001(\0132C.google.cloud.dialogflow." + + "cx.v3beta1.Tool.Authentication.OAuthConf" + + "igH\000\022s\n\031service_agent_auth_config\030\003 \001(\0132" + + "N.google.cloud.dialogflow.cx.v3beta1.Too" + + "l.Authentication.ServiceAgentAuthConfigH" + + "\000\032\243\001\n\014ApiKeyConfig\022\025\n\010key_name\030\001 \001(\tB\003\340A" + + "\002\022\024\n\007api_key\030\002 \001(\tB\003\340A\002\022f\n\020request_locat" + + "ion\030\003 \001(\0162G.google.cloud.dialogflow.cx.v" + + "3beta1.Tool.Authentication.RequestLocati" + + "onB\003\340A\002\032\234\002\n\013OAuthConfig\022q\n\020oauth_grant_t" + + "ype\030\001 \001(\0162R.google.cloud.dialogflow.cx.v" + + "3beta1.Tool.Authentication.OAuthConfig.O" + + "authGrantTypeB\003\340A\002\022\026\n\tclient_id\030\002 \001(\tB\003\340" + + "A\002\022\032\n\rclient_secret\030\003 \001(\tB\003\340A\002\022\033\n\016token_" + + "endpoint\030\004 \001(\tB\003\340A\002\"I\n\016OauthGrantType\022 \n" + + "\034OAUTH_GRANT_TYPE_UNSPECIFIED\020\000\022\025\n\021CLIEN" + + "T_CREDENTIAL\020\001\032\030\n\026ServiceAgentAuthConfig" + + "\"Q\n\017RequestLocation\022 \n\034REQUEST_LOCATION_" + + "UNSPECIFIED\020\000\022\n\n\006HEADER\020\001\022\020\n\014QUERY_STRIN" + + "G\020\002B\r\n\013auth_config\032\225\001\n\tTLSConfig\022P\n\010ca_c" + + "erts\030\001 \003(\01329.google.cloud.dialogflow.cx." + + "v3beta1.Tool.TLSConfig.CACertB\003\340A\002\0326\n\006CA" + + "Cert\022\031\n\014display_name\030\001 \001(\tB\003\340A\002\022\021\n\004cert\030" + + "\002 \001(\014B\003\340A\002\"L\n\010ToolType\022\031\n\025TOOL_TYPE_UNSP" + + "ECIFIED\020\000\022\023\n\017CUSTOMIZED_TOOL\020\001\022\020\n\014BUILTI" + + "N_TOOL\020\002:h\352Ae\n\036dialogflow.googleapis.com" + + "/Tool\022Cprojects/{project}/locations/{loc" + + "ation}/agents/{agent}/tools/{tool}B\017\n\rsp" + + "ecification\"\025\n\023ExportToolsMetadata2\221\n\n\005T" + + "ools\022\302\001\n\nCreateTool\0225.google.cloud.dialo" + + "gflow.cx.v3beta1.CreateToolRequest\032(.goo" + + "gle.cloud.dialogflow.cx.v3beta1.Tool\"S\332A" + + "\013parent,tool\202\323\344\223\002?\"7/v3beta1/{parent=pro" + + "jects/*/locations/*/agents/*}/tools:\004too" + + "l\022\302\001\n\tListTools\0224.google.cloud.dialogflo" + + "w.cx.v3beta1.ListToolsRequest\0325.google.c" + + "loud.dialogflow.cx.v3beta1.ListToolsResp" + + "onse\"H\332A\006parent\202\323\344\223\0029\0227/v3beta1/{parent=" + + "projects/*/locations/*/agents/*}/tools\022\334" + + "\001\n\013ExportTools\0226.google.cloud.dialogflow" + + ".cx.v3beta1.ExportToolsRequest\032\035.google." + + "longrunning.Operation\"v\312A*\n\023ExportToolsR" + + "esponse\022\023ExportToolsMetadata\202\323\344\223\002C\">/v3b" + + "eta1/{parent=projects/*/locations/*/agen" + + "ts/*}/tools:export:\001*\022\257\001\n\007GetTool\0222.goog" + + "le.cloud.dialogflow.cx.v3beta1.GetToolRe" + + "quest\032(.google.cloud.dialogflow.cx.v3bet" + + "a1.Tool\"F\332A\004name\202\323\344\223\0029\0227/v3beta1/{name=p" + + "rojects/*/locations/*/agents/*/tools/*}\022" + + "\314\001\n\nUpdateTool\0225.google.cloud.dialogflow" + + ".cx.v3beta1.UpdateToolRequest\032(.google.c" + + "loud.dialogflow.cx.v3beta1.Tool\"]\332A\020tool" + + ",update_mask\202\323\344\223\002D2 + * Stores metadata of the invocation of an action supported by a tool. + *
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolUse} + */ +public final class ToolUse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.ToolUse) + ToolUseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ToolUse.newBuilder() to construct. + private ToolUse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ToolUse() { + tool_ = ""; + action_ = ""; + inputParameters_ = java.util.Collections.emptyList(); + outputParameters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ToolUse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder.class); + } + + public static final int TOOL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object tool_ = ""; + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+   * be used. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + @java.lang.Override + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+   * be used. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + @java.lang.Override + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object action_ = ""; + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_PARAMETERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List inputParameters_; + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + @java.lang.Override + public java.util.List + getInputParametersList() { + return inputParameters_; + } + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + @java.lang.Override + public java.util.List + getInputParametersOrBuilderList() { + return inputParameters_; + } + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + @java.lang.Override + public int getInputParametersCount() { + return inputParameters_.size(); + } + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { + return inputParameters_.get(index); + } + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getInputParametersOrBuilder(int index) { + return inputParameters_.get(index); + } + + public static final int OUTPUT_PARAMETERS_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List outputParameters_; + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + @java.lang.Override + public java.util.List + getOutputParametersList() { + return outputParameters_; + } + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + @java.lang.Override + public java.util.List + getOutputParametersOrBuilderList() { + return outputParameters_; + } + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + @java.lang.Override + public int getOutputParametersCount() { + return outputParameters_.size(); + } + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { + return outputParameters_.get(index); + } + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getOutputParametersOrBuilder(int index) { + return outputParameters_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, action_); + } + for (int i = 0; i < inputParameters_.size(); i++) { + output.writeMessage(3, inputParameters_.get(i)); + } + for (int i = 0; i < outputParameters_.size(); i++) { + output.writeMessage(4, outputParameters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tool_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tool_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(action_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, action_); + } + for (int i = 0; i < inputParameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, inputParameters_.get(i)); + } + for (int i = 0; i < outputParameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, outputParameters_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolUse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.ToolUse other = + (com.google.cloud.dialogflow.cx.v3beta1.ToolUse) obj; + + if (!getTool().equals(other.getTool())) return false; + if (!getAction().equals(other.getAction())) return false; + if (!getInputParametersList().equals(other.getInputParametersList())) return false; + if (!getOutputParametersList().equals(other.getOutputParametersList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + if (getInputParametersCount() > 0) { + hash = (37 * hash) + INPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getInputParametersList().hashCode(); + } + if (getOutputParametersCount() > 0) { + hash = (37 * hash) + OUTPUT_PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getOutputParametersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.ToolUse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Stores metadata of the invocation of an action supported by a tool.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.ToolUse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.ToolUse) + com.google.cloud.dialogflow.cx.v3beta1.ToolUseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.class, + com.google.cloud.dialogflow.cx.v3beta1.ToolUse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.ToolUse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = ""; + action_ = ""; + if (inputParametersBuilder_ == null) { + inputParameters_ = java.util.Collections.emptyList(); + } else { + inputParameters_ = null; + inputParametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (outputParametersBuilder_ == null) { + outputParameters_ = java.util.Collections.emptyList(); + } else { + outputParameters_ = null; + outputParametersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_ToolUse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse build() { + com.google.cloud.dialogflow.cx.v3beta1.ToolUse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.ToolUse result = + new com.google.cloud.dialogflow.cx.v3beta1.ToolUse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.cloud.dialogflow.cx.v3beta1.ToolUse result) { + if (inputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + inputParameters_ = java.util.Collections.unmodifiableList(inputParameters_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.inputParameters_ = inputParameters_; + } else { + result.inputParameters_ = inputParametersBuilder_.build(); + } + if (outputParametersBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + outputParameters_ = java.util.Collections.unmodifiableList(outputParameters_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.outputParameters_ = outputParameters_; + } else { + result.outputParameters_ = outputParametersBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.ToolUse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = tool_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.action_ = action_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.ToolUse) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.ToolUse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.ToolUse other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.ToolUse.getDefaultInstance()) return this; + if (!other.getTool().isEmpty()) { + tool_ = other.tool_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (inputParametersBuilder_ == null) { + if (!other.inputParameters_.isEmpty()) { + if (inputParameters_.isEmpty()) { + inputParameters_ = other.inputParameters_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureInputParametersIsMutable(); + inputParameters_.addAll(other.inputParameters_); + } + onChanged(); + } + } else { + if (!other.inputParameters_.isEmpty()) { + if (inputParametersBuilder_.isEmpty()) { + inputParametersBuilder_.dispose(); + inputParametersBuilder_ = null; + inputParameters_ = other.inputParameters_; + bitField0_ = (bitField0_ & ~0x00000004); + inputParametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputParametersFieldBuilder() + : null; + } else { + inputParametersBuilder_.addAllMessages(other.inputParameters_); + } + } + } + if (outputParametersBuilder_ == null) { + if (!other.outputParameters_.isEmpty()) { + if (outputParameters_.isEmpty()) { + outputParameters_ = other.outputParameters_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureOutputParametersIsMutable(); + outputParameters_.addAll(other.outputParameters_); + } + onChanged(); + } + } else { + if (!other.outputParameters_.isEmpty()) { + if (outputParametersBuilder_.isEmpty()) { + outputParametersBuilder_.dispose(); + outputParametersBuilder_ = null; + outputParameters_ = other.outputParameters_; + bitField0_ = (bitField0_ & ~0x00000008); + outputParametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputParametersFieldBuilder() + : null; + } else { + outputParametersBuilder_.addAllMessages(other.outputParameters_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + tool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(m); + } else { + inputParametersBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter m = + input.readMessage( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.parser(), + extensionRegistry); + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(m); + } else { + outputParametersBuilder_.addMessage(m); + } + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object tool_ = ""; + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+     * be used. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + public java.lang.String getTool() { + java.lang.Object ref = tool_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tool_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+     * be used. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + public com.google.protobuf.ByteString getToolBytes() { + java.lang.Object ref = tool_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tool_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+     * be used. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The tool to set. + * @return This builder for chaining. + */ + public Builder setTool(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+     * be used. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearTool() { + tool_ = getDefaultInstance().getTool(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+     * be used. Format: `projects/<Project ID>/locations/<Location
+     * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+     * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for tool to set. + * @return This builder for chaining. + */ + public Builder setToolBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tool_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + action_ = getDefaultInstance().getAction(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Name of the action to be called during the tool use.
+     * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + action_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List + inputParameters_ = java.util.Collections.emptyList(); + + private void ensureInputParametersIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + inputParameters_ = + new java.util.ArrayList( + inputParameters_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + inputParametersBuilder_; + + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public java.util.List + getInputParametersList() { + if (inputParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputParameters_); + } else { + return inputParametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public int getInputParametersCount() { + if (inputParametersBuilder_ == null) { + return inputParameters_.size(); + } else { + return inputParametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index) { + if (inputParametersBuilder_ == null) { + return inputParameters_.get(index); + } else { + return inputParametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder setInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.set(index, value); + onChanged(); + } else { + inputParametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder setInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.set(index, builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder addInputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.add(value); + onChanged(); + } else { + inputParametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder addInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (inputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputParametersIsMutable(); + inputParameters_.add(index, value); + onChanged(); + } else { + inputParametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder addInputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder addInputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.add(index, builderForValue.build()); + onChanged(); + } else { + inputParametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder addAllInputParameters( + java.lang.Iterable + values) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputParameters_); + onChanged(); + } else { + inputParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder clearInputParameters() { + if (inputParametersBuilder_ == null) { + inputParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + inputParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public Builder removeInputParameters(int index) { + if (inputParametersBuilder_ == null) { + ensureInputParametersIsMutable(); + inputParameters_.remove(index); + onChanged(); + } else { + inputParametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder getInputParametersBuilder( + int index) { + return getInputParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getInputParametersOrBuilder(int index) { + if (inputParametersBuilder_ == null) { + return inputParameters_.get(index); + } else { + return inputParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public java.util.List + getInputParametersOrBuilderList() { + if (inputParametersBuilder_ != null) { + return inputParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputParameters_); + } + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addInputParametersBuilder() { + return getInputParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder addInputParametersBuilder( + int index) { + return getInputParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of input parameters for the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + * + */ + public java.util.List + getInputParametersBuilderList() { + return getInputParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getInputParametersFieldBuilder() { + if (inputParametersBuilder_ == null) { + inputParametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + inputParameters_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + inputParameters_ = null; + } + return inputParametersBuilder_; + } + + private java.util.List + outputParameters_ = java.util.Collections.emptyList(); + + private void ensureOutputParametersIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + outputParameters_ = + new java.util.ArrayList( + outputParameters_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + outputParametersBuilder_; + + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public java.util.List + getOutputParametersList() { + if (outputParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputParameters_); + } else { + return outputParametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public int getOutputParametersCount() { + if (outputParametersBuilder_ == null) { + return outputParameters_.size(); + } else { + return outputParametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index) { + if (outputParametersBuilder_ == null) { + return outputParameters_.get(index); + } else { + return outputParametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder setOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.set(index, value); + onChanged(); + } else { + outputParametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder setOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.set(index, builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder addOutputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.add(value); + onChanged(); + } else { + outputParametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder addOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter value) { + if (outputParametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOutputParametersIsMutable(); + outputParameters_.add(index, value); + onChanged(); + } else { + outputParametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder addOutputParameters( + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder addOutputParameters( + int index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder builderForValue) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.add(index, builderForValue.build()); + onChanged(); + } else { + outputParametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder addAllOutputParameters( + java.lang.Iterable + values) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputParameters_); + onChanged(); + } else { + outputParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder clearOutputParameters() { + if (outputParametersBuilder_ == null) { + outputParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + outputParametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public Builder removeOutputParameters(int index) { + if (outputParametersBuilder_ == null) { + ensureOutputParametersIsMutable(); + outputParameters_.remove(index); + onChanged(); + } else { + outputParametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + getOutputParametersBuilder(int index) { + return getOutputParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder + getOutputParametersOrBuilder(int index) { + if (outputParametersBuilder_ == null) { + return outputParameters_.get(index); + } else { + return outputParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public java.util.List + getOutputParametersOrBuilderList() { + if (outputParametersBuilder_ != null) { + return outputParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputParameters_); + } + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addOutputParametersBuilder() { + return getOutputParametersFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder + addOutputParametersBuilder(int index) { + return getOutputParametersFieldBuilder() + .addBuilder( + index, com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.getDefaultInstance()); + } + /** + * + * + *
+     * A list of output parameters generated by the action.
+     * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + public java.util.List + getOutputParametersBuilderList() { + return getOutputParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder> + getOutputParametersFieldBuilder() { + if (outputParametersBuilder_ == null) { + outputParametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder>( + outputParameters_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + outputParameters_ = null; + } + return outputParametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.ToolUse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.ToolUse) + private static final com.google.cloud.dialogflow.cx.v3beta1.ToolUse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.ToolUse(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.ToolUse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolUse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolUse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java new file mode 100644 index 000000000000..ad4d50624e7c --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ToolUseOrBuilder.java @@ -0,0 +1,195 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface ToolUseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.ToolUse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+   * be used. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The tool. + */ + java.lang.String getTool(); + /** + * + * + *
+   * Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should
+   * be used. Format: `projects/<Project ID>/locations/<Location
+   * ID>/agents/<Agent ID>/tools/<Tool ID>`.
+   * 
+ * + * + * string tool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for tool. + */ + com.google.protobuf.ByteString getToolBytes(); + + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * Optional. Name of the action to be called during the tool use.
+   * 
+ * + * string action = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); + + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + java.util.List getInputParametersList(); + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getInputParameters(int index); + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + int getInputParametersCount(); + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + java.util.List + getInputParametersOrBuilderList(); + /** + * + * + *
+   * A list of input parameters for the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter input_parameters = 3; + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getInputParametersOrBuilder( + int index); + + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + java.util.List getOutputParametersList(); + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameter getOutputParameters(int index); + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + int getOutputParametersCount(); + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + java.util.List + getOutputParametersOrBuilderList(); + /** + * + * + *
+   * A list of output parameters generated by the action.
+   * 
+ * + * repeated .google.cloud.dialogflow.cx.v3beta1.ActionParameter output_parameters = 4; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ActionParameterOrBuilder getOutputParametersOrBuilder( + int index); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequest.java new file mode 100644 index 000000000000..fae569ba695e --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequest.java @@ -0,0 +1,1037 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Examples.UpdateExample][google.cloud.dialogflow.cx.v3beta1.Examples.UpdateExample].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest} + */ +public final class UpdateExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) + UpdateExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateExampleRequest.newBuilder() to construct. + private UpdateExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateExampleRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateExampleRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.Builder.class); + } + + private int bitField0_; + public static final int EXAMPLE_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.Example example_; + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + @java.lang.Override + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Example getExample() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder() { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getExample()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getExample()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) obj; + + if (hasExample() != other.hasExample()) return false; + if (hasExample()) { + if (!getExample().equals(other.getExample())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasExample()) { + hash = (37 * hash) + EXAMPLE_FIELD_NUMBER; + hash = (53 * hash) + getExample().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Examples.UpdateExample][google.cloud.dialogflow.cx.v3beta1.Examples.UpdateExample].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExampleFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest.getDefaultInstance()) + return this; + if (other.hasExample()) { + mergeExample(other.getExample()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getExampleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.cx.v3beta1.Example example_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + exampleBuilder_; + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + public boolean hasExample() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example getExample() { + if (exampleBuilder_ == null) { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } else { + return exampleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (exampleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + example_ = value; + } else { + exampleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setExample( + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder builderForValue) { + if (exampleBuilder_ == null) { + example_ = builderForValue.build(); + } else { + exampleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeExample(com.google.cloud.dialogflow.cx.v3beta1.Example value) { + if (exampleBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && example_ != null + && example_ != com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance()) { + getExampleBuilder().mergeFrom(value); + } else { + example_ = value; + } + } else { + exampleBuilder_.mergeFrom(value); + } + if (example_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearExample() { + bitField0_ = (bitField0_ & ~0x00000001); + example_ = null; + if (exampleBuilder_ != null) { + exampleBuilder_.dispose(); + exampleBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Example.Builder getExampleBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExampleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder() { + if (exampleBuilder_ != null) { + return exampleBuilder_.getMessageOrBuilder(); + } else { + return example_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Example.getDefaultInstance() + : example_; + } + } + /** + * + * + *
+     * Required. The example to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder> + getExampleFieldBuilder() { + if (exampleBuilder_ == null) { + exampleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Example, + com.google.cloud.dialogflow.cx.v3beta1.Example.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder>( + getExample(), getParentForChildren(), isClean()); + example_ = null; + } + return exampleBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. The mask to control which fields get updated. If the mask is not
+     * present, all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateExampleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequestOrBuilder.java new file mode 100644 index 000000000000..2c5caff355d7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateExampleRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UpdateExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the example field is set. + */ + boolean hasExample(); + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The example. + */ + com.google.cloud.dialogflow.cx.v3beta1.Example getExample(); + /** + * + * + *
+   * Required. The example to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Example example = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ExampleOrBuilder getExampleOrBuilder(); + + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. The mask to control which fields get updated. If the mask is not
+   * present, all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequest.java new file mode 100644 index 000000000000..76da51981b2b --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequest.java @@ -0,0 +1,1029 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.UpdatePlaybook].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest} + */ +public final class UpdatePlaybookRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) + UpdatePlaybookRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePlaybookRequest.newBuilder() to construct. + private UpdatePlaybookRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePlaybookRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePlaybookRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.Builder.class); + } + + private int bitField0_; + public static final int PLAYBOOK_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + @java.lang.Override + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPlaybook()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPlaybook()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) obj; + + if (hasPlaybook() != other.hasPlaybook()) return false; + if (hasPlaybook()) { + if (!getPlaybook().equals(other.getPlaybook())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPlaybook()) { + hash = (37 * hash) + PLAYBOOK_FIELD_NUMBER; + hash = (53 * hash) + getPlaybook().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.UpdatePlaybook].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPlaybookFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.PlaybookProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdatePlaybookRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.playbook_ = playbookBuilder_ == null ? playbook_ : playbookBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest other) { + if (other + == com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest.getDefaultInstance()) + return this; + if (other.hasPlaybook()) { + mergePlaybook(other.getPlaybook()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPlaybookFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.cx.v3beta1.Playbook playbook_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + playbookBuilder_; + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + public boolean hasPlaybook() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook() { + if (playbookBuilder_ == null) { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } else { + return playbookBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + playbook_ = value; + } else { + playbookBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPlaybook( + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder builderForValue) { + if (playbookBuilder_ == null) { + playbook_ = builderForValue.build(); + } else { + playbookBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePlaybook(com.google.cloud.dialogflow.cx.v3beta1.Playbook value) { + if (playbookBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && playbook_ != null + && playbook_ != com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance()) { + getPlaybookBuilder().mergeFrom(value); + } else { + playbook_ = value; + } + } else { + playbookBuilder_.mergeFrom(value); + } + if (playbook_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPlaybook() { + bitField0_ = (bitField0_ & ~0x00000001); + playbook_ = null; + if (playbookBuilder_ != null) { + playbookBuilder_.dispose(); + playbookBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder getPlaybookBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPlaybookFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder() { + if (playbookBuilder_ != null) { + return playbookBuilder_.getMessageOrBuilder(); + } else { + return playbook_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Playbook.getDefaultInstance() + : playbook_; + } + } + /** + * + * + *
+     * Required. The playbook to update.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder> + getPlaybookFieldBuilder() { + if (playbookBuilder_ == null) { + playbookBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Playbook, + com.google.cloud.dialogflow.cx.v3beta1.Playbook.Builder, + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder>( + getPlaybook(), getParentForChildren(), isClean()); + playbook_ = null; + } + return playbookBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePlaybookRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequestOrBuilder.java new file mode 100644 index 000000000000..7b6968c3d6dd --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdatePlaybookRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/playbook.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UpdatePlaybookRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the playbook field is set. + */ + boolean hasPlaybook(); + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The playbook. + */ + com.google.cloud.dialogflow.cx.v3beta1.Playbook getPlaybook(); + /** + * + * + *
+   * Required. The playbook to update.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Playbook playbook = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.PlaybookOrBuilder getPlaybookOrBuilder(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequest.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequest.java new file mode 100644 index 000000000000..041e9e892958 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequest.java @@ -0,0 +1,1020 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * The request message for
+ * [Tools.UpdateTool][google.cloud.dialogflow.cx.v3beta1.Tools.UpdateTool].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest} + */ +public final class UpdateToolRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) + UpdateToolRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateToolRequest.newBuilder() to construct. + private UpdateToolRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateToolRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateToolRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.Builder.class); + } + + private int bitField0_; + public static final int TOOL_FIELD_NUMBER = 1; + private com.google.cloud.dialogflow.cx.v3beta1.Tool tool_; + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + @java.lang.Override + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTool() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() : tool_; + } + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder() { + return tool_ == null ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() : tool_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTool()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest other = + (com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) obj; + + if (hasTool() != other.hasTool()) return false; + if (hasTool()) { + if (!getTool().equals(other.getTool())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTool()) { + hash = (37 * hash) + TOOL_FIELD_NUMBER; + hash = (53 * hash) + getTool().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The request message for
+   * [Tools.UpdateTool][google.cloud.dialogflow.cx.v3beta1.Tools.UpdateTool].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.class, + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getToolFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ToolProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UpdateToolRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest build() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest result = + new com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tool_ = toolBuilder_ == null ? tool_ : toolBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest.getDefaultInstance()) + return this; + if (other.hasTool()) { + mergeTool(other.getTool()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getToolFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.dialogflow.cx.v3beta1.Tool tool_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + toolBuilder_; + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + public boolean hasTool() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool getTool() { + if (toolBuilder_ == null) { + return tool_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() + : tool_; + } else { + return toolBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tool_ = value; + } else { + toolBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTool(com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder builderForValue) { + if (toolBuilder_ == null) { + tool_ = builderForValue.build(); + } else { + toolBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTool(com.google.cloud.dialogflow.cx.v3beta1.Tool value) { + if (toolBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && tool_ != null + && tool_ != com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance()) { + getToolBuilder().mergeFrom(value); + } else { + tool_ = value; + } + } else { + toolBuilder_.mergeFrom(value); + } + if (tool_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTool() { + bitField0_ = (bitField0_ & ~0x00000001); + tool_ = null; + if (toolBuilder_ != null) { + toolBuilder_.dispose(); + toolBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder getToolBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getToolFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder() { + if (toolBuilder_ != null) { + return toolBuilder_.getMessageOrBuilder(); + } else { + return tool_ == null + ? com.google.cloud.dialogflow.cx.v3beta1.Tool.getDefaultInstance() + : tool_; + } + } + /** + * + * + *
+     * Required. The Tool to be updated.
+     * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder> + getToolFieldBuilder() { + if (toolBuilder_ == null) { + toolBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dialogflow.cx.v3beta1.Tool, + com.google.cloud.dialogflow.cx.v3beta1.Tool.Builder, + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder>( + getTool(), getParentForChildren(), isClean()); + tool_ = null; + } + return toolBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The mask to control which fields get updated. If the mask is not present,
+     * all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) + private static final com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateToolRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequestOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequestOrBuilder.java new file mode 100644 index 000000000000..731a083ccb1a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UpdateToolRequestOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/tool.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UpdateToolRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the tool field is set. + */ + boolean hasTool(); + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The tool. + */ + com.google.cloud.dialogflow.cx.v3beta1.Tool getTool(); + /** + * + * + *
+   * Required. The Tool to be updated.
+   * 
+ * + * + * .google.cloud.dialogflow.cx.v3beta1.Tool tool = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dialogflow.cx.v3beta1.ToolOrBuilder getToolOrBuilder(); + + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The mask to control which fields get updated. If the mask is not present,
+   * all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtterance.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtterance.java new file mode 100644 index 000000000000..1c84ea10ceb7 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtterance.java @@ -0,0 +1,625 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +/** + * + * + *
+ * UserUtterance represents one message sent by the customer.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UserUtterance} + */ +public final class UserUtterance extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3beta1.UserUtterance) + UserUtteranceOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserUtterance.newBuilder() to construct. + private UserUtterance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserUtterance() { + text_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserUtterance(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.class, + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dialogflow.cx.v3beta1.UserUtterance)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance other = + (com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) obj; + + if (!getText().equals(other.getText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.dialogflow.cx.v3beta1.UserUtterance prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * UserUtterance represents one message sent by the customer.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.cx.v3beta1.UserUtterance} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3beta1.UserUtterance) + com.google.cloud.dialogflow.cx.v3beta1.UserUtteranceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.class, + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.cx.v3beta1.ExampleProto + .internal_static_google_cloud_dialogflow_cx_v3beta1_UserUtterance_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getDefaultInstanceForType() { + return com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance build() { + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance buildPartial() { + com.google.cloud.dialogflow.cx.v3beta1.UserUtterance result = + new com.google.cloud.dialogflow.cx.v3beta1.UserUtterance(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dialogflow.cx.v3beta1.UserUtterance result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) { + return mergeFrom((com.google.cloud.dialogflow.cx.v3beta1.UserUtterance) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3beta1.UserUtterance other) { + if (other == com.google.cloud.dialogflow.cx.v3beta1.UserUtterance.getDefaultInstance()) + return this; + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object text_ = ""; + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + public com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Message content in text.
+     * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.cx.v3beta1.UserUtterance) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3beta1.UserUtterance) + private static final com.google.cloud.dialogflow.cx.v3beta1.UserUtterance DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3beta1.UserUtterance(); + } + + public static com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserUtterance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.dialogflow.cx.v3beta1.UserUtterance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtteranceOrBuilder.java b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtteranceOrBuilder.java new file mode 100644 index 000000000000..a14bcd83eef1 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/UserUtteranceOrBuilder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/dialogflow/cx/v3beta1/example.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.dialogflow.cx.v3beta1; + +public interface UserUtteranceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3beta1.UserUtterance) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The text. + */ + java.lang.String getText(); + /** + * + * + *
+   * Required. Message content in text.
+   * 
+ * + * string text = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for text. + */ + com.google.protobuf.ByteString getTextBytes(); +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto index 72b419c3c64c..0dccd245f921 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/agent.proto @@ -300,15 +300,34 @@ message Agent { // Speech recognition related settings. SpeechToTextSettings speech_to_text_settings = 13; - // Immutable. Name of the start flow in this agent. A start flow will be + // Optional. Name of the start flow in this agent. A start flow will be // automatically created when the agent is created, and can only be deleted by // deleting the agent. Format: `projects//locations//agents//flows/`. + // ID>/agents//flows/`. Currently only the default start + // flow with id "00000000-0000-0000-0000-000000000000" is allowed. + // + // Only one of `start_flow` or `start_playbook` should be set, but not both. string start_flow = 16 [ - (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } ]; + // Optional. Name of the start playbook in this agent. A start playbook will + // be automatically created when the agent is created, and can only be deleted + // by deleting the agent. + // Format: `projects//locations//agents//playbooks/`. Currently only the + // default playbook with id + // "00000000-0000-0000-0000-000000000000" is allowed. + // + // Only one of `start_flow` or `start_playbook` should be set, but not both. + string start_playbook = 39 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + // Name of the // [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] // reference for the agent. Format: `projects//locations//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The name of the entity types to export. + // Format: `projects//locations//agents//entityTypes/`. + repeated string entity_types = 2 [(google.api.field_behavior) = REQUIRED]; + + // The destination to export. + oneof destination { + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the entity + // types to. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string entity_types_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The option to return the serialized entity types inline. + bool entity_types_content_inline = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The data format of the exported entity types. If not specified, + // `BLOB` is assumed. + DataFormat data_format = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language to retrieve the entity type for. The following + // fields are language dependent: + // + // * `EntityType.entities.value` + // * `EntityType.entities.synonyms` + // * `EntityType.excluded_phrases.value` + // + // If not specified, all language dependent fields will be retrieved. + // [Many + // languages](https://cloud.google.com/dialogflow/docs/reference/language) + // are supported. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes]. +message ExportEntityTypesResponse { + // Exported entity types can be either in cloud storage or local download. + oneof exported_entity_types { + // The URI to a file containing the exported entity types. This field is + // populated only if `entity_types_uri` is specified in + // [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest]. + string entity_types_uri = 1; + + // Uncompressed byte content for entity types. This field is populated only + // if `entity_types_content_inline` is set to true in + // [ExportEntityTypesRequest][google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest]. + InlineDestination entity_types_content = 2; + } +} + +// Metadata returned for the +// [EntityTypes.ExportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ExportEntityTypes] +// long running operation. +message ExportEntityTypesMetadata {} + +// The request message for +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes]. +message ImportEntityTypesRequest { + // Merge option when display name conflicts exist during import. + enum MergeOption { + // Unspecified. If used, system uses REPORT_CONFLICT as default. + MERGE_OPTION_UNSPECIFIED = 0; + + // Replace the original entity type in the agent with the new entity type + // when display name conflicts exist. + REPLACE = 1; + + // Merge the original entity type with the new entity type when display name + // conflicts exist. + MERGE = 2; + + // Create new entity types with new display names to differentiate them from + // the existing entity types when display name conflicts exist. + RENAME = 3; + + // Report conflict information if display names conflict is detected. + // Otherwise, import entity types. + REPORT_CONFLICT = 4; + + // Keep the original entity type and discard the conflicting new entity type + // when display name conflicts exist. + KEEP = 5; + } + + // Required. The agent to import the entity types into. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/EntityType" + } + ]; + + // Required. The entity types to import. + oneof entity_types { + // The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI + // to import entity types from. The format of this URI must be + // `gs:///`. + // + // Dialogflow performs a read operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have read permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string entity_types_uri = 2; + + // Uncompressed byte content of entity types. + InlineSource entity_types_content = 3; + } + + // Required. Merge option for importing entity types. + MergeOption merge_option = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The target entity type to import into. + // Format: `projects//locations//agents//entity_types/`. + // If set, there should be only one entity type included in + // [entity_types][google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest.entity_types], + // of which the type should match the type of the target entity type. All + // [entities][google.cloud.dialogflow.cx.v3beta1.EntityType.entities] in the + // imported entity type will be added to the target entity type. + string target_entity_type = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + } + ]; +} + +// The response message for +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes]. +message ImportEntityTypesResponse { + // Conflicting resources detected during the import process. Only filled when + // [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] is set in the + // request and there are conflicts in the display names. + message ConflictingResources { + // Display names of conflicting entity types. + repeated string entity_type_display_names = 1; + + // Display names of conflicting entities. + repeated string entity_display_names = 2; + } + + // The unique identifier of the imported entity types. + // Format: `projects//locations//agents//entity_types/`. + repeated string entity_types = 1 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/EntityType" + }]; + + // Info which resources have conflicts when + // [REPORT_CONFLICT][ImportEntityTypesResponse.REPORT_CONFLICT] merge_option + // is set in ImportEntityTypesRequest. + ConflictingResources conflicting_resources = 2; +} + +// Metadata returned for the +// [EntityTypes.ImportEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ImportEntityTypes] +// long running operation. +message ImportEntityTypesMetadata {} + // The request message for // [EntityTypes.ListEntityTypes][google.cloud.dialogflow.cx.v3beta1.EntityTypes.ListEntityTypes]. message ListEntityTypesRequest { diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto new file mode 100644 index 000000000000..59408aae241a --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/example.proto @@ -0,0 +1,389 @@ +// Copyright 2023 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ExampleProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Examples][google.cloud.dialogflow.cx.v3beta1.Example]. +service Examples { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates an example in the specified playbook. + rpc CreateExample(CreateExampleRequest) returns (Example) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + body: "example" + }; + option (google.api.method_signature) = "parent,example"; + } + + // Deletes the specified example. + rpc DeleteExample(DeleteExampleRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of examples in the specified playbook. + rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*/playbooks/*}/examples" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves the specified example. + rpc GetExample(GetExampleRequest) returns (Example) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified example. + rpc UpdateExample(UpdateExampleRequest) returns (Example) { + option (google.api.http) = { + patch: "/v3beta1/{example.name=projects/*/locations/*/agents/*/playbooks/*/examples/*}" + body: "example" + }; + option (google.api.method_signature) = "example,update_mask"; + } +} + +// The request message for +// [Examples.CreateExample][google.cloud.dialogflow.cx.v3beta1.Examples.CreateExample]. +message CreateExampleRequest { + // Required. The playbook to create an example for. + // Format: `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Required. The example to create. + Example example = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Examples.DeleteExample][google.cloud.dialogflow.cx.v3beta1.Examples.DeleteExample]. +message DeleteExampleRequest { + // Required. The name of the example to delete. + // Format: `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples]. +message ListExamplesRequest { + // Required. The playbook to list the examples from. + // Format: `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Example" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [next_page_token][ListExampleResponse.next_page_token] value + // returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language to list examples for. + // If not specified, the agent's default language is used. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Examples.ListExamples][google.cloud.dialogflow.cx.v3beta1.Examples.ListExamples]. +message ListExamplesResponse { + // The list of examples. There will be a maximum number of items returned + // based on the + // [page_size][google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest.page_size] + // field in the request. + repeated Example examples = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Examples.GetExample][google.cloud.dialogflow.cx.v3beta1.Examples.GetExample]. +message GetExampleRequest { + // Required. The name of the example. + // Format: `projects//locations//agents//playbooks//examples/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Example" + } + ]; +} + +// The request message for +// [Examples.UpdateExample][google.cloud.dialogflow.cx.v3beta1.Examples.UpdateExample]. +message UpdateExampleRequest { + // Required. The example to update. + Example example = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The mask to control which fields get updated. If the mask is not + // present, all fields will be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Example represents a sample execution of the playbook in the conversation. +// +// An example consists of a list of ordered actions performed by end user +// or Dialogflow agent according the playbook instructions to fulfill the task. +message Example { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Example" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/examples/{example}" + plural: "examples" + singular: "example" + }; + + // The unique identifier of the playbook example. + // Format: `projects//locations//agents//playbooks//examples/`. + string name = 1; + + // Optional. The input to the playbook in the example. + PlaybookInput playbook_input = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The output of the playbook in the example. + PlaybookOutput playbook_output = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The ordered list of actions performed by the end user and the + // Dialogflow agent. + repeated Action actions = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The display name of the example. + string display_name = 6 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The high level concise description of the example. The max number + // of characters is 200. + string description = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Estimated number of tokes current example takes when sent to + // the LLM. + int64 token_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial example creation. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the example was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Example's output state. + OutputState conversation_state = 12 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The language code of the example. + // If not specified, the agent's default language is used. + // Note: languages must be enabled in the agent before they can be used. + string language_code = 13 [(google.api.field_behavior) = OPTIONAL]; +} + +// Input of the playbook. +message PlaybookInput { + // Optional. Summary string of the preceding conversation for the child + // playbook invocation. + string preceding_conversation_summary = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of input parameters for the invocation. + repeated ActionParameter parameters = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Output of the playbook. +message PlaybookOutput { + // Optional. Summary string of the execution result of the child playbook. + string execution_summary = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of output parameters for the invocation. + repeated ActionParameter parameters = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Action performed by end user or Dialogflow agent in the conversation. +message Action { + // Action details. + oneof action { + // Optional. Agent obtained a message from the customer. + UserUtterance user_utterance = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed by the agent as a message. + AgentUtterance agent_utterance = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by calling a plugin + // tool. + ToolUse tool_use = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a child + // playbook. + PlaybookInvocation playbook_invocation = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Action performed on behalf of the agent by invoking a CX flow. + FlowInvocation flow_invocation = 5 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// UserUtterance represents one message sent by the customer. +message UserUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// AgentUtterance represents one message sent by the agent. +message AgentUtterance { + // Required. Message content in text. + string text = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of an action supported by a tool. +message ToolUse { + // Required. The [tool][google.cloud.dialogflow.cx.v3beta1.Tool] that should + // be used. Format: `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Optional. Name of the action to be called during the tool use. + string action = 2 [(google.api.field_behavior) = OPTIONAL]; + + // A list of input parameters for the action. + repeated ActionParameter input_parameters = 3; + + // A list of output parameters generated by the action. + repeated ActionParameter output_parameters = 4; +} + +// Parameter associated with action. +message ActionParameter { + // Required. Name of the parameter. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Value of the parameter. + google.protobuf.Value value = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of a child playbook. +// Next Id: 5 +message PlaybookInvocation { + // Required. The unique identifier of the playbook. + // Format: `projects//locations//agents//playbooks/`. + string playbook = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. Input of the child playbook invocation. + PlaybookInput playbook_input = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Output of the child playbook invocation. + PlaybookOutput playbook_output = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Playbook invocation's output state. + OutputState playbook_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Stores metadata of the invocation of a CX flow. +// Next Id: 7 +message FlowInvocation { + // Required. The unique identifier of the flow. + // Format: `projects//locations//agents/`. + string flow = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // A list of input parameters for the flow invocation. + repeated ActionParameter input_parameters = 2; + + // A list of output parameters generated by the flow invocation. + repeated ActionParameter output_parameters = 3; + + // Required. Flow invocation's output state. + OutputState flow_state = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Output state. +enum OutputState { + // Unspecified output. + OUTPUT_STATE_UNSPECIFIED = 0; + + // Succeeded. + OUTPUT_STATE_OK = 1; + + // Cancelled. + OUTPUT_STATE_CANCELLED = 2; + + // Failed. + OUTPUT_STATE_FAILED = 3; + + // Escalated. + OUTPUT_STATE_ESCALATED = 4; + + // Pending. + OUTPUT_STATE_PENDING = 5; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto index 86c60400f42b..e6fc47ffd347 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/generative_settings.proto @@ -83,6 +83,10 @@ message GenerativeSettings { // Agent scope, e.g. "Example company website", "internal Example // company website for employees", "manual of car owner". string agent_scope = 5; + + // Whether to disable fallback to Data Store search results (in case the LLM + // couldn't pick a proper answer). Per default the feature is enabled. + bool disable_data_store_fallback = 8; } // Format: `projects//locations//agents//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Required. The playbook to create. + Playbook playbook = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Playbooks.DeletePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybook]. +message DeletePlaybookRequest { + // Required. The name of the playbook to delete. + // Format: `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks]. +message ListPlaybooksRequest { + // Required. The agent to list playbooks from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Playbooks.ListPlaybooks][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybooks]. +message ListPlaybooksResponse { + // The list of playbooks. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Playbook playbooks = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.GetPlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybook]. +message GetPlaybookRequest { + // Required. The name of the playbook. + // Format: `projects//locations//agents//playbooks/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; +} + +// The request message for +// [Playbooks.UpdatePlaybook][google.cloud.dialogflow.cx.v3beta1.Playbooks.UpdatePlaybook]. +message UpdatePlaybookRequest { + // Required. The playbook to update. + Playbook playbook = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Playbook is the basic building block to instruct the LLM how to execute a +// certain task. +// +// A playbook consists of a goal to accomplish, an optional list of step by step +// instructions (the step instruction may refers to name of the custom or +// default plugin tools to use) to perform the task, +// a list of contextual input data to be passed in at the beginning of the +// invoked, and a list of output parameters to store the playbook result. +message Playbook { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Playbook" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}" + }; + + // Message of single step execution. + message Step { + // Instruction on how to execute current step. + oneof instruction { + // Step instruction in text format. + string text = 1; + } + + // Sub-processing needed to execute the current step. + repeated Step steps = 2; + } + + // The unique identifier of the playbook. + // Format: `projects//locations//agents//playbooks/`. + string name = 1; + + // Required. The human-readable name of the playbook, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the goal the playbook intend to + // accomplish. + string goal = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Defined structured input parameters for this playbook. + repeated google.cloud.dialogflow.cx.v3beta1.ParameterDefinition + input_parameter_definitions = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defined structured output parameters for this playbook. + repeated google.cloud.dialogflow.cx.v3beta1.ParameterDefinition + output_parameter_definitions = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Ordered list of step by step execution instructions to accomplish + // target goal. + repeated Step steps = 4; + + // Output only. Estimated number of tokes current playbook takes when sent to + // the LLM. + int64 token_count = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of initial playbook creation. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The resource name of other playbooks referenced by the current + // playbook in the instructions. + repeated string referenced_playbooks = 11 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Output only. The resource name of flows referenced by the current playbook + // in the instructions. + repeated string referenced_flows = 12 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" } + ]; + + // Optional. The resource name of tools referenced by the current playbook in + // the instructions. If not provided explicitly, they are will + // be implied using the tool being referenced in goal and steps. + repeated string referenced_tools = 13 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // Optional. Llm model settings for the playbook. + LlmModelSettings llm_model_settings = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The request message for +// [Playbooks.CreatePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.CreatePlaybookVersion]. +message CreatePlaybookVersionRequest { + // Required. The playbook to create a version for. + // Format: `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Required. The playbook version to create. + PlaybookVersion playbook_version = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Playbook version is a snapshot of the playbook at certain timestamp. +message PlaybookVersion { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + pattern: "projects/{project}/locations/{location}/agents/{agent}/playbooks/{playbook}/versions/{version}" + plural: "playbookVersions" + singular: "playbookVersion" + }; + + // The unique identifier of the playbook version. + // Format: `projects//locations//agents//playbooks//versions/`. + string name = 1; + + // Optional. The description of the playbook version. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Snapshot of the playbook when the playbook version is created. + Playbook playbook = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Snapshot of the examples belonging to the playbook when the + // playbook version is created. + repeated Example examples = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Last time the playbook version was created or modified. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for +// [Playbooks.GetPlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.GetPlaybookVersion]. +message GetPlaybookVersionRequest { + // Required. The name of the playbook version. + // Format: `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} + +// The request message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsRequest { + // Required. The playbook to list versions for. + // Format: `projects//locations//agents//playbooks/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; + + // Optional. The maximum number of items to return in a single page. By + // default 100 and at most 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous list request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Playbooks.ListPlaybookVersions][google.cloud.dialogflow.cx.v3beta1.Playbooks.ListPlaybookVersions]. +message ListPlaybookVersionsResponse { + // The list of playbook version. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated PlaybookVersion playbook_versions = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Playbooks.DeletePlaybookVersion][google.cloud.dialogflow.cx.v3beta1.Playbooks.DeletePlaybookVersion]. +message DeletePlaybookVersionRequest { + // Required. The name of the playbook version to delete. + // Format: `projects//locations//agents//playbooks//versions/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/PlaybookVersion" + } + ]; +} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto index 04defe37f54e..bdc3f6e2d285 100644 --- a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/session.proto @@ -22,10 +22,14 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto"; +import "google/cloud/dialogflow/cx/v3beta1/example.proto"; +import "google/cloud/dialogflow/cx/v3beta1/flow.proto"; +import "google/cloud/dialogflow/cx/v3beta1/generative_settings.proto"; import "google/cloud/dialogflow/cx/v3beta1/intent.proto"; import "google/cloud/dialogflow/cx/v3beta1/page.proto"; import "google/cloud/dialogflow/cx/v3beta1/response_message.proto"; import "google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto"; +import "google/cloud/dialogflow/cx/v3beta1/tool_call.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; @@ -80,6 +84,23 @@ service Sessions { }; } + // Processes a natural language query and returns structured, actionable data + // as a result through server-side streaming. Server-side streaming allows + // Dialogflow to send [partial + // responses](https://cloud.google.com/dialogflow/cx/docs/concept/fulfillment#partial-response) + // earlier in a single request. + rpc ServerStreamingDetectIntent(DetectIntentRequest) + returns (stream DetectIntentResponse) { + option (google.api.http) = { + post: "/v3beta1/{session=projects/*/locations/*/agents/*/sessions/*}:serverStreamingDetectIntent" + body: "*" + additional_bindings { + post: "/v3beta1/{session=projects/*/locations/*/agents/*/environments/*/sessions/*}:serverStreamingDetectIntent" + body: "*" + } + }; + } + // Processes a natural language query in audio format in a streaming fashion // and returns structured, actionable data as a result. This method is only // available via the gRPC API (not REST). @@ -508,9 +529,9 @@ message StreamingRecognitionResult { // Message contains a (possibly partial) transcript. TRANSCRIPT = 1; - // Event indicates that the server has detected the end of the user's speech - // utterance and expects no additional speech. Therefore, the server will - // not process additional audio (although it may subsequently return + // This event indicates that the server has detected the end of the user's + // speech utterance and expects no additional speech. Therefore, the server + // will not process additional audio (although it may subsequently return // additional results). The client should stop sending additional audio // data, half-close the gRPC connection, and wait for any additional results // until the server closes the gRPC connection. This message is only sent if @@ -666,6 +687,24 @@ message QueryParameters { type: "dialogflow.googleapis.com/Version" }]; + // Optional. Start the session with the specified + // [playbook][google.cloud.dialogflow.cx.v3beta1.Playbook]. You can only + // specify the playbook at the beginning of the session. Otherwise, an error + // will be thrown. + // + // Format: `projects//locations//agents//playbooks/`. + string current_playbook = 19 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Playbook" + } + ]; + + // Optional. Use the specified LLM model settings for processing the request. + LlmModelSettings llm_model_settings = 21 + [(google.api.field_behavior) = OPTIONAL]; + // The channel which this query is for. // // If specified, only the @@ -681,7 +720,7 @@ message QueryParameters { // unspecified channel will be returned. string channel = 15; - // Optional. Sets Dialogflow session life time. + // Optional. Configure lifetime of the Dialogflow session. // By default, a Dialogflow session remains active and its data is stored for // 30 minutes after the last request is sent for the session. // This value should be no longer than 1 day. @@ -814,6 +853,8 @@ message FilterSpecs { // 4. An event to be triggered. // // 5. DTMF digits to invoke an intent and fill in parameter value. +// +// 6. The results of a tool executed by the client. message QueryInput { // Required. The input specification. oneof input { @@ -831,6 +872,9 @@ message QueryInput { // The DTMF event to be handled. DtmfInput dtmf = 7; + + // The results of a tool executed by the client. + google.cloud.dialogflow.cx.v3beta1.ToolCallResult tool_call_result = 11; } // Required. The language of the input. See [Language @@ -840,6 +884,19 @@ message QueryInput { string language_code = 4 [(google.api.field_behavior) = REQUIRED]; } +// Represents the information of a query if handled by generative agent +// resources. +message GenerativeInfo { + // The stack of [playbooks][google.cloud.dialogflow.cx.v3beta1.Playbook] that + // the conversation has currently entered, with the most recent one on the + // top. + repeated string current_playbooks = 1; + + // The actions performed by the generative playbook for the current agent + // response. + Example action_tracing_info = 2; +} + // Represents the result of a conversational query. message QueryResult { // The original conversational query. @@ -899,6 +956,18 @@ message QueryResult { // to drive complex logic. repeated ResponseMessage response_messages = 4; + // The list of webhook ids in the order of call sequence. + repeated string webhook_ids = 25; + + // The list of webhook display names in the order of call sequence. + repeated string webhook_display_names = 26; + + // The list of webhook latencies in the order of call sequence. + repeated google.protobuf.Duration webhook_latencies = 27; + + // The list of webhook tags in the order of call sequence. + repeated string webhook_tags = 29; + // The list of webhook call status in the order of call sequence. repeated google.rpc.Status webhook_statuses = 13; @@ -913,6 +982,11 @@ message QueryResult { // `display_name`. Page current_page = 7; + // The current [Flow][google.cloud.dialogflow.cx.v3beta1.Flow]. Some, not all + // fields are filled in this message, including but not limited to `name` and + // `display_name`. + Flow current_flow = 31; + // The [Intent][google.cloud.dialogflow.cx.v3beta1.Intent] that matched the // conversational query. Some, not all fields are filled in this message, // including but not limited to: `name` and `display_name`. This field is @@ -954,6 +1028,9 @@ message QueryResult { // input, but had a lower confidence score. google.protobuf.Struct diagnostic_info = 10; + // The information of a query if handled by generative agent resources. + GenerativeInfo generative_info = 33; + // The sentiment analyss result, which depends on // [`analyze_query_text_sentiment`] // [google.cloud.dialogflow.cx.v3beta1.QueryParameters.analyze_query_text_sentiment], @@ -974,8 +1051,7 @@ message QueryResult { // Represents the natural language text to be processed. message TextInput { - // Required. The UTF-8 encoded natural language text to be processed. Text - // length must not exceed 256 characters. + // Required. The UTF-8 encoded natural language text to be processed. string text = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto new file mode 100644 index 000000000000..ab74d54b1935 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool.proto @@ -0,0 +1,486 @@ +// Copyright 2023 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto"; +import "google/cloud/dialogflow/cx/v3beta1/inline.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; + +// Service for managing [Tools][google.cloud.dialogflow.cx.v3beta1.Tool]. +service Tools { + option (google.api.default_host) = "dialogflow.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/dialogflow"; + + // Creates a [Tool][google.cloud.dialogflow.cx.v3beta1.Tool] in the specified + // agent. + rpc CreateTool(CreateToolRequest) returns (Tool) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools" + body: "tool" + }; + option (google.api.method_signature) = "parent,tool"; + } + + // Returns a list of [Tools][google.cloud.dialogflow.cx.v3beta1.Tool] in the + // specified agent. + rpc ListTools(ListToolsRequest) returns (ListToolsResponse) { + option (google.api.http) = { + get: "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools" + }; + option (google.api.method_signature) = "parent"; + } + + // Exports the selected tools. + rpc ExportTools(ExportToolsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v3beta1/{parent=projects/*/locations/*/agents/*}/tools:export" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "ExportToolsResponse" + metadata_type: "ExportToolsMetadata" + }; + } + + // Retrieves the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + rpc GetTool(GetToolRequest) returns (Tool) { + option (google.api.http) = { + get: "/v3beta1/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Update the specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + rpc UpdateTool(UpdateToolRequest) returns (Tool) { + option (google.api.http) = { + patch: "/v3beta1/{tool.name=projects/*/locations/*/agents/*/tools/*}" + body: "tool" + }; + option (google.api.method_signature) = "tool,update_mask"; + } + + // Deletes a specified [Tool][google.cloud.dialogflow.cx.v3beta1.Tool]. + rpc DeleteTool(DeleteToolRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v3beta1/{name=projects/*/locations/*/agents/*/tools/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// The request message for +// [Tools.CreateTool][google.cloud.dialogflow.cx.v3beta1.Tools.CreateTool]. +message CreateToolRequest { + // Required. The agent to create a Tool for. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // Required. The Tool to be created. + Tool tool = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// The request message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools]. +message ListToolsRequest { + // Required. The agent to list the Tools from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // The maximum number of items to return in a single page. By default 100 and + // at most 1000. + int32 page_size = 2; + + // The next_page_token value returned from a previous list request. + string page_token = 3; +} + +// The response message for +// [Tools.ListTools][google.cloud.dialogflow.cx.v3beta1.Tools.ListTools]. +message ListToolsResponse { + // The list of Tools. There will be a maximum number of items returned + // based on the page_size field in the request. + repeated Tool tools = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; +} + +// The request message for +// [Tools.GetTool][google.cloud.dialogflow.cx.v3beta1.Tools.GetTool]. +message GetToolRequest { + // Required. The name of the Tool. + // Format: `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; +} + +// The request message for +// [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools]. +message ExportToolsRequest { + // Data format of the exported tools. + enum DataFormat { + // Unspecified format. Treated as `BLOB`. + DATA_FORMAT_UNSPECIFIED = 0; + + // Tools will be exported as raw bytes. + BLOB = 1; + + // Tools will be exported in JSON format. + JSON = 2; + } + + // Required. The agent to export tools from. + // Format: `projects//locations//agents/`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Tool" + } + ]; + + // Required. The name of the tools to export. + // Format: `projects//locations//agents//tools/`. + repeated string tools = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // The destination to export. + oneof destination { + // Optional. The [Google Cloud + // Storage](https://cloud.google.com/storage/docs/) URI to export the tools + // to. The format of this URI must be `gs:///`. + // + // Dialogflow performs a write operation for the Cloud Storage object + // on the caller's behalf, so your request authentication must + // have write permissions for the object. For more information, see + // [Dialogflow access + // control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage). + string tools_uri = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The option to return the serialized tools inline. + bool tools_content_inline = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The data format of the exported tools. If not specified, `BLOB` + // is assumed. + DataFormat data_format = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The response message for +// [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools]. +message ExportToolsResponse { + // The exported tools. + oneof tools { + // The URI to a file containing the exported tools. This field is + // populated only if `tools_uri` is specified in + // [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest]. + string tools_uri = 1; + + // Uncompressed byte content for tools. This field is populated only if + // `tools_content_inline` is set to true in + // [ExportToolsRequest][google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest]. + InlineDestination tools_content = 2; + } +} + +// The request message for +// [Tools.UpdateTool][google.cloud.dialogflow.cx.v3beta1.Tools.UpdateTool]. +message UpdateToolRequest { + // Required. The Tool to be updated. + Tool tool = 1 [(google.api.field_behavior) = REQUIRED]; + + // The mask to control which fields get updated. If the mask is not present, + // all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// The request message for +// [Tools.DeleteTool][google.cloud.dialogflow.cx.v3beta1.Tools.DeleteTool]. +message DeleteToolRequest { + // Required. The name of the Tool to be deleted. + // Format: `projects//locations//agents//tools/`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + + // This field has no effect for Tools not being used. + // For Tools that are used: + // + // * If `force` is set to false, an error will be returned with message + // indicating the referenced resources. + // * If `force` is set to true, Dialogflow will remove the tool, as well + // as any references to the tool. + bool force = 2; +} + +// A tool provides a list of actions which are available to the +// [Playbook][google.cloud.dialogflow.cx.v3beta1.Playbook] to attain its goal. A +// Tool consists of a description of the tool's usage and a specification of the +// tool which contains the schema and authentication information. +message Tool { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Tool" + pattern: "projects/{project}/locations/{location}/agents/{agent}/tools/{tool}" + }; + + // An OpenAPI tool is a way to provide the Tool specifications in the Open API + // schema format. + message OpenApiTool { + // Schema representation. + oneof schema { + // Required. The OpenAPI schema specified as a text. + string text_schema = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. Authentication information required by the API. + Authentication authentication = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. TLS configuration for the HTTPS verification. + TLSConfig tls_config = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // A DataStoreTool is a way to provide specifications needed to search a + // list of data stores. + message DataStoreTool { + // A FallbackPrompt is a way to provide specifications for the Data Store + // fallback prompt when generating responses. + message FallbackPrompt {} + + // Required. List of data stores to search. + repeated DataStoreConnection data_store_connections = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Fallback prompt configurations to use. + FallbackPrompt fallback_prompt = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // An ExtensionTool is a way to use Vertex Extensions as a tool. + message ExtensionTool { + // Required. The full name of the referenced vertex extension. + // Formats: + // `projects/{project}/locations/{location}/extensions/{extension}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A Function tool describes the functions to be invoked on the client side. + message FunctionTool { + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the input of + // the function. This input is a JSON object that contains the function's + // parameters as properties of the object. + google.protobuf.Struct input_schema = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The JSON schema is encapsulated in a + // [google.protobuf.Struct][google.protobuf.Struct] to describe the output + // of the function. This output is a JSON object that contains the + // function's parameters as properties of the object. + google.protobuf.Struct output_schema = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Authentication information required for API calls + message Authentication { + // Config for authentication with API key. + message ApiKeyConfig { + // Required. The parameter name or the header name of the API key. + // E.g., If the API request is "https://example.com/act?X-Api-Key=", "X-Api-Key" would be the parameter name. + string key_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The API key. + string api_key = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Key location in the request. + RequestLocation request_location = 3 + [(google.api.field_behavior) = REQUIRED]; + } + + // The location of the API key in the request. + enum RequestLocation { + // Default value. This value is unused. + REQUEST_LOCATION_UNSPECIFIED = 0; + + // Represents the key in http header. + HEADER = 1; + + // Represents the key in query string. + QUERY_STRING = 2; + } + + // Config for authentication with OAuth. + message OAuthConfig { + // OAuth grant types. Only [client credential + // grant](https://oauth.net/2/grant-types/client-credentials) is + // supported. + enum OauthGrantType { + // Default value. This value is unused. + OAUTH_GRANT_TYPE_UNSPECIFIED = 0; + + // Represents the [client credential + // flow](https://oauth.net/2/grant-types/client-credentials). + CLIENT_CREDENTIAL = 1; + } + + // Required. OAuth grant types. + OauthGrantType oauth_grant_type = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The client ID from the OAuth provider. + string client_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The client secret from the OAuth provider. + string client_secret = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The token endpoint in the OAuth provider to exchange for an + // access token. + string token_endpoint = 4 [(google.api.field_behavior) = REQUIRED]; + } + + // Config for auth using [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). + message ServiceAgentAuthConfig {} + + // The auth configuration. + oneof auth_config { + // Config for API key auth. + ApiKeyConfig api_key_config = 1; + + // Config for OAuth. + OAuthConfig oauth_config = 2; + + // Config for [Diglogflow service + // agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) + // auth. + ServiceAgentAuthConfig service_agent_auth_config = 3; + } + } + + // The TLS configuration. + message TLSConfig { + // The CA certificate. + message CACert { + // Required. The name of the allowed custom CA certificates. This + // can be used to disambiguate the custom CA certificates. + string display_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The allowed custom CA certificates (in DER format) for + // HTTPS verification. This overrides the default SSL trust store. If this + // is empty or unspecified, Dialogflow will use Google's default trust + // store to verify certificates. N.B. Make sure the HTTPS server + // certificates are signed with "subject alt name". For instance a + // certificate can be self-signed using the following command, + // openssl x509 -req -days 200 -in example.com.csr \ + // -signkey example.com.key \ + // -out example.com.crt \ + // -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") + bytes cert = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Specifies a list of allowed custom CA certificates for HTTPS + // verification. + repeated CACert ca_certs = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Represents the type of the tool. + enum ToolType { + // Default value. This value is unused. + TOOL_TYPE_UNSPECIFIED = 0; + + // Customer provided tool. + CUSTOMIZED_TOOL = 1; + + // First party built-in tool created by Dialogflow which cannot be modified. + BUILTIN_TOOL = 2; + } + + // The unique identifier of the Tool. + // Format: `projects//locations//agents//tools/`. + string name = 1; + + // Required. The human-readable name of the Tool, unique within an agent. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. High level description of the Tool and its usage. + string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // The list of derived action names for the tool. + repeated string actions = 6 [deprecated = true]; + + // The list of derived type schemas for the tool. + repeated string schemas = 7 [deprecated = true]; + + // Specification of the Tool. + oneof specification { + // OpenAPI specification of the Tool. + OpenApiTool open_api_spec = 4; + + // Data store search tool specification. + DataStoreTool data_store_spec = 8; + + // Vertex extension tool specification. + ExtensionTool extension_spec = 11; + + // Client side executed function specification. + FunctionTool function_spec = 13; + } + + // Output only. The tool type. + ToolType tool_type = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Metadata returned for the +// [Tools.ExportTools][google.cloud.dialogflow.cx.v3beta1.Tools.ExportTools] +// long running operation. +message ExportToolsMetadata {} diff --git a/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto new file mode 100644 index 000000000000..f636a806dac4 --- /dev/null +++ b/java-dialogflow-cx/proto-google-cloud-dialogflow-cx-v3beta1/src/main/proto/google/cloud/dialogflow/cx/v3beta1/tool_call.proto @@ -0,0 +1,57 @@ +// Copyright 2023 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.dialogflow.cx.v3beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1"; +option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb"; +option java_multiple_files = true; +option java_outer_classname = "ToolCallProto"; +option java_package = "com.google.cloud.dialogflow.cx.v3beta1"; +option objc_class_prefix = "DF"; +option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1"; + +// The result of calling a tool's action that has been executed by the client. +message ToolCallResult { + // The [tool][Tool] associated with this call. + // Format: `projects//locations//agents//tools/`. + string tool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dialogflow.googleapis.com/Tool" } + ]; + // The name of the tool's action associated with this call. + string action = 2 [(google.api.field_behavior) = REQUIRED]; + // An error produced by the tool call. + message Error { + // The error message of the function. + string message = 1 [(google.api.field_behavior) = OPTIONAL]; + } + // The tool call's result. + oneof result { + // The tool call's error. + Error error = 3; + // The tool call's output parameters. + google.protobuf.Struct output_parameters = 4; + } +} diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypes.java new file mode 100644 index 000000000000..07ee9eb0ab32 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ExportEntityTypes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncExportEntityTypes { + + public static void main(String[] args) throws Exception { + asyncExportEntityTypes(); + } + + public static void asyncExportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = + entityTypesClient.exportEntityTypesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ExportEntityTypes_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java new file mode 100644 index 000000000000..efb80fb6d51d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ExportEntityTypes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; +import java.util.ArrayList; + +public class AsyncExportEntityTypesLRO { + + public static void main(String[] args) throws Exception { + asyncExportEntityTypesLRO(); + } + + public static void asyncExportEntityTypesLRO() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + OperationFuture future = + entityTypesClient.exportEntityTypesOperationCallable().futureCall(request); + // Do something. + ExportEntityTypesResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ExportEntityTypes_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/SyncExportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/SyncExportEntityTypes.java new file mode 100644 index 000000000000..b42f9a53b5ff --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/exportentitytypes/SyncExportEntityTypes.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ExportEntityTypes_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ExportEntityTypesResponse; +import java.util.ArrayList; + +public class SyncExportEntityTypes { + + public static void main(String[] args) throws Exception { + syncExportEntityTypes(); + } + + public static void syncExportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + ExportEntityTypesResponse response = entityTypesClient.exportEntityTypesAsync(request).get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ExportEntityTypes_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypes.java new file mode 100644 index 000000000000..b0427f307a25 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ImportEntityTypes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.longrunning.Operation; + +public class AsyncImportEntityTypes { + + public static void main(String[] args) throws Exception { + asyncImportEntityTypes(); + } + + public static void asyncImportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + ApiFuture future = + entityTypesClient.importEntityTypesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ImportEntityTypes_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java new file mode 100644 index 000000000000..78e4db827d29 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ImportEntityTypes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; + +public class AsyncImportEntityTypesLRO { + + public static void main(String[] args) throws Exception { + asyncImportEntityTypesLRO(); + } + + public static void asyncImportEntityTypesLRO() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + OperationFuture future = + entityTypesClient.importEntityTypesOperationCallable().futureCall(request); + // Do something. + ImportEntityTypesResponse response = future.get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ImportEntityTypes_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/SyncImportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/SyncImportEntityTypes.java new file mode 100644 index 000000000000..32ec9d1cf5a8 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/entitytypes/importentitytypes/SyncImportEntityTypes.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_EntityTypes_ImportEntityTypes_sync] +import com.google.cloud.dialogflow.cx.v3.AgentName; +import com.google.cloud.dialogflow.cx.v3.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3.ImportEntityTypesResponse; + +public class SyncImportEntityTypes { + + public static void main(String[] args) throws Exception { + syncImportEntityTypes(); + } + + public static void syncImportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + ImportEntityTypesResponse response = entityTypesClient.importEntityTypesAsync(request).get(); + } + } +} +// [END dialogflow_v3_generated_EntityTypes_ImportEntityTypes_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java new file mode 100644 index 000000000000..405e06cb7b9e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3.samples; + +// [START dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.dialogflow.cx.v3.DetectIntentRequest; +import com.google.cloud.dialogflow.cx.v3.DetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3.OutputAudioConfig; +import com.google.cloud.dialogflow.cx.v3.QueryInput; +import com.google.cloud.dialogflow.cx.v3.QueryParameters; +import com.google.cloud.dialogflow.cx.v3.SessionName; +import com.google.cloud.dialogflow.cx.v3.SessionsClient; + +public class AsyncServerStreamingDetectIntent { + + public static void main(String[] args) throws Exception { + asyncServerStreamingDetectIntent(); + } + + public static void asyncServerStreamingDetectIntent() throws Exception { + // 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 (SessionsClient sessionsClient = SessionsClient.create()) { + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + ServerStream stream = + sessionsClient.serverStreamingDetectIntentCallable().call(request); + for (DetectIntentResponse response : stream) { + // Do something when a response is received. + } + } + } +} +// [END dialogflow_v3_generated_Sessions_ServerStreamingDetectIntent_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypes.java new file mode 100644 index 000000000000..5d3de889f1b4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypes.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncExportEntityTypes { + + public static void main(String[] args) throws Exception { + asyncExportEntityTypes(); + } + + public static void asyncExportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = + entityTypesClient.exportEntityTypesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java new file mode 100644 index 000000000000..bc0453d89f43 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/AsyncExportEntityTypesLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; +import java.util.ArrayList; + +public class AsyncExportEntityTypesLRO { + + public static void main(String[] args) throws Exception { + asyncExportEntityTypesLRO(); + } + + public static void asyncExportEntityTypesLRO() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + OperationFuture future = + entityTypesClient.exportEntityTypesOperationCallable().futureCall(request); + // Do something. + ExportEntityTypesResponse response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/SyncExportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/SyncExportEntityTypes.java new file mode 100644 index 000000000000..b6012c0f58b4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/exportentitytypes/SyncExportEntityTypes.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportEntityTypesResponse; +import java.util.ArrayList; + +public class SyncExportEntityTypes { + + public static void main(String[] args) throws Exception { + syncExportEntityTypes(); + } + + public static void syncExportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ExportEntityTypesRequest request = + ExportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllEntityTypes(new ArrayList()) + .setLanguageCode("languageCode-2092349083") + .build(); + ExportEntityTypesResponse response = entityTypesClient.exportEntityTypesAsync(request).get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ExportEntityTypes_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypes.java new file mode 100644 index 000000000000..f23b742d744f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.longrunning.Operation; + +public class AsyncImportEntityTypes { + + public static void main(String[] args) throws Exception { + asyncImportEntityTypes(); + } + + public static void asyncImportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + ApiFuture future = + entityTypesClient.importEntityTypesCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java new file mode 100644 index 000000000000..85c486274007 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/AsyncImportEntityTypesLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; + +public class AsyncImportEntityTypesLRO { + + public static void main(String[] args) throws Exception { + asyncImportEntityTypesLRO(); + } + + public static void asyncImportEntityTypesLRO() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + OperationFuture future = + entityTypesClient.importEntityTypesOperationCallable().futureCall(request); + // Do something. + ImportEntityTypesResponse response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/SyncImportEntityTypes.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/SyncImportEntityTypes.java new file mode 100644 index 000000000000..b1d55f1e7c6f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/entitytypes/importentitytypes/SyncImportEntityTypes.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypeName; +import com.google.cloud.dialogflow.cx.v3beta1.EntityTypesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ImportEntityTypesResponse; + +public class SyncImportEntityTypes { + + public static void main(String[] args) throws Exception { + syncImportEntityTypes(); + } + + public static void syncImportEntityTypes() throws Exception { + // 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 (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { + ImportEntityTypesRequest request = + ImportEntityTypesRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTargetEntityType( + EntityTypeName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENTITY_TYPE]") + .toString()) + .build(); + ImportEntityTypesResponse response = entityTypesClient.importEntityTypesAsync(request).get(); + } + } +} +// [END dialogflow_v3beta1_generated_EntityTypes_ImportEntityTypes_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..58d9384da0f8 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + ExamplesSettings examplesSettings = + ExamplesSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3beta1_generated_Examples_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider1.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..854ca67f1933 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_Create_SetCredentialsProvider1_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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 + ExamplesSettings examplesSettings = ExamplesSettings.newHttpJsonBuilder().build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3beta1_generated_Examples_Create_SetCredentialsProvider1_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..eb67513949a7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + ExamplesSettings examplesSettings = + ExamplesSettings.newBuilder().setEndpoint(myEndpoint).build(); + ExamplesClient examplesClient = ExamplesClient.create(examplesSettings); + } +} +// [END dialogflow_v3beta1_generated_Examples_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/AsyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/AsyncCreateExample.java new file mode 100644 index 000000000000..eaae73e2a804 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/AsyncCreateExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_CreateExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class AsyncCreateExample { + + public static void main(String[] args) throws Exception { + asyncCreateExample(); + } + + public static void asyncCreateExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setExample(Example.newBuilder().build()) + .build(); + ApiFuture future = examplesClient.createExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_CreateExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..9bd04eac2b31 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.CreateExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + CreateExampleRequest request = + CreateExampleRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setExample(Example.newBuilder().build()) + .build(); + Example response = examplesClient.createExample(request); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExamplePlaybooknameExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExamplePlaybooknameExample.java new file mode 100644 index 000000000000..44e3932f606d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExamplePlaybooknameExample.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_CreateExample_PlaybooknameExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncCreateExamplePlaybooknameExample { + + public static void main(String[] args) throws Exception { + syncCreateExamplePlaybooknameExample(); + } + + public static void syncCreateExamplePlaybooknameExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Example example = Example.newBuilder().build(); + Example response = examplesClient.createExample(parent, example); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_CreateExample_PlaybooknameExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExampleStringExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExampleStringExample.java new file mode 100644 index 000000000000..05f9d737c207 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/createexample/SyncCreateExampleStringExample.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_CreateExample_StringExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncCreateExampleStringExample { + + public static void main(String[] args) throws Exception { + syncCreateExampleStringExample(); + } + + public static void syncCreateExampleStringExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + Example example = Example.newBuilder().build(); + Example response = examplesClient.createExample(parent, example); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_CreateExample_StringExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/AsyncDeleteExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/AsyncDeleteExample.java new file mode 100644 index 000000000000..8dc4ae0882d2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/AsyncDeleteExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_DeleteExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteExample { + + public static void main(String[] args) throws Exception { + asyncDeleteExample(); + } + + public static void asyncDeleteExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + ApiFuture future = examplesClient.deleteExampleCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_DeleteExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExample.java new file mode 100644 index 000000000000..97925fa49588 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_DeleteExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.DeleteExampleRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExample { + + public static void main(String[] args) throws Exception { + syncDeleteExample(); + } + + public static void syncDeleteExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + DeleteExampleRequest request = + DeleteExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + examplesClient.deleteExample(request); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_DeleteExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleExamplename.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleExamplename.java new file mode 100644 index 000000000000..9d62f95580eb --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleExamplename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_DeleteExample_Examplename_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExampleExamplename { + + public static void main(String[] args) throws Exception { + syncDeleteExampleExamplename(); + } + + public static void syncDeleteExampleExamplename() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + examplesClient.deleteExample(name); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_DeleteExample_Examplename_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleString.java new file mode 100644 index 000000000000..e5c08b0696a1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/deleteexample/SyncDeleteExampleString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_DeleteExample_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.protobuf.Empty; + +public class SyncDeleteExampleString { + + public static void main(String[] args) throws Exception { + syncDeleteExampleString(); + } + + public static void syncDeleteExampleString() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString(); + examplesClient.deleteExample(name); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_DeleteExample_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/AsyncGetExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/AsyncGetExample.java new file mode 100644 index 000000000000..47ce128a0778 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/AsyncGetExample.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; + +public class AsyncGetExample { + + public static void main(String[] args) throws Exception { + asyncGetExample(); + } + + public static void asyncGetExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetExampleRequest request = + GetExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + ApiFuture future = examplesClient.getExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExample.java new file mode 100644 index 000000000000..02739cada773 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.GetExampleRequest; + +public class SyncGetExample { + + public static void main(String[] args) throws Exception { + syncGetExample(); + } + + public static void syncGetExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetExampleRequest request = + GetExampleRequest.newBuilder() + .setName( + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString()) + .build(); + Example response = examplesClient.getExample(request); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleExamplename.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleExamplename.java new file mode 100644 index 000000000000..ca567ba1a593 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleExamplename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetExample_Examplename_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; + +public class SyncGetExampleExamplename { + + public static void main(String[] args) throws Exception { + syncGetExampleExamplename(); + } + + public static void syncGetExampleExamplename() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ExampleName name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]"); + Example response = examplesClient.getExample(name); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetExample_Examplename_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleString.java new file mode 100644 index 000000000000..805344fac985 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getexample/SyncGetExampleString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetExample_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExampleName; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; + +public class SyncGetExampleString { + + public static void main(String[] args) throws Exception { + syncGetExampleString(); + } + + public static void syncGetExampleString() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String name = + ExampleName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[EXAMPLE]") + .toString(); + Example response = examplesClient.getExample(name); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetExample_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..495dc9da2b1f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = examplesClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..83c2867fee37 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = examplesClient.getLocation(request); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamples.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamples.java new file mode 100644 index 000000000000..2973973ed0f9 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamples.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListExamples_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class AsyncListExamples { + + public static void main(String[] args) throws Exception { + asyncListExamples(); + } + + public static void asyncListExamples() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + ApiFuture future = examplesClient.listExamplesPagedCallable().futureCall(request); + // Do something. + for (Example element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListExamples_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamplesPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamplesPaged.java new file mode 100644 index 000000000000..fe55bef2402c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/AsyncListExamplesPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListExamples_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesResponse; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.common.base.Strings; + +public class AsyncListExamplesPaged { + + public static void main(String[] args) throws Exception { + asyncListExamplesPaged(); + } + + public static void asyncListExamplesPaged() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + while (true) { + ListExamplesResponse response = examplesClient.listExamplesCallable().call(request); + for (Example element : response.getExamplesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListExamples_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamples.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamples.java new file mode 100644 index 000000000000..64ba58fbf56d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamples.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListExamples_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.ListExamplesRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncListExamples { + + public static void main(String[] args) throws Exception { + syncListExamples(); + } + + public static void syncListExamples() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListExamplesRequest request = + ListExamplesRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + for (Example element : examplesClient.listExamples(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListExamples_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesPlaybookname.java new file mode 100644 index 000000000000..53491eae1e22 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesPlaybookname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListExamples_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncListExamplesPlaybookname { + + public static void main(String[] args) throws Exception { + syncListExamplesPlaybookname(); + } + + public static void syncListExamplesPlaybookname() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + for (Example element : examplesClient.listExamples(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListExamples_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesString.java new file mode 100644 index 000000000000..898c0660936b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listexamples/SyncListExamplesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListExamples_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; + +public class SyncListExamplesString { + + public static void main(String[] args) throws Exception { + syncListExamplesString(); + } + + public static void syncListExamplesString() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + for (Example element : examplesClient.listExamples(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListExamples_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..f44feaeb78eb --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = examplesClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..3903270a94c1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = examplesClient.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; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..6a9dd3dc9064 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : examplesClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Examples_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/AsyncUpdateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/AsyncUpdateExample.java new file mode 100644 index 000000000000..5dc17d49a8d7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/AsyncUpdateExample.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_UpdateExample_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateExample { + + public static void main(String[] args) throws Exception { + asyncUpdateExample(); + } + + public static void asyncUpdateExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder() + .setExample(Example.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = examplesClient.updateExampleCallable().futureCall(request); + // Do something. + Example response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_UpdateExample_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExample.java new file mode 100644 index 000000000000..9d999cda41e6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExample.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_UpdateExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateExampleRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateExample { + + public static void main(String[] args) throws Exception { + syncUpdateExample(); + } + + public static void syncUpdateExample() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + UpdateExampleRequest request = + UpdateExampleRequest.newBuilder() + .setExample(Example.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Example response = examplesClient.updateExample(request); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_UpdateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExampleExampleFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExampleExampleFieldmask.java new file mode 100644 index 000000000000..88e5bfd92925 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examples/updateexample/SyncUpdateExampleExampleFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Examples_UpdateExample_ExampleFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Example; +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateExampleExampleFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateExampleExampleFieldmask(); + } + + public static void syncUpdateExampleExampleFieldmask() throws Exception { + // 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 (ExamplesClient examplesClient = ExamplesClient.create()) { + Example example = Example.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Example response = examplesClient.updateExample(example, updateMask); + } + } +} +// [END dialogflow_v3beta1_generated_Examples_UpdateExample_ExampleFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examplessettings/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examplessettings/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..257eb2a58949 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/examplessettings/createexample/SyncCreateExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_ExamplesSettings_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ExamplesSettings; +import java.time.Duration; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() throws Exception { + // 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 + ExamplesSettings.Builder examplesSettingsBuilder = ExamplesSettings.newBuilder(); + examplesSettingsBuilder + .createExampleSettings() + .setRetrySettings( + examplesSettingsBuilder + .createExampleSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ExamplesSettings examplesSettings = examplesSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_ExamplesSettings_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..0af7966599c1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + PlaybooksSettings playbooksSettings = + PlaybooksSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3beta1_generated_Playbooks_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider1.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..e5d6257a58ab --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_Create_SetCredentialsProvider1_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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 + PlaybooksSettings playbooksSettings = PlaybooksSettings.newHttpJsonBuilder().build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3beta1_generated_Playbooks_Create_SetCredentialsProvider1_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..d3a4ca0135f7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/create/SyncCreateSetEndpoint.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + PlaybooksSettings playbooksSettings = + PlaybooksSettings.newBuilder().setEndpoint(myEndpoint).build(); + PlaybooksClient playbooksClient = PlaybooksClient.create(playbooksSettings); + } +} +// [END dialogflow_v3beta1_generated_Playbooks_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/AsyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/AsyncCreatePlaybook.java new file mode 100644 index 000000000000..044d97b29be3 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/AsyncCreatePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + asyncCreatePlaybook(); + } + + public static void asyncCreatePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPlaybook(Playbook.newBuilder().build()) + .build(); + ApiFuture future = playbooksClient.createPlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..7b01d09858ee --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookRequest request = + CreatePlaybookRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPlaybook(Playbook.newBuilder().build()) + .build(); + Playbook response = playbooksClient.createPlaybook(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java new file mode 100644 index 000000000000..df4646443b6e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookAgentnamePlaybook.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_AgentnamePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybookAgentnamePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookAgentnamePlaybook(); + } + + public static void syncCreatePlaybookAgentnamePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Playbook playbook = Playbook.newBuilder().build(); + Playbook response = playbooksClient.createPlaybook(parent, playbook); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_AgentnamePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java new file mode 100644 index 000000000000..06c6ffb603b1 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybook/SyncCreatePlaybookStringPlaybook.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_StringPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybookStringPlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookStringPlaybook(); + } + + public static void syncCreatePlaybookStringPlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + Playbook playbook = Playbook.newBuilder().build(); + Playbook response = playbooksClient.createPlaybook(parent, playbook); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybook_StringPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java new file mode 100644 index 000000000000..466217d8082f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/AsyncCreatePlaybookVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncCreatePlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncCreatePlaybookVersion(); + } + + public static void asyncCreatePlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookVersion(PlaybookVersion.newBuilder().build()) + .build(); + ApiFuture future = + playbooksClient.createPlaybookVersionCallable().futureCall(request); + // Do something. + PlaybookVersion response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java new file mode 100644 index 000000000000..7d7ebb1e6132 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersion.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3beta1.CreatePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybookVersion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersion(); + } + + public static void syncCreatePlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + CreatePlaybookVersionRequest request = + CreatePlaybookVersionRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPlaybookVersion(PlaybookVersion.newBuilder().build()) + .build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java new file mode 100644 index 000000000000..5336133688f6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionPlaybooknamePlaybookversion.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_PlaybooknamePlaybookversion_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybookVersionPlaybooknamePlaybookversion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersionPlaybooknamePlaybookversion(); + } + + public static void syncCreatePlaybookVersionPlaybooknamePlaybookversion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_PlaybooknamePlaybookversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java new file mode 100644 index 000000000000..35b3d265be2d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/createplaybookversion/SyncCreatePlaybookVersionStringPlaybookversion.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_StringPlaybookversion_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncCreatePlaybookVersionStringPlaybookversion { + + public static void main(String[] args) throws Exception { + syncCreatePlaybookVersionStringPlaybookversion(); + } + + public static void syncCreatePlaybookVersionStringPlaybookversion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + PlaybookVersion playbookVersion = PlaybookVersion.newBuilder().build(); + PlaybookVersion response = playbooksClient.createPlaybookVersion(parent, playbookVersion); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_CreatePlaybookVersion_StringPlaybookversion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/AsyncDeletePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/AsyncDeletePlaybook.java new file mode 100644 index 000000000000..d559c547bb47 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/AsyncDeletePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePlaybook { + + public static void main(String[] args) throws Exception { + asyncDeletePlaybook(); + } + + public static void asyncDeletePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + ApiFuture future = playbooksClient.deletePlaybookCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybook.java new file mode 100644 index 000000000000..14e699bcbc0d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybook { + + public static void main(String[] args) throws Exception { + syncDeletePlaybook(); + } + + public static void syncDeletePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookRequest request = + DeletePlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + playbooksClient.deletePlaybook(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java new file mode 100644 index 000000000000..2a6b6d16036e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookPlaybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookPlaybookname { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookPlaybookname(); + } + + public static void syncDeletePlaybookPlaybookname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + playbooksClient.deletePlaybook(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookString.java new file mode 100644 index 000000000000..5eecb207000b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybook/SyncDeletePlaybookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookString { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookString(); + } + + public static void syncDeletePlaybookString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + playbooksClient.deletePlaybook(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybook_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java new file mode 100644 index 000000000000..d7895067c13a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/AsyncDeletePlaybookVersion.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class AsyncDeletePlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncDeletePlaybookVersion(); + } + + public static void asyncDeletePlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = playbooksClient.deletePlaybookVersionCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java new file mode 100644 index 000000000000..03a77ccda7db --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3beta1.DeletePlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersion { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersion(); + } + + public static void syncDeletePlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + DeletePlaybookVersionRequest request = + DeletePlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + playbooksClient.deletePlaybookVersion(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java new file mode 100644 index 000000000000..a78642c8bf7e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionPlaybookversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_Playbookversionname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersionPlaybookversionname { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersionPlaybookversionname(); + } + + public static void syncDeletePlaybookVersionPlaybookversionname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + playbooksClient.deletePlaybookVersion(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_Playbookversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java new file mode 100644 index 000000000000..a73da2466b2c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/deleteplaybookversion/SyncDeletePlaybookVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.Empty; + +public class SyncDeletePlaybookVersionString { + + public static void main(String[] args) throws Exception { + syncDeletePlaybookVersionString(); + } + + public static void syncDeletePlaybookVersionString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString(); + playbooksClient.deletePlaybookVersion(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_DeletePlaybookVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..ed1bc46ce53e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = playbooksClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..bf83bffd3a16 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = playbooksClient.getLocation(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/AsyncGetPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/AsyncGetPlaybook.java new file mode 100644 index 000000000000..4d5efab56743 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/AsyncGetPlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncGetPlaybook { + + public static void main(String[] args) throws Exception { + asyncGetPlaybook(); + } + + public static void asyncGetPlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + ApiFuture future = playbooksClient.getPlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybook.java new file mode 100644 index 000000000000..d340824d2b3b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybook { + + public static void main(String[] args) throws Exception { + syncGetPlaybook(); + } + + public static void syncGetPlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookRequest request = + GetPlaybookRequest.newBuilder() + .setName( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .build(); + Playbook response = playbooksClient.getPlaybook(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java new file mode 100644 index 000000000000..140fb2921d29 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookPlaybookname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybook_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybookPlaybookname { + + public static void main(String[] args) throws Exception { + syncGetPlaybookPlaybookname(); + } + + public static void syncGetPlaybookPlaybookname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + Playbook response = playbooksClient.getPlaybook(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybook_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookString.java new file mode 100644 index 000000000000..648f8a94c404 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybook/SyncGetPlaybookString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybook_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybookString { + + public static void main(String[] args) throws Exception { + syncGetPlaybookString(); + } + + public static void syncGetPlaybookString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + Playbook response = playbooksClient.getPlaybook(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybook_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java new file mode 100644 index 000000000000..09df90a34094 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/AsyncGetPlaybookVersion.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncGetPlaybookVersion { + + public static void main(String[] args) throws Exception { + asyncGetPlaybookVersion(); + } + + public static void asyncGetPlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + ApiFuture future = + playbooksClient.getPlaybookVersionCallable().futureCall(request); + // Do something. + PlaybookVersion response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersion.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersion.java new file mode 100644 index 000000000000..9ac8db8b090e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersion.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_sync] +import com.google.cloud.dialogflow.cx.v3beta1.GetPlaybookVersionRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybookVersion { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersion(); + } + + public static void syncGetPlaybookVersion() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + GetPlaybookVersionRequest request = + GetPlaybookVersionRequest.newBuilder() + .setName( + PlaybookVersionName.of( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString()) + .build(); + PlaybookVersion response = playbooksClient.getPlaybookVersion(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java new file mode 100644 index 000000000000..c9adefc78506 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionPlaybookversionname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_Playbookversionname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybookVersionPlaybookversionname { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersionPlaybookversionname(); + } + + public static void syncGetPlaybookVersionPlaybookversionname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookVersionName name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]"); + PlaybookVersion response = playbooksClient.getPlaybookVersion(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_Playbookversionname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java new file mode 100644 index 000000000000..d6d835185abc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/getplaybookversion/SyncGetPlaybookVersionString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersionName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncGetPlaybookVersionString { + + public static void main(String[] args) throws Exception { + syncGetPlaybookVersionString(); + } + + public static void syncGetPlaybookVersionString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String name = + PlaybookVersionName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]", "[VERSION]") + .toString(); + PlaybookVersion response = playbooksClient.getPlaybookVersion(name); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_GetPlaybookVersion_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..1df38a7d3988 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = playbooksClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..deb76b2b6650 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = playbooksClient.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; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..3306f2819a5f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : playbooksClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooks.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooks.java new file mode 100644 index 000000000000..4bf304bbc0a0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooks.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncListPlaybooks { + + public static void main(String[] args) throws Exception { + asyncListPlaybooks(); + } + + public static void asyncListPlaybooks() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = playbooksClient.listPlaybooksPagedCallable().futureCall(request); + // Do something. + for (Playbook element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooksPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooksPaged.java new file mode 100644 index 000000000000..1a22bd9498d0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/AsyncListPlaybooksPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.common.base.Strings; + +public class AsyncListPlaybooksPaged { + + public static void main(String[] args) throws Exception { + asyncListPlaybooksPaged(); + } + + public static void asyncListPlaybooksPaged() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPlaybooksResponse response = playbooksClient.listPlaybooksCallable().call(request); + for (Playbook element : response.getPlaybooksList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooks.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooks.java new file mode 100644 index 000000000000..dc2a1b404189 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooks.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybooksRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybooks { + + public static void main(String[] args) throws Exception { + syncListPlaybooks(); + } + + public static void syncListPlaybooks() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybooksRequest request = + ListPlaybooksRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Playbook element : playbooksClient.listPlaybooks(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksAgentname.java new file mode 100644 index 000000000000..dd09b0701b65 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksAgentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybooksAgentname { + + public static void main(String[] args) throws Exception { + syncListPlaybooksAgentname(); + } + + public static void syncListPlaybooksAgentname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_Agentname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksString.java new file mode 100644 index 000000000000..3449df85f3e8 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybooks/SyncListPlaybooksString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybooksString { + + public static void main(String[] args) throws Exception { + syncListPlaybooksString(); + } + + public static void syncListPlaybooksString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + for (Playbook element : playbooksClient.listPlaybooks(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybooks_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersions.java new file mode 100644 index 000000000000..6b1d389d67e7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersions.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class AsyncListPlaybookVersions { + + public static void main(String[] args) throws Exception { + asyncListPlaybookVersions(); + } + + public static void asyncListPlaybookVersions() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + playbooksClient.listPlaybookVersionsPagedCallable().futureCall(request); + // Do something. + for (PlaybookVersion element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java new file mode 100644 index 000000000000..0752cec7af1b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/AsyncListPlaybookVersionsPaged.java @@ -0,0 +1,63 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.common.base.Strings; + +public class AsyncListPlaybookVersionsPaged { + + public static void main(String[] args) throws Exception { + asyncListPlaybookVersionsPaged(); + } + + public static void asyncListPlaybookVersionsPaged() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListPlaybookVersionsResponse response = + playbooksClient.listPlaybookVersionsCallable().call(request); + for (PlaybookVersion element : response.getPlaybookVersionsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersions.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersions.java new file mode 100644 index 000000000000..fecaed496bac --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersions.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ListPlaybookVersionsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybookVersions { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersions(); + } + + public static void syncListPlaybookVersions() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + ListPlaybookVersionsRequest request = + ListPlaybookVersionsRequest.newBuilder() + .setParent( + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java new file mode 100644 index 000000000000..1f4318d4c6af --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsPlaybookname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_Playbookname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybookVersionsPlaybookname { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersionsPlaybookname(); + } + + public static void syncListPlaybookVersionsPlaybookname() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + PlaybookName parent = PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]"); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_Playbookname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java new file mode 100644 index 000000000000..59f34fe81fe2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/listplaybookversions/SyncListPlaybookVersionsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookName; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybookVersion; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; + +public class SyncListPlaybookVersionsString { + + public static void main(String[] args) throws Exception { + syncListPlaybookVersionsString(); + } + + public static void syncListPlaybookVersionsString() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + String parent = + PlaybookName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[PLAYBOOK]").toString(); + for (PlaybookVersion element : playbooksClient.listPlaybookVersions(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_ListPlaybookVersions_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/AsyncUpdatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/AsyncUpdatePlaybook.java new file mode 100644 index 000000000000..6f5cd1d43f04 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/AsyncUpdatePlaybook.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdatePlaybook { + + public static void main(String[] args) throws Exception { + asyncUpdatePlaybook(); + } + + public static void asyncUpdatePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = playbooksClient.updatePlaybookCallable().futureCall(request); + // Do something. + Playbook response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybook.java new file mode 100644 index 000000000000..19647bbb6ea6 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybook.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdatePlaybookRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePlaybook { + + public static void main(String[] args) throws Exception { + syncUpdatePlaybook(); + } + + public static void syncUpdatePlaybook() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + UpdatePlaybookRequest request = + UpdatePlaybookRequest.newBuilder() + .setPlaybook(Playbook.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Playbook response = playbooksClient.updatePlaybook(request); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java new file mode 100644 index 000000000000..731ee919df5f --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbooks/updateplaybook/SyncUpdatePlaybookPlaybookFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_PlaybookFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Playbook; +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdatePlaybookPlaybookFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdatePlaybookPlaybookFieldmask(); + } + + public static void syncUpdatePlaybookPlaybookFieldmask() throws Exception { + // 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 (PlaybooksClient playbooksClient = PlaybooksClient.create()) { + Playbook playbook = Playbook.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Playbook response = playbooksClient.updatePlaybook(playbook, updateMask); + } + } +} +// [END dialogflow_v3beta1_generated_Playbooks_UpdatePlaybook_PlaybookFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbookssettings/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbookssettings/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..fb08a6389e81 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/playbookssettings/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_PlaybooksSettings_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.PlaybooksSettings; +import java.time.Duration; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() throws Exception { + // 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 + PlaybooksSettings.Builder playbooksSettingsBuilder = PlaybooksSettings.newBuilder(); + playbooksSettingsBuilder + .createPlaybookSettings() + .setRetrySettings( + playbooksSettingsBuilder + .createPlaybookSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PlaybooksSettings playbooksSettings = playbooksSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_PlaybooksSettings_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java new file mode 100644 index 000000000000..e7210a6907b4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/sessions/serverstreamingdetectintent/AsyncServerStreamingDetectIntent.java @@ -0,0 +1,60 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Sessions_ServerStreamingDetectIntent_async] +import com.google.api.gax.rpc.ServerStream; +import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentRequest; +import com.google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse; +import com.google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig; +import com.google.cloud.dialogflow.cx.v3beta1.QueryInput; +import com.google.cloud.dialogflow.cx.v3beta1.QueryParameters; +import com.google.cloud.dialogflow.cx.v3beta1.SessionName; +import com.google.cloud.dialogflow.cx.v3beta1.SessionsClient; + +public class AsyncServerStreamingDetectIntent { + + public static void main(String[] args) throws Exception { + asyncServerStreamingDetectIntent(); + } + + public static void asyncServerStreamingDetectIntent() throws Exception { + // 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 (SessionsClient sessionsClient = SessionsClient.create()) { + DetectIntentRequest request = + DetectIntentRequest.newBuilder() + .setSession( + SessionName.ofProjectLocationAgentSessionName( + "[PROJECT]", "[LOCATION]", "[AGENT]", "[SESSION]") + .toString()) + .setQueryParams(QueryParameters.newBuilder().build()) + .setQueryInput(QueryInput.newBuilder().build()) + .setOutputAudioConfig(OutputAudioConfig.newBuilder().build()) + .build(); + ServerStream stream = + sessionsClient.serverStreamingDetectIntentCallable().call(request); + for (DetectIntentResponse response : stream) { + // Do something when a response is received. + } + } + } +} +// [END dialogflow_v3beta1_generated_Sessions_ServerStreamingDetectIntent_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/examplesstubsettings/createexample/SyncCreateExample.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/examplesstubsettings/createexample/SyncCreateExample.java new file mode 100644 index 000000000000..1db3aaf4f2e4 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/examplesstubsettings/createexample/SyncCreateExample.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub.samples; + +// [START dialogflow_v3beta1_generated_ExamplesStubSettings_CreateExample_sync] +import com.google.cloud.dialogflow.cx.v3beta1.stub.ExamplesStubSettings; +import java.time.Duration; + +public class SyncCreateExample { + + public static void main(String[] args) throws Exception { + syncCreateExample(); + } + + public static void syncCreateExample() throws Exception { + // 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 + ExamplesStubSettings.Builder examplesSettingsBuilder = ExamplesStubSettings.newBuilder(); + examplesSettingsBuilder + .createExampleSettings() + .setRetrySettings( + examplesSettingsBuilder + .createExampleSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ExamplesStubSettings examplesSettings = examplesSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_ExamplesStubSettings_CreateExample_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java new file mode 100644 index 000000000000..096ea31cdc52 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/playbooksstubsettings/createplaybook/SyncCreatePlaybook.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub.samples; + +// [START dialogflow_v3beta1_generated_PlaybooksStubSettings_CreatePlaybook_sync] +import com.google.cloud.dialogflow.cx.v3beta1.stub.PlaybooksStubSettings; +import java.time.Duration; + +public class SyncCreatePlaybook { + + public static void main(String[] args) throws Exception { + syncCreatePlaybook(); + } + + public static void syncCreatePlaybook() throws Exception { + // 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 + PlaybooksStubSettings.Builder playbooksSettingsBuilder = PlaybooksStubSettings.newBuilder(); + playbooksSettingsBuilder + .createPlaybookSettings() + .setRetrySettings( + playbooksSettingsBuilder + .createPlaybookSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + PlaybooksStubSettings playbooksSettings = playbooksSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_PlaybooksStubSettings_CreatePlaybook_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/toolsstubsettings/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/toolsstubsettings/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..6a31b441b9e2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/stub/toolsstubsettings/createtool/SyncCreateTool.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.stub.samples; + +// [START dialogflow_v3beta1_generated_ToolsStubSettings_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.stub.ToolsStubSettings; +import java.time.Duration; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() throws Exception { + // 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 + ToolsStubSettings.Builder toolsSettingsBuilder = ToolsStubSettings.newBuilder(); + toolsSettingsBuilder + .createToolSettings() + .setRetrySettings( + toolsSettingsBuilder + .createToolSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ToolsStubSettings toolsSettings = toolsSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_ToolsStubSettings_CreateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..675a26c074e7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + ToolsSettings toolsSettings = + ToolsSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3beta1_generated_Tools_Create_SetCredentialsProvider_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider1.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..9f1bb628e1d2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,39 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_Create_SetCredentialsProvider1_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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 + ToolsSettings toolsSettings = ToolsSettings.newHttpJsonBuilder().build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3beta1_generated_Tools_Create_SetCredentialsProvider1_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetEndpoint.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6a6c8635cf91 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/create/SyncCreateSetEndpoint.java @@ -0,0 +1,40 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_Create_SetEndpoint_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsSettings; +import com.google.cloud.dialogflow.cx.v3beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + ToolsSettings toolsSettings = ToolsSettings.newBuilder().setEndpoint(myEndpoint).build(); + ToolsClient toolsClient = ToolsClient.create(toolsSettings); + } +} +// [END dialogflow_v3beta1_generated_Tools_Create_SetEndpoint_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/AsyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/AsyncCreateTool.java new file mode 100644 index 000000000000..d2452c0d38b9 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/AsyncCreateTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_CreateTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class AsyncCreateTool { + + public static void main(String[] args) throws Exception { + asyncCreateTool(); + } + + public static void asyncCreateTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTool(Tool.newBuilder().build()) + .build(); + ApiFuture future = toolsClient.createToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_CreateTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..6f4be21678de --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.CreateToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + CreateToolRequest request = + CreateToolRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setTool(Tool.newBuilder().build()) + .build(); + Tool response = toolsClient.createTool(request); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_CreateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolAgentnameTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolAgentnameTool.java new file mode 100644 index 000000000000..9d645c900eee --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolAgentnameTool.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_CreateTool_AgentnameTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncCreateToolAgentnameTool { + + public static void main(String[] args) throws Exception { + syncCreateToolAgentnameTool(); + } + + public static void syncCreateToolAgentnameTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + Tool tool = Tool.newBuilder().build(); + Tool response = toolsClient.createTool(parent, tool); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_CreateTool_AgentnameTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolStringTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolStringTool.java new file mode 100644 index 000000000000..b63c296cd569 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/createtool/SyncCreateToolStringTool.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_CreateTool_StringTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncCreateToolStringTool { + + public static void main(String[] args) throws Exception { + syncCreateToolStringTool(); + } + + public static void syncCreateToolStringTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + Tool tool = Tool.newBuilder().build(); + Tool response = toolsClient.createTool(parent, tool); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_CreateTool_StringTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/AsyncDeleteTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/AsyncDeleteTool.java new file mode 100644 index 000000000000..da2403bbfcba --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/AsyncDeleteTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_DeleteTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.protobuf.Empty; + +public class AsyncDeleteTool { + + public static void main(String[] args) throws Exception { + asyncDeleteTool(); + } + + public static void asyncDeleteTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setForce(true) + .build(); + ApiFuture future = toolsClient.deleteToolCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_DeleteTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteTool.java new file mode 100644 index 000000000000..f1c007d27327 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_DeleteTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.DeleteToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteTool { + + public static void main(String[] args) throws Exception { + syncDeleteTool(); + } + + public static void syncDeleteTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + DeleteToolRequest request = + DeleteToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .setForce(true) + .build(); + toolsClient.deleteTool(request); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_DeleteTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolString.java new file mode 100644 index 000000000000..f595afa05adc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_DeleteTool_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolString { + + public static void main(String[] args) throws Exception { + syncDeleteToolString(); + } + + public static void syncDeleteToolString() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + toolsClient.deleteTool(name); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_DeleteTool_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolToolname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolToolname.java new file mode 100644 index 000000000000..695ca1831b8a --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/deletetool/SyncDeleteToolToolname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_DeleteTool_Toolname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.protobuf.Empty; + +public class SyncDeleteToolToolname { + + public static void main(String[] args) throws Exception { + syncDeleteToolToolname(); + } + + public static void syncDeleteToolToolname() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + toolsClient.deleteTool(name); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_DeleteTool_Toolname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportTools.java new file mode 100644 index 000000000000..ecaef40525b3 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportTools.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ExportTools_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.longrunning.Operation; +import java.util.ArrayList; + +public class AsyncExportTools { + + public static void main(String[] args) throws Exception { + asyncExportTools(); + } + + public static void asyncExportTools() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + ApiFuture future = toolsClient.exportToolsCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ExportTools_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportToolsLRO.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportToolsLRO.java new file mode 100644 index 000000000000..0ceea175db30 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/AsyncExportToolsLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ExportTools_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsMetadata; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import java.util.ArrayList; + +public class AsyncExportToolsLRO { + + public static void main(String[] args) throws Exception { + asyncExportToolsLRO(); + } + + public static void asyncExportToolsLRO() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + OperationFuture future = + toolsClient.exportToolsOperationCallable().futureCall(request); + // Do something. + ExportToolsResponse response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ExportTools_LRO_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/SyncExportTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/SyncExportTools.java new file mode 100644 index 000000000000..286d123b61fc --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/exporttools/SyncExportTools.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ExportTools_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ExportToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import java.util.ArrayList; + +public class SyncExportTools { + + public static void main(String[] args) throws Exception { + syncExportTools(); + } + + public static void syncExportTools() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ExportToolsRequest request = + ExportToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .addAllTools(new ArrayList()) + .build(); + ExportToolsResponse response = toolsClient.exportToolsAsync(request).get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ExportTools_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/AsyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..e1afa186c073 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/AsyncGetLocation.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = toolsClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetLocation_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/SyncGetLocation.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..6b4e56a2db38 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetLocation_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = toolsClient.getLocation(request); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetLocation_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/AsyncGetTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/AsyncGetTool.java new file mode 100644 index 000000000000..be501f27359e --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/AsyncGetTool.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class AsyncGetTool { + + public static void main(String[] args) throws Exception { + asyncGetTool(); + } + + public static void asyncGetTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolRequest request = + GetToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .build(); + ApiFuture future = toolsClient.getToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetTool.java new file mode 100644 index 000000000000..bd7d9df8a313 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetTool.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.GetToolRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncGetTool { + + public static void main(String[] args) throws Exception { + syncGetTool(); + } + + public static void syncGetTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + GetToolRequest request = + GetToolRequest.newBuilder() + .setName(ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString()) + .build(); + Tool response = toolsClient.getTool(request); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolString.java new file mode 100644 index 000000000000..7fbf98809586 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetTool_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncGetToolString { + + public static void main(String[] args) throws Exception { + syncGetToolString(); + } + + public static void syncGetToolString() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + String name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]").toString(); + Tool response = toolsClient.getTool(name); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetTool_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolToolname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolToolname.java new file mode 100644 index 000000000000..e607645455a7 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/gettool/SyncGetToolToolname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_GetTool_Toolname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolName; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncGetToolToolname { + + public static void main(String[] args) throws Exception { + syncGetToolToolname(); + } + + public static void syncGetToolToolname() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ToolName name = ToolName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[TOOL]"); + Tool response = toolsClient.getTool(name); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_GetTool_Toolname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..f0c2c4563d8d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocations.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = toolsClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListLocations_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocationsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..7f17236b48f0 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListLocations_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = toolsClient.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; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListLocations_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/SyncListLocations.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..081682f71924 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListLocations_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : toolsClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListLocations_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListTools.java new file mode 100644 index 000000000000..0b60a83ae802 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListTools.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListTools_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class AsyncListTools { + + public static void main(String[] args) throws Exception { + asyncListTools(); + } + + public static void asyncListTools() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = toolsClient.listToolsPagedCallable().futureCall(request); + // Do something. + for (Tool element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListTools_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListToolsPaged.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListToolsPaged.java new file mode 100644 index 000000000000..5dd4717fa57c --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/AsyncListToolsPaged.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListTools_Paged_async] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsResponse; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.common.base.Strings; + +public class AsyncListToolsPaged { + + public static void main(String[] args) throws Exception { + asyncListToolsPaged(); + } + + public static void asyncListToolsPaged() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListToolsResponse response = toolsClient.listToolsCallable().call(request); + for (Tool element : response.getToolsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListTools_Paged_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListTools.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListTools.java new file mode 100644 index 000000000000..a0ebf09adb2b --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListTools.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListTools_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.ListToolsRequest; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncListTools { + + public static void main(String[] args) throws Exception { + syncListTools(); + } + + public static void syncListTools() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + ListToolsRequest request = + ListToolsRequest.newBuilder() + .setParent(AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Tool element : toolsClient.listTools(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListTools_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsAgentname.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsAgentname.java new file mode 100644 index 000000000000..3544a93cfcde --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsAgentname.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListTools_Agentname_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncListToolsAgentname { + + public static void main(String[] args) throws Exception { + syncListToolsAgentname(); + } + + public static void syncListToolsAgentname() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]"); + for (Tool element : toolsClient.listTools(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListTools_Agentname_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsString.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsString.java new file mode 100644 index 000000000000..6d50dcf213f2 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/listtools/SyncListToolsString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_ListTools_String_sync] +import com.google.cloud.dialogflow.cx.v3beta1.AgentName; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; + +public class SyncListToolsString { + + public static void main(String[] args) throws Exception { + syncListToolsString(); + } + + public static void syncListToolsString() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + String parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]").toString(); + for (Tool element : toolsClient.listTools(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dialogflow_v3beta1_generated_Tools_ListTools_String_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/AsyncUpdateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/AsyncUpdateTool.java new file mode 100644 index 000000000000..a5328e25136d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/AsyncUpdateTool.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_UpdateTool_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateTool { + + public static void main(String[] args) throws Exception { + asyncUpdateTool(); + } + + public static void asyncUpdateTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder() + .setTool(Tool.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + ApiFuture future = toolsClient.updateToolCallable().futureCall(request); + // Do something. + Tool response = future.get(); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_UpdateTool_async] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateTool.java new file mode 100644 index 000000000000..a955db4d5d6d --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateTool.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_UpdateTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.cloud.dialogflow.cx.v3beta1.UpdateToolRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateTool { + + public static void main(String[] args) throws Exception { + syncUpdateTool(); + } + + public static void syncUpdateTool() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + UpdateToolRequest request = + UpdateToolRequest.newBuilder() + .setTool(Tool.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + Tool response = toolsClient.updateTool(request); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_UpdateTool_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateToolToolFieldmask.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateToolToolFieldmask.java new file mode 100644 index 000000000000..0a00cf4d4568 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/tools/updatetool/SyncUpdateToolToolFieldmask.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_Tools_UpdateTool_ToolFieldmask_sync] +import com.google.cloud.dialogflow.cx.v3beta1.Tool; +import com.google.cloud.dialogflow.cx.v3beta1.ToolsClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateToolToolFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateToolToolFieldmask(); + } + + public static void syncUpdateToolToolFieldmask() throws Exception { + // 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 (ToolsClient toolsClient = ToolsClient.create()) { + Tool tool = Tool.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + Tool response = toolsClient.updateTool(tool, updateMask); + } + } +} +// [END dialogflow_v3beta1_generated_Tools_UpdateTool_ToolFieldmask_sync] diff --git a/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/toolssettings/createtool/SyncCreateTool.java b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/toolssettings/createtool/SyncCreateTool.java new file mode 100644 index 000000000000..ce4b96804874 --- /dev/null +++ b/java-dialogflow-cx/samples/snippets/generated/com/google/cloud/dialogflow/cx/v3beta1/toolssettings/createtool/SyncCreateTool.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.cloud.dialogflow.cx.v3beta1.samples; + +// [START dialogflow_v3beta1_generated_ToolsSettings_CreateTool_sync] +import com.google.cloud.dialogflow.cx.v3beta1.ToolsSettings; +import java.time.Duration; + +public class SyncCreateTool { + + public static void main(String[] args) throws Exception { + syncCreateTool(); + } + + public static void syncCreateTool() throws Exception { + // 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 + ToolsSettings.Builder toolsSettingsBuilder = ToolsSettings.newBuilder(); + toolsSettingsBuilder + .createToolSettings() + .setRetrySettings( + toolsSettingsBuilder + .createToolSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ToolsSettings toolsSettings = toolsSettingsBuilder.build(); + } +} +// [END dialogflow_v3beta1_generated_ToolsSettings_CreateTool_sync]