diff --git a/google-cloud-dialogflow/clirr-ignored-differences.xml b/google-cloud-dialogflow/clirr-ignored-differences.xml new file mode 100644 index 000000000..32e14bca8 --- /dev/null +++ b/google-cloud-dialogflow/clirr-ignored-differences.xml @@ -0,0 +1,22 @@ + + + + + + 7004 + com/google/cloud/dialogflow/v2/ContextsClient + com.google.cloud.dialogflow.v2.Context updateContext(com.google.cloud.dialogflow.v2.Context) + + + 7005 + com/google/cloud/dialogflow/v2/EntityTypesClient + * *EntityType*(com.google.cloud.dialogflow.v2.ProjectAgentName*) + * *EntityType*(com.google.cloud.dialogflow.v2.AgentName*) + + + 7005 + com/google/cloud/dialogflow/v2/IntentsClient + * *Intent*(com.google.cloud.dialogflow.v2.ProjectAgentName*) + * *Intent*(com.google.cloud.dialogflow.v2.AgentName*) + + diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java index 526eeff97..85500ba2f 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java @@ -351,96 +351,6 @@ public final UnaryCallable deleteAgentCallable() { return stub.deleteAgentCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Retrieves the specified agent. - * - *

Sample code: - * - *


-   * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Agent response = agentsClient.getAgent(parent);
-   * }
-   * 
- * - * @param parent Required. The project that the agent to fetch is associated with. Format: - * `projects/<Project ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Agent getAgent(ProjectName parent) { - GetAgentRequest request = - GetAgentRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); - return getAgent(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Retrieves the specified agent. - * - *

Sample code: - * - *


-   * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   Agent response = agentsClient.getAgent(parent.toString());
-   * }
-   * 
- * - * @param parent Required. The project that the agent to fetch is associated with. Format: - * `projects/<Project ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Agent getAgent(String parent) { - GetAgentRequest request = GetAgentRequest.newBuilder().setParent(parent).build(); - return getAgent(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Retrieves the specified agent. - * - *

Sample code: - * - *


-   * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   GetAgentRequest request = GetAgentRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   Agent response = agentsClient.getAgent(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 Agent getAgent(GetAgentRequest request) { - return getAgentCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Retrieves the specified agent. - * - *

Sample code: - * - *


-   * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   GetAgentRequest request = GetAgentRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<Agent> future = agentsClient.getAgentCallable().futureCall(request);
-   *   // Do something
-   *   Agent response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable getAgentCallable() { - return stub.getAgentCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns the list of agents. @@ -796,8 +706,10 @@ public final OperationFuture exportAgentAsync(Strin *

    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String agentUri = "";
    *   ExportAgentRequest request = ExportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
+   *     .setAgentUri(agentUri)
    *     .build();
    *   ExportAgentResponse response = agentsClient.exportAgentAsync(request).get();
    * }
@@ -825,8 +737,10 @@ public final OperationFuture exportAgentAsync(
    * 

    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String agentUri = "";
    *   ExportAgentRequest request = ExportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
+   *     .setAgentUri(agentUri)
    *     .build();
    *   OperationFuture<ExportAgentResponse, Struct> future = agentsClient.exportAgentOperationCallable().futureCall(request);
    *   // Do something
@@ -852,8 +766,10 @@ public final OperationFuture exportAgentAsync(
    * 

    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String agentUri = "";
    *   ExportAgentRequest request = ExportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
+   *     .setAgentUri(agentUri)
    *     .build();
    *   ApiFuture<Operation> future = agentsClient.exportAgentCallable().futureCall(request);
    *   // Do something
@@ -867,10 +783,10 @@ public final UnaryCallable exportAgentCallable()
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Imports the specified agent from a ZIP file.
+   * Restores the specified agent from a ZIP file.
    *
-   * 

Uploads new intents and entity types without deleting the existing ones. Intents and entity - * types with the same name are replaced with the new versions from ImportAgentRequest. + *

Replaces the current agent version with a new one. All the intents and entity types in the + * older version are deleted. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -879,10 +795,10 @@ public final UnaryCallable exportAgentCallable() *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
+   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   agentsClient.importAgentAsync(request).get();
+   *   agentsClient.restoreAgentAsync(request).get();
    * }
    * 
* @@ -891,16 +807,16 @@ public final UnaryCallable exportAgentCallable() */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importAgentAsync(ImportAgentRequest request) { - return importAgentOperationCallable().futureCall(request); + public final OperationFuture restoreAgentAsync(RestoreAgentRequest request) { + return restoreAgentOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports the specified agent from a ZIP file. + * Restores the specified agent from a ZIP file. * - *

Uploads new intents and entity types without deleting the existing ones. Intents and entity - * types with the same name are replaced with the new versions from ImportAgentRequest. + *

Replaces the current agent version with a new one. All the intents and entity types in the + * older version are deleted. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -909,26 +825,27 @@ public final OperationFuture importAgentAsync(ImportAgentRequest *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
+   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   OperationFuture<Empty, Struct> future = agentsClient.importAgentOperationCallable().futureCall(request);
+   *   OperationFuture<Empty, Struct> future = agentsClient.restoreAgentOperationCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable importAgentOperationCallable() { - return stub.importAgentOperationCallable(); + public final OperationCallable + restoreAgentOperationCallable() { + return stub.restoreAgentOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Imports the specified agent from a ZIP file. + * Restores the specified agent from a ZIP file. * - *

Uploads new intents and entity types without deleting the existing ones. Intents and entity - * types with the same name are replaced with the new versions from ImportAgentRequest. + *

Replaces the current agent version with a new one. All the intents and entity types in the + * older version are deleted. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -937,25 +854,115 @@ public final OperationCallable importAgentOpe *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
+   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   ApiFuture<Operation> future = agentsClient.importAgentCallable().futureCall(request);
+   *   ApiFuture<Operation> future = agentsClient.restoreAgentCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ - public final UnaryCallable importAgentCallable() { - return stub.importAgentCallable(); + public final UnaryCallable restoreAgentCallable() { + return stub.restoreAgentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Restores the specified agent from a ZIP file. + * Retrieves the specified agent. * - *

Replaces the current agent version with a new one. All the intents and entity types in the - * older version are deleted. + *

Sample code: + * + *


+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Agent response = agentsClient.getAgent(parent);
+   * }
+   * 
+ * + * @param parent Required. The project that the agent to fetch is associated with. Format: + * `projects/<Project ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Agent getAgent(ProjectName parent) { + GetAgentRequest request = + GetAgentRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return getAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified agent. + * + *

Sample code: + * + *


+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   Agent response = agentsClient.getAgent(parent.toString());
+   * }
+   * 
+ * + * @param parent Required. The project that the agent to fetch is associated with. Format: + * `projects/<Project ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Agent getAgent(String parent) { + GetAgentRequest request = GetAgentRequest.newBuilder().setParent(parent).build(); + return getAgent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified agent. + * + *

Sample code: + * + *


+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   GetAgentRequest request = GetAgentRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   Agent response = agentsClient.getAgent(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 Agent getAgent(GetAgentRequest request) { + return getAgentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves the specified agent. + * + *

Sample code: + * + *


+   * try (AgentsClient agentsClient = AgentsClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   GetAgentRequest request = GetAgentRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<Agent> future = agentsClient.getAgentCallable().futureCall(request);
+   *   // Do something
+   *   Agent response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getAgentCallable() { + return stub.getAgentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports the specified agent from a ZIP file. + * + *

Uploads new intents and entity types without deleting the existing ones. Intents and entity + * types with the same name are replaced with the new versions from ImportAgentRequest. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -964,10 +971,10 @@ public final UnaryCallable importAgentCallable() *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
+   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   agentsClient.restoreAgentAsync(request).get();
+   *   agentsClient.importAgentAsync(request).get();
    * }
    * 
* @@ -976,16 +983,16 @@ public final UnaryCallable importAgentCallable() */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture restoreAgentAsync(RestoreAgentRequest request) { - return restoreAgentOperationCallable().futureCall(request); + public final OperationFuture importAgentAsync(ImportAgentRequest request) { + return importAgentOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Restores the specified agent from a ZIP file. + * Imports the specified agent from a ZIP file. * - *

Replaces the current agent version with a new one. All the intents and entity types in the - * older version are deleted. + *

Uploads new intents and entity types without deleting the existing ones. Intents and entity + * types with the same name are replaced with the new versions from ImportAgentRequest. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -994,27 +1001,26 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
+   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   OperationFuture<Empty, Struct> future = agentsClient.restoreAgentOperationCallable().futureCall(request);
+   *   OperationFuture<Empty, Struct> future = agentsClient.importAgentOperationCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - restoreAgentOperationCallable() { - return stub.restoreAgentOperationCallable(); + public final OperationCallable importAgentOperationCallable() { + return stub.importAgentOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Restores the specified agent from a ZIP file. + * Imports the specified agent from a ZIP file. * - *

Replaces the current agent version with a new one. All the intents and entity types in the - * older version are deleted. + *

Uploads new intents and entity types without deleting the existing ones. Intents and entity + * types with the same name are replaced with the new versions from ImportAgentRequest. * *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> * @@ -1023,17 +1029,17 @@ public final OperationFuture restoreAgentAsync(RestoreAgentReques *


    * try (AgentsClient agentsClient = AgentsClient.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
+   *   ImportAgentRequest request = ImportAgentRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
-   *   ApiFuture<Operation> future = agentsClient.restoreAgentCallable().futureCall(request);
+   *   ApiFuture<Operation> future = agentsClient.importAgentCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ - public final UnaryCallable restoreAgentCallable() { - return stub.restoreAgentCallable(); + public final UnaryCallable importAgentCallable() { + return stub.importAgentCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1045,7 +1051,10 @@ public final UnaryCallable restoreAgentCallable( * *

    * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   GetValidationResultRequest request = GetValidationResultRequest.newBuilder().build();
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   GetValidationResultRequest request = GetValidationResultRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
    *   ValidationResult response = agentsClient.getValidationResult(request);
    * }
    * 
@@ -1066,7 +1075,10 @@ public final ValidationResult getValidationResult(GetValidationResultRequest req * *

    * try (AgentsClient agentsClient = AgentsClient.create()) {
-   *   GetValidationResultRequest request = GetValidationResultRequest.newBuilder().build();
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   GetValidationResultRequest request = GetValidationResultRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
    *   ApiFuture<ValidationResult> future = agentsClient.getValidationResultCallable().futureCall(request);
    *   // Do something
    *   ValidationResult response = future.get();
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsSettings.java
index 51b7f88b2..4cf5d0834 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsSettings.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsSettings.java
@@ -81,11 +81,6 @@ public UnaryCallSettings deleteAgentSettings() {
     return ((AgentsStubSettings) getStubSettings()).deleteAgentSettings();
   }
 
-  /** Returns the object with the settings used for calls to getAgent. */
-  public UnaryCallSettings getAgentSettings() {
-    return ((AgentsStubSettings) getStubSettings()).getAgentSettings();
-  }
-
   /** Returns the object with the settings used for calls to searchAgents. */
   public PagedCallSettings
       searchAgentsSettings() {
@@ -117,18 +112,6 @@ public UnaryCallSettings exportAgentSettings() {
     return ((AgentsStubSettings) getStubSettings()).exportAgentOperationSettings();
   }
 
-  /** Returns the object with the settings used for calls to importAgent. */
-  public UnaryCallSettings importAgentSettings() {
-    return ((AgentsStubSettings) getStubSettings()).importAgentSettings();
-  }
-
-  /** Returns the object with the settings used for calls to importAgent. */
-  @BetaApi(
-      "The surface for long-running operations is not stable yet and may change in the future.")
-  public OperationCallSettings importAgentOperationSettings() {
-    return ((AgentsStubSettings) getStubSettings()).importAgentOperationSettings();
-  }
-
   /** Returns the object with the settings used for calls to restoreAgent. */
   public UnaryCallSettings restoreAgentSettings() {
     return ((AgentsStubSettings) getStubSettings()).restoreAgentSettings();
@@ -141,6 +124,23 @@ public OperationCallSettings restoreAgentOpe
     return ((AgentsStubSettings) getStubSettings()).restoreAgentOperationSettings();
   }
 
+  /** Returns the object with the settings used for calls to getAgent. */
+  public UnaryCallSettings getAgentSettings() {
+    return ((AgentsStubSettings) getStubSettings()).getAgentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to importAgent. */
+  public UnaryCallSettings importAgentSettings() {
+    return ((AgentsStubSettings) getStubSettings()).importAgentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to importAgent. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings importAgentOperationSettings() {
+    return ((AgentsStubSettings) getStubSettings()).importAgentOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to getValidationResult. */
   public UnaryCallSettings
       getValidationResultSettings() {
@@ -253,11 +253,6 @@ public UnaryCallSettings.Builder deleteAgentSettings(
       return getStubSettingsBuilder().deleteAgentSettings();
     }
 
-    /** Returns the builder for the settings used for calls to getAgent. */
-    public UnaryCallSettings.Builder getAgentSettings() {
-      return getStubSettingsBuilder().getAgentSettings();
-    }
-
     /** Returns the builder for the settings used for calls to searchAgents. */
     public PagedCallSettings.Builder<
             SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse>
@@ -291,19 +286,6 @@ public UnaryCallSettings.Builder exportAgentSetti
       return getStubSettingsBuilder().exportAgentOperationSettings();
     }
 
-    /** Returns the builder for the settings used for calls to importAgent. */
-    public UnaryCallSettings.Builder importAgentSettings() {
-      return getStubSettingsBuilder().importAgentSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to importAgent. */
-    @BetaApi(
-        "The surface for long-running operations is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        importAgentOperationSettings() {
-      return getStubSettingsBuilder().importAgentOperationSettings();
-    }
-
     /** Returns the builder for the settings used for calls to restoreAgent. */
     public UnaryCallSettings.Builder restoreAgentSettings() {
       return getStubSettingsBuilder().restoreAgentSettings();
@@ -317,6 +299,24 @@ public UnaryCallSettings.Builder restoreAgentSet
       return getStubSettingsBuilder().restoreAgentOperationSettings();
     }
 
+    /** Returns the builder for the settings used for calls to getAgent. */
+    public UnaryCallSettings.Builder getAgentSettings() {
+      return getStubSettingsBuilder().getAgentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to importAgent. */
+    public UnaryCallSettings.Builder importAgentSettings() {
+      return getStubSettingsBuilder().importAgentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to importAgent. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        importAgentOperationSettings() {
+      return getStubSettingsBuilder().importAgentOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to getValidationResult. */
     public UnaryCallSettings.Builder
         getValidationResultSettings() {
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsClient.java
index 5486a95a0..6febf96ce 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsClient.java
@@ -29,6 +29,7 @@
 import com.google.cloud.dialogflow.v2.stub.ContextsStubSettings;
 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;
@@ -58,8 +59,8 @@
  * 
  * 
  * try (ContextsClient contextsClient = ContextsClient.create()) {
- *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
- *   Context response = contextsClient.getContext(name);
+ *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+ *   contextsClient.deleteContext(name);
  * }
  * 
  * 
@@ -166,6 +167,203 @@ public ContextsStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified context. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   contextsClient.deleteContext(name);
+   * }
+   * 
+ * + * @param name Required. The name of the context to delete. Format: `projects/<Project + * ID>/agent/sessions/<Session ID>/contexts/<Context ID>` or + * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is not + * specified, we assume default 'draft' environment. If `User ID` is not specified, we assume + * default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteContext(ContextName name) { + DeleteContextRequest request = + DeleteContextRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteContext(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified context. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   contextsClient.deleteContext(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the context to delete. Format: `projects/<Project + * ID>/agent/sessions/<Session ID>/contexts/<Context ID>` or + * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is not + * specified, we assume default 'draft' environment. If `User ID` is not specified, we assume + * default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteContext(String name) { + DeleteContextRequest request = DeleteContextRequest.newBuilder().setName(name).build(); + deleteContext(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified context. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   DeleteContextRequest request = DeleteContextRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   contextsClient.deleteContext(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 deleteContext(DeleteContextRequest request) { + deleteContextCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified context. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   DeleteContextRequest request = DeleteContextRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = contextsClient.deleteContextCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteContextCallable() { + return stub.deleteContextCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes all active contexts in the specified session. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
+   *   contextsClient.deleteAllContexts(parent);
+   * }
+   * 
+ * + * @param parent Required. The name of the session to delete all contexts from. Format: + * `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project + * ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session + * ID>`. If `Environment ID` is not specified we assume default 'draft' environment. If + * `User ID` is not specified, we assume default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAllContexts(SessionName parent) { + DeleteAllContextsRequest request = + DeleteAllContextsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + deleteAllContexts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes all active contexts in the specified session. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
+   *   contextsClient.deleteAllContexts(parent.toString());
+   * }
+   * 
+ * + * @param parent Required. The name of the session to delete all contexts from. Format: + * `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project + * ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session + * ID>`. If `Environment ID` is not specified we assume default 'draft' environment. If + * `User ID` is not specified, we assume default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAllContexts(String parent) { + DeleteAllContextsRequest request = + DeleteAllContextsRequest.newBuilder().setParent(parent).build(); + deleteAllContexts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes all active contexts in the specified session. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
+   *   DeleteAllContextsRequest request = DeleteAllContextsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   contextsClient.deleteAllContexts(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 deleteAllContexts(DeleteAllContextsRequest request) { + deleteAllContextsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes all active contexts in the specified session. + * + *

Sample code: + * + *


+   * try (ContextsClient contextsClient = ContextsClient.create()) {
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
+   *   DeleteAllContextsRequest request = DeleteAllContextsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<Void> future = contextsClient.deleteAllContextsCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteAllContextsCallable() { + return stub.deleteAllContextsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns the list of all contexts in the specified session. @@ -174,7 +372,7 @@ public ContextsStub getStub() { * *

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   for (Context element : contextsClient.listContexts(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -204,7 +402,7 @@ public final ListContextsPagedResponse listContexts(SessionName parent) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   for (Context element : contextsClient.listContexts(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -231,7 +429,7 @@ public final ListContextsPagedResponse listContexts(String parent) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListContextsRequest request = ListContextsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -256,7 +454,7 @@ public final ListContextsPagedResponse listContexts(ListContextsRequest request)
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListContextsRequest request = ListContextsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -281,7 +479,7 @@ public final ListContextsPagedResponse listContexts(ListContextsRequest request)
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListContextsRequest request = ListContextsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -312,7 +510,7 @@ public final UnaryCallable listContex
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
    *   Context response = contextsClient.getContext(name);
    * }
    * 
@@ -339,7 +537,7 @@ public final Context getContext(ContextName name) { * *

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
    *   Context response = contextsClient.getContext(name.toString());
    * }
    * 
@@ -365,7 +563,7 @@ public final Context getContext(String name) { * *

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
    *   GetContextRequest request = GetContextRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -388,7 +586,7 @@ public final Context getContext(GetContextRequest request) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
+   *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
    *   GetContextRequest request = GetContextRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -412,7 +610,7 @@ public final UnaryCallable getContextCallable() {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   Context context = Context.newBuilder().build();
    *   Context response = contextsClient.createContext(parent, context);
    * }
@@ -445,7 +643,7 @@ public final Context createContext(SessionName parent, Context context) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   Context context = Context.newBuilder().build();
    *   Context response = contextsClient.createContext(parent.toString(), context);
    * }
@@ -475,7 +673,7 @@ public final Context createContext(String parent, Context context) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   Context context = Context.newBuilder().build();
    *   CreateContextRequest request = CreateContextRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -502,7 +700,7 @@ public final Context createContext(CreateContextRequest request) {
    *
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   Context context = Context.newBuilder().build();
    *   CreateContextRequest request = CreateContextRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -527,15 +725,18 @@ public final UnaryCallable createContextCallable(
    * 

    * try (ContextsClient contextsClient = ContextsClient.create()) {
    *   Context context = Context.newBuilder().build();
-   *   Context response = contextsClient.updateContext(context);
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Context response = contextsClient.updateContext(context, updateMask);
    * }
    * 
* * @param context Required. The context to update. + * @param updateMask Optional. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Context updateContext(Context context) { - UpdateContextRequest request = UpdateContextRequest.newBuilder().setContext(context).build(); + public final Context updateContext(Context context, FieldMask updateMask) { + UpdateContextRequest request = + UpdateContextRequest.newBuilder().setContext(context).setUpdateMask(updateMask).build(); return updateContext(request); } @@ -584,203 +785,6 @@ public final UnaryCallable updateContextCallable( return stub.updateContextCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified context. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
-   *   contextsClient.deleteContext(name);
-   * }
-   * 
- * - * @param name Required. The name of the context to delete. Format: `projects/<Project - * ID>/agent/sessions/<Session ID>/contexts/<Context ID>` or - * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is not - * specified, we assume default 'draft' environment. If `User ID` is not specified, we assume - * default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteContext(ContextName name) { - DeleteContextRequest request = - DeleteContextRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteContext(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified context. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
-   *   contextsClient.deleteContext(name.toString());
-   * }
-   * 
- * - * @param name Required. The name of the context to delete. Format: `projects/<Project - * ID>/agent/sessions/<Session ID>/contexts/<Context ID>` or - * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - * ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is not - * specified, we assume default 'draft' environment. If `User ID` is not specified, we assume - * default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteContext(String name) { - DeleteContextRequest request = DeleteContextRequest.newBuilder().setName(name).build(); - deleteContext(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified context. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
-   *   DeleteContextRequest request = DeleteContextRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   contextsClient.deleteContext(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 deleteContext(DeleteContextRequest request) { - deleteContextCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified context. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
-   *   DeleteContextRequest request = DeleteContextRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = contextsClient.deleteContextCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteContextCallable() { - return stub.deleteContextCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes all active contexts in the specified session. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
-   *   contextsClient.deleteAllContexts(parent);
-   * }
-   * 
- * - * @param parent Required. The name of the session to delete all contexts from. Format: - * `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project - * ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session - * ID>`. If `Environment ID` is not specified we assume default 'draft' environment. If - * `User ID` is not specified, we assume default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAllContexts(SessionName parent) { - DeleteAllContextsRequest request = - DeleteAllContextsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - deleteAllContexts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes all active contexts in the specified session. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
-   *   contextsClient.deleteAllContexts(parent.toString());
-   * }
-   * 
- * - * @param parent Required. The name of the session to delete all contexts from. Format: - * `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project - * ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session - * ID>`. If `Environment ID` is not specified we assume default 'draft' environment. If - * `User ID` is not specified, we assume default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAllContexts(String parent) { - DeleteAllContextsRequest request = - DeleteAllContextsRequest.newBuilder().setParent(parent).build(); - deleteAllContexts(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes all active contexts in the specified session. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
-   *   DeleteAllContextsRequest request = DeleteAllContextsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   contextsClient.deleteAllContexts(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 deleteAllContexts(DeleteAllContextsRequest request) { - deleteAllContextsCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes all active contexts in the specified session. - * - *

Sample code: - * - *


-   * try (ContextsClient contextsClient = ContextsClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
-   *   DeleteAllContextsRequest request = DeleteAllContextsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<Void> future = contextsClient.deleteAllContextsCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteAllContextsCallable() { - return stub.deleteAllContextsCallable(); - } - @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsSettings.java index e7fe62e37..228d06e7f 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/ContextsSettings.java @@ -49,16 +49,16 @@ *

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 getContext to 30 seconds: + *

For example, to set the total timeout of deleteContext to 30 seconds: * *

  * 
  * ContextsSettings.Builder contextsSettingsBuilder =
  *     ContextsSettings.newBuilder();
  * contextsSettingsBuilder
- *     .getContextSettings()
+ *     .deleteContextSettings()
  *     .setRetrySettings(
- *         contextsSettingsBuilder.getContextSettings().getRetrySettings().toBuilder()
+ *         contextsSettingsBuilder.deleteContextSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ContextsSettings contextsSettings = contextsSettingsBuilder.build();
@@ -68,6 +68,16 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class ContextsSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteContext. */
+  public UnaryCallSettings deleteContextSettings() {
+    return ((ContextsStubSettings) getStubSettings()).deleteContextSettings();
+  }
+
+  /** Returns the object with the settings used for calls to deleteAllContexts. */
+  public UnaryCallSettings deleteAllContextsSettings() {
+    return ((ContextsStubSettings) getStubSettings()).deleteAllContextsSettings();
+  }
+
   /** Returns the object with the settings used for calls to listContexts. */
   public PagedCallSettings
       listContextsSettings() {
@@ -89,16 +99,6 @@ public UnaryCallSettings updateContextSettings()
     return ((ContextsStubSettings) getStubSettings()).updateContextSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteContext. */
-  public UnaryCallSettings deleteContextSettings() {
-    return ((ContextsStubSettings) getStubSettings()).deleteContextSettings();
-  }
-
-  /** Returns the object with the settings used for calls to deleteAllContexts. */
-  public UnaryCallSettings deleteAllContextsSettings() {
-    return ((ContextsStubSettings) getStubSettings()).deleteAllContextsSettings();
-  }
-
   public static final ContextsSettings create(ContextsStubSettings stub) throws IOException {
     return new ContextsSettings.Builder(stub.toBuilder()).build();
   }
@@ -195,6 +195,16 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteContext. */
+    public UnaryCallSettings.Builder deleteContextSettings() {
+      return getStubSettingsBuilder().deleteContextSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to deleteAllContexts. */
+    public UnaryCallSettings.Builder deleteAllContextsSettings() {
+      return getStubSettingsBuilder().deleteAllContextsSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listContexts. */
     public PagedCallSettings.Builder<
             ListContextsRequest, ListContextsResponse, ListContextsPagedResponse>
@@ -217,16 +227,6 @@ public UnaryCallSettings.Builder updateContextSet
       return getStubSettingsBuilder().updateContextSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteContext. */
-    public UnaryCallSettings.Builder deleteContextSettings() {
-      return getStubSettingsBuilder().deleteContextSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to deleteAllContexts. */
-    public UnaryCallSettings.Builder deleteAllContextsSettings() {
-      return getStubSettingsBuilder().deleteAllContextsSettings();
-    }
-
     @Override
     public ContextsSettings build() throws IOException {
       return new ContextsSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java
index 199815561..3901175c2 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java
@@ -74,7 +74,7 @@
  * 
  * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
  *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
- *   EntityType response = entityTypesClient.getEntityType(name);
+ *   entityTypesClient.deleteEntityType(name);
  * }
  * 
  * 
@@ -195,6 +195,481 @@ public final OperationsClient getOperationsClient() { return operationsClient; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified entity type. + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   entityTypesClient.deleteEntityType(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entity type to delete. Format: `projects/<Project + * ID>/agent/entityTypes/<EntityType ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntityType(EntityTypeName name) { + DeleteEntityTypeRequest request = + DeleteEntityTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteEntityType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified entity type. + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   entityTypesClient.deleteEntityType(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entity type to delete. Format: `projects/<Project + * ID>/agent/entityTypes/<EntityType ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteEntityType(String name) { + DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder().setName(name).build(); + deleteEntityType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified entity type. + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   entityTypesClient.deleteEntityType(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 deleteEntityType(DeleteEntityTypeRequest request) { + deleteEntityTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified entity type. + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = entityTypesClient.deleteEntityTypeCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteEntityTypeCallable() { + return stub.deleteEntityTypeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entity types in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<String> entityTypeNames = new ArrayList<>();
+   *   entityTypesClient.batchDeleteEntityTypesAsync(parent, entityTypeNames).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the agent to delete all entities types for. Format: + * `projects/<Project ID>/agent`. + * @param entityTypeNames Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntityTypesAsync( + AgentName parent, List entityTypeNames) { + BatchDeleteEntityTypesRequest request = + BatchDeleteEntityTypesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllEntityTypeNames(entityTypeNames) + .build(); + return batchDeleteEntityTypesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entity types in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<String> entityTypeNames = new ArrayList<>();
+   *   entityTypesClient.batchDeleteEntityTypesAsync(parent.toString(), entityTypeNames).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the agent to delete all entities types for. Format: + * `projects/<Project ID>/agent`. + * @param entityTypeNames Required. The names entity types to delete. All names must point to the + * same agent as `parent`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntityTypesAsync( + String parent, List entityTypeNames) { + BatchDeleteEntityTypesRequest request = + BatchDeleteEntityTypesRequest.newBuilder() + .setParent(parent) + .addAllEntityTypeNames(entityTypeNames) + .build(); + return batchDeleteEntityTypesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entity types in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<String> entityTypeNames = new ArrayList<>();
+   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityTypeNames(entityTypeNames)
+   *     .build();
+   *   entityTypesClient.batchDeleteEntityTypesAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntityTypesAsync( + BatchDeleteEntityTypesRequest request) { + return batchDeleteEntityTypesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entity types in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<String> entityTypeNames = new ArrayList<>();
+   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityTypeNames(entityTypeNames)
+   *     .build();
+   *   OperationFuture<Empty, Struct> future = entityTypesClient.batchDeleteEntityTypesOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchDeleteEntityTypesOperationCallable() { + return stub.batchDeleteEntityTypesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entity types in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<String> entityTypeNames = new ArrayList<>();
+   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityTypeNames(entityTypeNames)
+   *     .build();
+   *   ApiFuture<Operation> future = entityTypesClient.batchDeleteEntityTypesCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + batchDeleteEntityTypesCallable() { + return stub.batchDeleteEntityTypesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   entityTypesClient.batchDeleteEntitiesAsync(parent, entityValues).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the entity type to delete entries for. Format: + * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + * @param entityValues Required. The reference `values` of the entities to delete. Note that these + * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntitiesAsync( + EntityTypeName parent, List entityValues) { + BatchDeleteEntitiesRequest request = + BatchDeleteEntitiesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllEntityValues(entityValues) + .build(); + return batchDeleteEntitiesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   entityTypesClient.batchDeleteEntitiesAsync(parent.toString(), entityValues).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the entity type to delete entries for. Format: + * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + * @param entityValues Required. The reference `values` of the entities to delete. Note that these + * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntitiesAsync( + String parent, List entityValues) { + BatchDeleteEntitiesRequest request = + BatchDeleteEntitiesRequest.newBuilder() + .setParent(parent) + .addAllEntityValues(entityValues) + .build(); + return batchDeleteEntitiesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   String languageCode = "";
+   *   entityTypesClient.batchDeleteEntitiesAsync(parent, entityValues, languageCode).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the entity type to delete entries for. Format: + * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + * @param entityValues Required. The reference `values` of the entities to delete. Note that these + * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntitiesAsync( + EntityTypeName parent, List entityValues, String languageCode) { + BatchDeleteEntitiesRequest request = + BatchDeleteEntitiesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllEntityValues(entityValues) + .setLanguageCode(languageCode) + .build(); + return batchDeleteEntitiesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   String languageCode = "";
+   *   entityTypesClient.batchDeleteEntitiesAsync(parent.toString(), entityValues, languageCode).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the entity type to delete entries for. Format: + * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. + * @param entityValues Required. The reference `values` of the entities to delete. Note that these + * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntitiesAsync( + String parent, List entityValues, String languageCode) { + BatchDeleteEntitiesRequest request = + BatchDeleteEntitiesRequest.newBuilder() + .setParent(parent) + .addAllEntityValues(entityValues) + .setLanguageCode(languageCode) + .build(); + return batchDeleteEntitiesAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityValues(entityValues)
+   *     .build();
+   *   entityTypesClient.batchDeleteEntitiesAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteEntitiesAsync( + BatchDeleteEntitiesRequest request) { + return batchDeleteEntitiesOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityValues(entityValues)
+   *     .build();
+   *   OperationFuture<Empty, Struct> future = entityTypesClient.batchDeleteEntitiesOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchDeleteEntitiesOperationCallable() { + return stub.batchDeleteEntitiesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes entities in the specified entity type. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
+   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
+   *   List<String> entityValues = new ArrayList<>();
+   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllEntityValues(entityValues)
+   *     .build();
+   *   ApiFuture<Operation> future = entityTypesClient.batchDeleteEntitiesCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchDeleteEntitiesCallable() { + return stub.batchDeleteEntitiesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns the list of all entity types in the specified agent. @@ -203,7 +678,7 @@ public final OperationsClient getOperationsClient() { * *

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   for (EntityType element : entityTypesClient.listEntityTypes(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -214,7 +689,7 @@ public final OperationsClient getOperationsClient() {
    *     ID>/agent`.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListEntityTypesPagedResponse listEntityTypes(ProjectAgentName parent) {
+  public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent) {
     ListEntityTypesRequest request =
         ListEntityTypesRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -230,7 +705,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(ProjectAgentName paren
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   for (EntityType element : entityTypesClient.listEntityTypes(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -254,7 +729,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   String languageCode = "";
    *   for (EntityType element : entityTypesClient.listEntityTypes(parent, languageCode).iterateAll()) {
    *     // doThingsWith(element);
@@ -270,8 +745,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
    *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListEntityTypesPagedResponse listEntityTypes(
-      ProjectAgentName parent, String languageCode) {
+  public final ListEntityTypesPagedResponse listEntityTypes(AgentName parent, String languageCode) {
     ListEntityTypesRequest request =
         ListEntityTypesRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -288,7 +762,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   String languageCode = "";
    *   for (EntityType element : entityTypesClient.listEntityTypes(parent.toString(), languageCode).iterateAll()) {
    *     // doThingsWith(element);
@@ -318,7 +792,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent, String
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -343,7 +817,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -368,7 +842,7 @@ public final ListEntityTypesPagedResponse listEntityTypes(ListEntityTypesRequest
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListEntityTypesRequest request = ListEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -549,7 +1023,7 @@ public final UnaryCallable getEntityTypeCallab
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   EntityType response = entityTypesClient.createEntityType(parent, entityType);
    * }
@@ -560,7 +1034,7 @@ public final UnaryCallable getEntityTypeCallab
    * @param entityType Required. The entity type to create.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final EntityType createEntityType(ProjectAgentName parent, EntityType entityType) {
+  public final EntityType createEntityType(AgentName parent, EntityType entityType) {
     CreateEntityTypeRequest request =
         CreateEntityTypeRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -577,7 +1051,7 @@ public final EntityType createEntityType(ProjectAgentName parent, EntityType ent
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   EntityType response = entityTypesClient.createEntityType(parent.toString(), entityType);
    * }
@@ -602,7 +1076,7 @@ public final EntityType createEntityType(String parent, EntityType entityType) {
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   String languageCode = "";
    *   EntityType response = entityTypesClient.createEntityType(parent, entityType, languageCode);
@@ -619,7 +1093,7 @@ public final EntityType createEntityType(String parent, EntityType entityType) {
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final EntityType createEntityType(
-      ProjectAgentName parent, EntityType entityType, String languageCode) {
+      AgentName parent, EntityType entityType, String languageCode) {
     CreateEntityTypeRequest request =
         CreateEntityTypeRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -637,7 +1111,7 @@ public final EntityType createEntityType(
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   String languageCode = "";
    *   EntityType response = entityTypesClient.createEntityType(parent.toString(), entityType, languageCode);
@@ -672,7 +1146,7 @@ public final EntityType createEntityType(
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   CreateEntityTypeRequest request = CreateEntityTypeRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -697,7 +1171,7 @@ public final EntityType createEntityType(CreateEntityTypeRequest request) {
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   EntityType entityType = EntityType.newBuilder().build();
    *   CreateEntityTypeRequest request = CreateEntityTypeRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -810,96 +1284,6 @@ public final UnaryCallable updateEntityType
     return stub.updateEntityTypeCallable();
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
-  /**
-   * Deletes the specified entity type.
-   *
-   * 

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   entityTypesClient.deleteEntityType(name);
-   * }
-   * 
- * - * @param name Required. The name of the entity type to delete. Format: `projects/<Project - * ID>/agent/entityTypes/<EntityType ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteEntityType(EntityTypeName name) { - DeleteEntityTypeRequest request = - DeleteEntityTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteEntityType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified entity type. - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   entityTypesClient.deleteEntityType(name.toString());
-   * }
-   * 
- * - * @param name Required. The name of the entity type to delete. Format: `projects/<Project - * ID>/agent/entityTypes/<EntityType ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteEntityType(String name) { - DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder().setName(name).build(); - deleteEntityType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified entity type. - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   entityTypesClient.deleteEntityType(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 deleteEntityType(DeleteEntityTypeRequest request) { - deleteEntityTypeCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified entity type. - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   DeleteEntityTypeRequest request = DeleteEntityTypeRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = entityTypesClient.deleteEntityTypeCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteEntityTypeCallable() { - return stub.deleteEntityTypeCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates/Creates multiple entity types in the specified agent. @@ -911,7 +1295,7 @@ public final UnaryCallable deleteEntityTypeCalla * *

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -940,7 +1324,7 @@ public final OperationFuture batchUpdate
    *
    * 

    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -950,190 +1334,37 @@ public final OperationFuture batchUpdate
    * }
    * 
*/ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable< - BatchUpdateEntityTypesRequest, BatchUpdateEntityTypesResponse, Struct> - batchUpdateEntityTypesOperationCallable() { - return stub.batchUpdateEntityTypesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates/Creates multiple entity types in the specified agent. - * - *

Operation <response: - * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = entityTypesClient.batchUpdateEntityTypesCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - batchUpdateEntityTypesCallable() { - return stub.batchUpdateEntityTypesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entity types in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<String> entityTypeNames = new ArrayList<>();
-   *   entityTypesClient.batchDeleteEntityTypesAsync(parent, entityTypeNames).get();
-   * }
-   * 
- * - * @param parent Required. The name of the agent to delete all entities types for. Format: - * `projects/<Project ID>/agent`. - * @param entityTypeNames Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntityTypesAsync( - ProjectAgentName parent, List entityTypeNames) { - BatchDeleteEntityTypesRequest request = - BatchDeleteEntityTypesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllEntityTypeNames(entityTypeNames) - .build(); - return batchDeleteEntityTypesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entity types in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<String> entityTypeNames = new ArrayList<>();
-   *   entityTypesClient.batchDeleteEntityTypesAsync(parent.toString(), entityTypeNames).get();
-   * }
-   * 
- * - * @param parent Required. The name of the agent to delete all entities types for. Format: - * `projects/<Project ID>/agent`. - * @param entityTypeNames Required. The names entity types to delete. All names must point to the - * same agent as `parent`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntityTypesAsync( - String parent, List entityTypeNames) { - BatchDeleteEntityTypesRequest request = - BatchDeleteEntityTypesRequest.newBuilder() - .setParent(parent) - .addAllEntityTypeNames(entityTypeNames) - .build(); - return batchDeleteEntityTypesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entity types in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<String> entityTypeNames = new ArrayList<>();
-   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllEntityTypeNames(entityTypeNames)
-   *     .build();
-   *   entityTypesClient.batchDeleteEntityTypesAsync(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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntityTypesAsync( - BatchDeleteEntityTypesRequest request) { - return batchDeleteEntityTypesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entity types in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<String> entityTypeNames = new ArrayList<>();
-   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllEntityTypeNames(entityTypeNames)
-   *     .build();
-   *   OperationFuture<Empty, Struct> future = entityTypesClient.batchDeleteEntityTypesOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchDeleteEntityTypesOperationCallable() { - return stub.batchDeleteEntityTypesOperationCallable(); + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + BatchUpdateEntityTypesRequest, BatchUpdateEntityTypesResponse, Struct> + batchUpdateEntityTypesOperationCallable() { + return stub.batchUpdateEntityTypesOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes entity types in the specified agent. + * Updates/Creates multiple entity types in the specified agent. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + *

Operation <response: + * [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]> * *

Sample code: * *


    * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<String> entityTypeNames = new ArrayList<>();
-   *   BatchDeleteEntityTypesRequest request = BatchDeleteEntityTypesRequest.newBuilder()
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
-   *     .addAllEntityTypeNames(entityTypeNames)
    *     .build();
-   *   ApiFuture<Operation> future = entityTypesClient.batchDeleteEntityTypesCallable().futureCall(request);
+   *   ApiFuture<Operation> future = entityTypesClient.batchUpdateEntityTypesCallable().futureCall(request);
    *   // Do something
-   *   future.get();
+   *   Operation response = future.get();
    * }
    * 
*/ - public final UnaryCallable - batchDeleteEntityTypesCallable() { - return stub.batchDeleteEntityTypesCallable(); + public final UnaryCallable + batchUpdateEntityTypesCallable() { + return stub.batchUpdateEntityTypesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1593,238 +1824,6 @@ public final UnaryCallable batchUpdateEnt return stub.batchUpdateEntitiesCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   entityTypesClient.batchDeleteEntitiesAsync(parent, entityValues).get();
-   * }
-   * 
- * - * @param parent Required. The name of the entity type to delete entries for. Format: - * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - * @param entityValues Required. The reference `values` of the entities to delete. Note that these - * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntitiesAsync( - EntityTypeName parent, List entityValues) { - BatchDeleteEntitiesRequest request = - BatchDeleteEntitiesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllEntityValues(entityValues) - .build(); - return batchDeleteEntitiesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   entityTypesClient.batchDeleteEntitiesAsync(parent.toString(), entityValues).get();
-   * }
-   * 
- * - * @param parent Required. The name of the entity type to delete entries for. Format: - * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - * @param entityValues Required. The reference `values` of the entities to delete. Note that these - * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntitiesAsync( - String parent, List entityValues) { - BatchDeleteEntitiesRequest request = - BatchDeleteEntitiesRequest.newBuilder() - .setParent(parent) - .addAllEntityValues(entityValues) - .build(); - return batchDeleteEntitiesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   String languageCode = "";
-   *   entityTypesClient.batchDeleteEntitiesAsync(parent, entityValues, languageCode).get();
-   * }
-   * 
- * - * @param parent Required. The name of the entity type to delete entries for. Format: - * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - * @param entityValues Required. The reference `values` of the entities to delete. Note that these - * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @param languageCode Optional. The language used to access language-specific data. If not - * specified, the agent's default language is used. For more information, see [Multilingual - * intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntitiesAsync( - EntityTypeName parent, List entityValues, String languageCode) { - BatchDeleteEntitiesRequest request = - BatchDeleteEntitiesRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllEntityValues(entityValues) - .setLanguageCode(languageCode) - .build(); - return batchDeleteEntitiesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   String languageCode = "";
-   *   entityTypesClient.batchDeleteEntitiesAsync(parent.toString(), entityValues, languageCode).get();
-   * }
-   * 
- * - * @param parent Required. The name of the entity type to delete entries for. Format: - * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. - * @param entityValues Required. The reference `values` of the entities to delete. Note that these - * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @param languageCode Optional. The language used to access language-specific data. If not - * specified, the agent's default language is used. For more information, see [Multilingual - * intent and entity - * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntitiesAsync( - String parent, List entityValues, String languageCode) { - BatchDeleteEntitiesRequest request = - BatchDeleteEntitiesRequest.newBuilder() - .setParent(parent) - .addAllEntityValues(entityValues) - .setLanguageCode(languageCode) - .build(); - return batchDeleteEntitiesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllEntityValues(entityValues)
-   *     .build();
-   *   entityTypesClient.batchDeleteEntitiesAsync(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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteEntitiesAsync( - BatchDeleteEntitiesRequest request) { - return batchDeleteEntitiesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllEntityValues(entityValues)
-   *     .build();
-   *   OperationFuture<Empty, Struct> future = entityTypesClient.batchDeleteEntitiesOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchDeleteEntitiesOperationCallable() { - return stub.batchDeleteEntitiesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes entities in the specified entity type. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) {
-   *   EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]");
-   *   List<String> entityValues = new ArrayList<>();
-   *   BatchDeleteEntitiesRequest request = BatchDeleteEntitiesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllEntityValues(entityValues)
-   *     .build();
-   *   ApiFuture<Operation> future = entityTypesClient.batchDeleteEntitiesCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable batchDeleteEntitiesCallable() { - return stub.batchDeleteEntitiesCallable(); - } - @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesSettings.java index caa415266..c268664c1 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesSettings.java @@ -52,16 +52,16 @@ *

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 getEntityType to 30 seconds: + *

For example, to set the total timeout of deleteEntityType to 30 seconds: * *

  * 
  * EntityTypesSettings.Builder entityTypesSettingsBuilder =
  *     EntityTypesSettings.newBuilder();
  * entityTypesSettingsBuilder
- *     .getEntityTypeSettings()
+ *     .deleteEntityTypeSettings()
  *     .setRetrySettings(
- *         entityTypesSettingsBuilder.getEntityTypeSettings().getRetrySettings().toBuilder()
+ *         entityTypesSettingsBuilder.deleteEntityTypeSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * EntityTypesSettings entityTypesSettings = entityTypesSettingsBuilder.build();
@@ -71,6 +71,38 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class EntityTypesSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteEntityType. */
+  public UnaryCallSettings deleteEntityTypeSettings() {
+    return ((EntityTypesStubSettings) getStubSettings()).deleteEntityTypeSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
+  public UnaryCallSettings
+      batchDeleteEntityTypesSettings() {
+    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntityTypesSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteEntityTypesOperationSettings() {
+    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntityTypesOperationSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntities. */
+  public UnaryCallSettings batchDeleteEntitiesSettings() {
+    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntitiesSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntities. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteEntitiesOperationSettings() {
+    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntitiesOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to listEntityTypes. */
   public PagedCallSettings<
           ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse>
@@ -93,11 +125,6 @@ public UnaryCallSettings updateEntityTypeSe
     return ((EntityTypesStubSettings) getStubSettings()).updateEntityTypeSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteEntityType. */
-  public UnaryCallSettings deleteEntityTypeSettings() {
-    return ((EntityTypesStubSettings) getStubSettings()).deleteEntityTypeSettings();
-  }
-
   /** Returns the object with the settings used for calls to batchUpdateEntityTypes. */
   public UnaryCallSettings
       batchUpdateEntityTypesSettings() {
@@ -113,20 +140,6 @@ public UnaryCallSettings deleteEntityTypeSetting
     return ((EntityTypesStubSettings) getStubSettings()).batchUpdateEntityTypesOperationSettings();
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
-  public UnaryCallSettings
-      batchDeleteEntityTypesSettings() {
-    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntityTypesSettings();
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
-  @BetaApi(
-      "The surface for long-running operations is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteEntityTypesOperationSettings() {
-    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntityTypesOperationSettings();
-  }
-
   /** Returns the object with the settings used for calls to batchCreateEntities. */
   public UnaryCallSettings batchCreateEntitiesSettings() {
     return ((EntityTypesStubSettings) getStubSettings()).batchCreateEntitiesSettings();
@@ -153,19 +166,6 @@ public UnaryCallSettings batchUpdateEntit
     return ((EntityTypesStubSettings) getStubSettings()).batchUpdateEntitiesOperationSettings();
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteEntities. */
-  public UnaryCallSettings batchDeleteEntitiesSettings() {
-    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntitiesSettings();
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteEntities. */
-  @BetaApi(
-      "The surface for long-running operations is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteEntitiesOperationSettings() {
-    return ((EntityTypesStubSettings) getStubSettings()).batchDeleteEntitiesOperationSettings();
-  }
-
   public static final EntityTypesSettings create(EntityTypesStubSettings stub) throws IOException {
     return new EntityTypesSettings.Builder(stub.toBuilder()).build();
   }
@@ -262,6 +262,39 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteEntityType. */
+    public UnaryCallSettings.Builder deleteEntityTypeSettings() {
+      return getStubSettingsBuilder().deleteEntityTypeSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
+    public UnaryCallSettings.Builder
+        batchDeleteEntityTypesSettings() {
+      return getStubSettingsBuilder().batchDeleteEntityTypesSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteEntityTypesOperationSettings() {
+      return getStubSettingsBuilder().batchDeleteEntityTypesOperationSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
+    public UnaryCallSettings.Builder
+        batchDeleteEntitiesSettings() {
+      return getStubSettingsBuilder().batchDeleteEntitiesSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteEntitiesOperationSettings() {
+      return getStubSettingsBuilder().batchDeleteEntitiesOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listEntityTypes. */
     public PagedCallSettings.Builder<
             ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse>
@@ -286,11 +319,6 @@ public UnaryCallSettings.Builder getEntityType
       return getStubSettingsBuilder().updateEntityTypeSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteEntityType. */
-    public UnaryCallSettings.Builder deleteEntityTypeSettings() {
-      return getStubSettingsBuilder().deleteEntityTypeSettings();
-    }
-
     /** Returns the builder for the settings used for calls to batchUpdateEntityTypes. */
     public UnaryCallSettings.Builder
         batchUpdateEntityTypesSettings() {
@@ -306,20 +334,6 @@ public UnaryCallSettings.Builder deleteEntityTyp
       return getStubSettingsBuilder().batchUpdateEntityTypesOperationSettings();
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
-    public UnaryCallSettings.Builder
-        batchDeleteEntityTypesSettings() {
-      return getStubSettingsBuilder().batchDeleteEntityTypesSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
-    @BetaApi(
-        "The surface for long-running operations is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteEntityTypesOperationSettings() {
-      return getStubSettingsBuilder().batchDeleteEntityTypesOperationSettings();
-    }
-
     /** Returns the builder for the settings used for calls to batchCreateEntities. */
     public UnaryCallSettings.Builder
         batchCreateEntitiesSettings() {
@@ -348,20 +362,6 @@ public UnaryCallSettings.Builder deleteEntityTyp
       return getStubSettingsBuilder().batchUpdateEntitiesOperationSettings();
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
-    public UnaryCallSettings.Builder
-        batchDeleteEntitiesSettings() {
-      return getStubSettingsBuilder().batchDeleteEntitiesSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
-    @BetaApi(
-        "The surface for long-running operations is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteEntitiesOperationSettings() {
-      return getStubSettingsBuilder().batchDeleteEntitiesOperationSettings();
-    }
-
     @Override
     public EntityTypesSettings build() throws IOException {
       return new EntityTypesSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsClient.java
new file mode 100644
index 000000000..bdca42bb4
--- /dev/null
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsClient.java
@@ -0,0 +1,355 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.v2;
+
+import com.google.api.core.ApiFunction;
+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.v2.stub.EnvironmentsStub;
+import com.google.cloud.dialogflow.v2.stub.EnvironmentsStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND SERVICE
+/**
+ * Service Description: Manages agent environments.
+ *
+ * 

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: + * + *

+ * 
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]");
+ *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
+ *     .setParent(parent.toString())
+ *     .build();
+ *   ApiFuture<ListEnvironmentsPagedResponse> future = environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+ *   // Do something
+ *   for (Environment element : future.get().iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of EnvironmentsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EnvironmentsClient environmentsClient =
+ *     EnvironmentsClient.create(environmentsSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EnvironmentsClient environmentsClient =
+ *     EnvironmentsClient.create(environmentsSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsClient implements BackgroundResource { + private final EnvironmentsSettings settings; + private final EnvironmentsStub stub; + + /** Constructs an instance of EnvironmentsClient with default settings. */ + public static final EnvironmentsClient create() throws IOException { + return create(EnvironmentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient create(EnvironmentsSettings settings) throws IOException { + return new EnvironmentsClient(settings); + } + + /** + * Constructs an instance of EnvironmentsClient, using the given stub for making calls. This is + * for advanced usage - prefer to use EnvironmentsSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final EnvironmentsClient create(EnvironmentsStub stub) { + return new EnvironmentsClient(stub); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient(EnvironmentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EnvironmentsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected EnvironmentsClient(EnvironmentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final EnvironmentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the list of all non-draft environments of the specified agent. + * + *

Sample code: + * + *


+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Environment element : environmentsClient.listEnvironments(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 ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) { + return listEnvironmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the list of all non-draft environments of the specified agent. + * + *

Sample code: + * + *


+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListEnvironmentsPagedResponse> future = environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listEnvironmentsPagedCallable() { + return stub.listEnvironmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the list of all non-draft environments of the specified agent. + * + *

Sample code: + * + *


+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListEnvironmentsResponse response = environmentsClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getEnvironmentsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listEnvironmentsCallable() { + return stub.listEnvironmentsCallable(); + } + + @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 ListEnvironmentsPagedResponse + extends AbstractPagedListResponse< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) { + return new ListEnvironmentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEnvironmentsPagedResponse(ListEnvironmentsPage page) { + super(page, ListEnvironmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEnvironmentsPage + extends AbstractPage< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment, ListEnvironmentsPage> { + + private ListEnvironmentsPage( + PageContext context, + ListEnvironmentsResponse response) { + super(context, response); + } + + private static ListEnvironmentsPage createEmptyPage() { + return new ListEnvironmentsPage(null, null); + } + + @Override + protected ListEnvironmentsPage createPage( + PageContext context, + ListEnvironmentsResponse response) { + return new ListEnvironmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEnvironmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + private ListEnvironmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEnvironmentsFixedSizeCollection createEmptyCollection() { + return new ListEnvironmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListEnvironmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEnvironmentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsSettings.java new file mode 100644 index 000000000..8131841ea --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsSettings.java @@ -0,0 +1,186 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +import static com.google.cloud.dialogflow.v2.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.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.v2.stub.EnvironmentsStubSettings; +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 EnvironmentsClient}. + * + *

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 listEnvironmentsPagedCallable to 30 seconds: + * + *

+ * 
+ * EnvironmentsSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .listEnvironmentsSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder.listEnvironmentsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsSettings extends ClientSettings { + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).listEnvironmentsSettings(); + } + + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) + throws IOException { + return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EnvironmentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EnvironmentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EnvironmentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EnvironmentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EnvironmentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EnvironmentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnvironmentsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 EnvironmentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EnvironmentsSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(EnvironmentsStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(EnvironmentsStubSettings.newBuilder()); + } + + protected Builder(EnvironmentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EnvironmentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { + return ((EnvironmentsStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return getStubSettingsBuilder().listEnvironmentsSettings(); + } + + @Override + public EnvironmentsSettings build() throws IOException { + return new EnvironmentsSettings(this); + } + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsClient.java index 3af5bb595..cefadc2ea 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsClient.java @@ -77,7 +77,7 @@ * * try (IntentsClient intentsClient = IntentsClient.create()) { * IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); - * Intent response = intentsClient.getIntent(name); + * intentsClient.deleteIntent(name); * } * *

@@ -197,6 +197,247 @@ public final OperationsClient getOperationsClient() { return operationsClient; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
+   *   intentsClient.deleteIntent(name);
+   * }
+   * 
+ * + * @param name Required. The name of the intent to delete. If this intent has direct or indirect + * followup intents, we also delete them. Format: `projects/<Project + * ID>/agent/intents/<Intent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIntent(IntentName name) { + DeleteIntentRequest request = + DeleteIntentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteIntent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
+   *   intentsClient.deleteIntent(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the intent to delete. If this intent has direct or indirect + * followup intents, we also delete them. Format: `projects/<Project + * ID>/agent/intents/<Intent ID>`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteIntent(String name) { + DeleteIntentRequest request = DeleteIntentRequest.newBuilder().setName(name).build(); + deleteIntent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
+   *   DeleteIntentRequest request = DeleteIntentRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   intentsClient.deleteIntent(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 deleteIntent(DeleteIntentRequest request) { + deleteIntentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified intent and its direct or indirect followup intents. + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
+   *   DeleteIntentRequest request = DeleteIntentRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = intentsClient.deleteIntentCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteIntentCallable() { + return stub.deleteIntentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes intents in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<Intent> intents = new ArrayList<>();
+   *   intentsClient.batchDeleteIntentsAsync(parent, intents).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the agent to delete all entities types for. Format: + * `projects/<Project ID>/agent`. + * @param intents Required. The collection of intents to delete. Only intent `name` must be filled + * in. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteIntentsAsync( + AgentName parent, List intents) { + BatchDeleteIntentsRequest request = + BatchDeleteIntentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .addAllIntents(intents) + .build(); + return batchDeleteIntentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes intents in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<Intent> intents = new ArrayList<>();
+   *   intentsClient.batchDeleteIntentsAsync(parent.toString(), intents).get();
+   * }
+   * 
+ * + * @param parent Required. The name of the agent to delete all entities types for. Format: + * `projects/<Project ID>/agent`. + * @param intents Required. The collection of intents to delete. Only intent `name` must be filled + * in. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteIntentsAsync( + String parent, List intents) { + BatchDeleteIntentsRequest request = + BatchDeleteIntentsRequest.newBuilder().setParent(parent).addAllIntents(intents).build(); + return batchDeleteIntentsAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes intents in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<Intent> intents = new ArrayList<>();
+   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllIntents(intents)
+   *     .build();
+   *   intentsClient.batchDeleteIntentsAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchDeleteIntentsAsync( + BatchDeleteIntentsRequest request) { + return batchDeleteIntentsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes intents in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<Intent> intents = new ArrayList<>();
+   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllIntents(intents)
+   *     .build();
+   *   OperationFuture<Empty, Struct> future = intentsClient.batchDeleteIntentsOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchDeleteIntentsOperationCallable() { + return stub.batchDeleteIntentsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes intents in the specified agent. + * + *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> + * + *

Sample code: + * + *


+   * try (IntentsClient intentsClient = IntentsClient.create()) {
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   List<Intent> intents = new ArrayList<>();
+   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .addAllIntents(intents)
+   *     .build();
+   *   ApiFuture<Operation> future = intentsClient.batchDeleteIntentsCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable batchDeleteIntentsCallable() { + return stub.batchDeleteIntentsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns the list of all intents in the specified agent. @@ -205,7 +446,7 @@ public final OperationsClient getOperationsClient() { * *

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   for (Intent element : intentsClient.listIntents(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -216,7 +457,7 @@ public final OperationsClient getOperationsClient() {
    *     ID>/agent`.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListIntentsPagedResponse listIntents(ProjectAgentName parent) {
+  public final ListIntentsPagedResponse listIntents(AgentName parent) {
     ListIntentsRequest request =
         ListIntentsRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -232,7 +473,7 @@ public final ListIntentsPagedResponse listIntents(ProjectAgentName parent) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   for (Intent element : intentsClient.listIntents(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -256,7 +497,7 @@ public final ListIntentsPagedResponse listIntents(String parent) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   String languageCode = "";
    *   for (Intent element : intentsClient.listIntents(parent, languageCode).iterateAll()) {
    *     // doThingsWith(element);
@@ -272,7 +513,7 @@ public final ListIntentsPagedResponse listIntents(String parent) {
    *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final ListIntentsPagedResponse listIntents(ProjectAgentName parent, String languageCode) {
+  public final ListIntentsPagedResponse listIntents(AgentName parent, String languageCode) {
     ListIntentsRequest request =
         ListIntentsRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -289,7 +530,7 @@ public final ListIntentsPagedResponse listIntents(ProjectAgentName parent, Strin
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   String languageCode = "";
    *   for (Intent element : intentsClient.listIntents(parent.toString(), languageCode).iterateAll()) {
    *     // doThingsWith(element);
@@ -319,7 +560,7 @@ public final ListIntentsPagedResponse listIntents(String parent, String language
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListIntentsRequest request = ListIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -344,7 +585,7 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListIntentsRequest request = ListIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -369,7 +610,7 @@ public final ListIntentsPagedResponse listIntents(ListIntentsRequest request) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   ListIntentsRequest request = ListIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -549,7 +790,7 @@ public final UnaryCallable getIntentCallable() {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   Intent response = intentsClient.createIntent(parent, intent);
    * }
@@ -560,7 +801,7 @@ public final UnaryCallable getIntentCallable() {
    * @param intent Required. The intent to create.
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final Intent createIntent(ProjectAgentName parent, Intent intent) {
+  public final Intent createIntent(AgentName parent, Intent intent) {
     CreateIntentRequest request =
         CreateIntentRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -577,7 +818,7 @@ public final Intent createIntent(ProjectAgentName parent, Intent intent) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   Intent response = intentsClient.createIntent(parent.toString(), intent);
    * }
@@ -602,7 +843,7 @@ public final Intent createIntent(String parent, Intent intent) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   String languageCode = "";
    *   Intent response = intentsClient.createIntent(parent, intent, languageCode);
@@ -618,7 +859,7 @@ public final Intent createIntent(String parent, Intent intent) {
    *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
-  public final Intent createIntent(ProjectAgentName parent, Intent intent, String languageCode) {
+  public final Intent createIntent(AgentName parent, Intent intent, String languageCode) {
     CreateIntentRequest request =
         CreateIntentRequest.newBuilder()
             .setParent(parent == null ? null : parent.toString())
@@ -636,7 +877,7 @@ public final Intent createIntent(ProjectAgentName parent, Intent intent, String
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   String languageCode = "";
    *   Intent response = intentsClient.createIntent(parent.toString(), intent, languageCode);
@@ -670,7 +911,7 @@ public final Intent createIntent(String parent, Intent intent, String languageCo
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   CreateIntentRequest request = CreateIntentRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -695,7 +936,7 @@ public final Intent createIntent(CreateIntentRequest request) {
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   Intent intent = Intent.newBuilder().build();
    *   CreateIntentRequest request = CreateIntentRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -818,94 +1059,142 @@ public final UnaryCallable updateIntentCallable() {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Deletes the specified intent and its direct or indirect followup intents.
+   * Updates/Creates multiple intents in the specified agent.
+   *
+   * 

Operation <response: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]> * *

Sample code: * *


    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
-   *   intentsClient.deleteIntent(name);
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   String intentBatchUri = "";
+   *   BatchUpdateIntentsResponse response = intentsClient.batchUpdateIntentsAsync(parent, intentBatchUri).get();
    * }
    * 
* - * @param name Required. The name of the intent to delete. If this intent has direct or indirect - * followup intents, we also delete them. Format: `projects/<Project - * ID>/agent/intents/<Intent ID>`. + * @param parent Required. The name of the agent to update or create intents in. Format: + * `projects/<Project ID>/agent`. + * @param intentBatchUri The URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch type) or JSON + * object. Note: The URI must start with "gs://". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIntent(IntentName name) { - DeleteIntentRequest request = - DeleteIntentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteIntent(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateIntentsAsync( + AgentName parent, String intentBatchUri) { + BatchUpdateIntentsRequest request = + BatchUpdateIntentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIntentBatchUri(intentBatchUri) + .build(); + return batchUpdateIntentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified intent and its direct or indirect followup intents. + * Updates/Creates multiple intents in the specified agent. + * + *

Operation <response: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]> * *

Sample code: * *


    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
-   *   intentsClient.deleteIntent(name.toString());
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   String intentBatchUri = "";
+   *   BatchUpdateIntentsResponse response = intentsClient.batchUpdateIntentsAsync(parent.toString(), intentBatchUri).get();
    * }
    * 
* - * @param name Required. The name of the intent to delete. If this intent has direct or indirect - * followup intents, we also delete them. Format: `projects/<Project - * ID>/agent/intents/<Intent ID>`. + * @param parent Required. The name of the agent to update or create intents in. Format: + * `projects/<Project ID>/agent`. + * @param intentBatchUri The URI to a Google Cloud Storage file containing intents to update or + * create. The file format can either be a serialized proto (of IntentBatch type) or JSON + * object. Note: The URI must start with "gs://". * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIntent(String name) { - DeleteIntentRequest request = DeleteIntentRequest.newBuilder().setName(name).build(); - deleteIntent(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateIntentsAsync( + String parent, String intentBatchUri) { + BatchUpdateIntentsRequest request = + BatchUpdateIntentsRequest.newBuilder() + .setParent(parent) + .setIntentBatchUri(intentBatchUri) + .build(); + return batchUpdateIntentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified intent and its direct or indirect followup intents. + * Updates/Creates multiple intents in the specified agent. + * + *

Operation <response: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]> * *

Sample code: * *


    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
-   *   DeleteIntentRequest request = DeleteIntentRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   intentsClient.deleteIntent(request);
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   IntentBatch intentBatchInline = IntentBatch.newBuilder().build();
+   *   BatchUpdateIntentsResponse response = intentsClient.batchUpdateIntentsAsync(parent, intentBatchInline).get();
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param parent Required. The name of the agent to update or create intents in. Format: + * `projects/<Project ID>/agent`. + * @param intentBatchInline The collection of intents to update or create. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final void deleteIntent(DeleteIntentRequest request) { - deleteIntentCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateIntentsAsync( + AgentName parent, IntentBatch intentBatchInline) { + BatchUpdateIntentsRequest request = + BatchUpdateIntentsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setIntentBatchInline(intentBatchInline) + .build(); + return batchUpdateIntentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified intent and its direct or indirect followup intents. + * Updates/Creates multiple intents in the specified agent. + * + *

Operation <response: + * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]> * *

Sample code: * *


    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   IntentName name = IntentName.of("[PROJECT]", "[INTENT]");
-   *   DeleteIntentRequest request = DeleteIntentRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> future = intentsClient.deleteIntentCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
+   *   AgentName parent = AgentName.of("[PROJECT]");
+   *   IntentBatch intentBatchInline = IntentBatch.newBuilder().build();
+   *   BatchUpdateIntentsResponse response = intentsClient.batchUpdateIntentsAsync(parent.toString(), intentBatchInline).get();
    * }
    * 
+ * + * @param parent Required. The name of the agent to update or create intents in. Format: + * `projects/<Project ID>/agent`. + * @param intentBatchInline The collection of intents to update or create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable deleteIntentCallable() { - return stub.deleteIntentCallable(); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchUpdateIntentsAsync( + String parent, IntentBatch intentBatchInline) { + BatchUpdateIntentsRequest request = + BatchUpdateIntentsRequest.newBuilder() + .setParent(parent) + .setIntentBatchInline(intentBatchInline) + .build(); + return batchUpdateIntentsAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -919,7 +1208,7 @@ public final UnaryCallable deleteIntentCallable() { * *

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   BatchUpdateIntentsRequest request = BatchUpdateIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -948,7 +1237,7 @@ public final OperationFuture batchUpdateInte
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   BatchUpdateIntentsRequest request = BatchUpdateIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -975,7 +1264,7 @@ public final OperationFuture batchUpdateInte
    *
    * 

    * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
+   *   AgentName parent = AgentName.of("[PROJECT]");
    *   BatchUpdateIntentsRequest request = BatchUpdateIntentsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -989,155 +1278,6 @@ public final UnaryCallable batchUpdateInte
     return stub.batchUpdateIntentsCallable();
   }
 
-  // AUTO-GENERATED DOCUMENTATION AND METHOD
-  /**
-   * Deletes intents in the specified agent.
-   *
-   * 

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<Intent> intents = new ArrayList<>();
-   *   intentsClient.batchDeleteIntentsAsync(parent, intents).get();
-   * }
-   * 
- * - * @param parent Required. The name of the agent to delete all entities types for. Format: - * `projects/<Project ID>/agent`. - * @param intents Required. The collection of intents to delete. Only intent `name` must be filled - * in. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteIntentsAsync( - ProjectAgentName parent, List intents) { - BatchDeleteIntentsRequest request = - BatchDeleteIntentsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .addAllIntents(intents) - .build(); - return batchDeleteIntentsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes intents in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<Intent> intents = new ArrayList<>();
-   *   intentsClient.batchDeleteIntentsAsync(parent.toString(), intents).get();
-   * }
-   * 
- * - * @param parent Required. The name of the agent to delete all entities types for. Format: - * `projects/<Project ID>/agent`. - * @param intents Required. The collection of intents to delete. Only intent `name` must be filled - * in. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteIntentsAsync( - String parent, List intents) { - BatchDeleteIntentsRequest request = - BatchDeleteIntentsRequest.newBuilder().setParent(parent).addAllIntents(intents).build(); - return batchDeleteIntentsAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes intents in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<Intent> intents = new ArrayList<>();
-   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllIntents(intents)
-   *     .build();
-   *   intentsClient.batchDeleteIntentsAsync(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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchDeleteIntentsAsync( - BatchDeleteIntentsRequest request) { - return batchDeleteIntentsOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes intents in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<Intent> intents = new ArrayList<>();
-   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllIntents(intents)
-   *     .build();
-   *   OperationFuture<Empty, Struct> future = intentsClient.batchDeleteIntentsOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchDeleteIntentsOperationCallable() { - return stub.batchDeleteIntentsOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes intents in the specified agent. - * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty]> - * - *

Sample code: - * - *


-   * try (IntentsClient intentsClient = IntentsClient.create()) {
-   *   ProjectAgentName parent = ProjectAgentName.of("[PROJECT]");
-   *   List<Intent> intents = new ArrayList<>();
-   *   BatchDeleteIntentsRequest request = BatchDeleteIntentsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .addAllIntents(intents)
-   *     .build();
-   *   ApiFuture<Operation> future = intentsClient.batchDeleteIntentsCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable batchDeleteIntentsCallable() { - return stub.batchDeleteIntentsCallable(); - } - @Override public final void close() { stub.close(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsSettings.java index fec6b7a98..7d4692ec9 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/IntentsSettings.java @@ -52,16 +52,16 @@ *

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 getIntent to 30 seconds: + *

For example, to set the total timeout of deleteIntent to 30 seconds: * *

  * 
  * IntentsSettings.Builder intentsSettingsBuilder =
  *     IntentsSettings.newBuilder();
  * intentsSettingsBuilder
- *     .getIntentSettings()
+ *     .deleteIntentSettings()
  *     .setRetrySettings(
- *         intentsSettingsBuilder.getIntentSettings().getRetrySettings().toBuilder()
+ *         intentsSettingsBuilder.deleteIntentSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * IntentsSettings intentsSettings = intentsSettingsBuilder.build();
@@ -71,6 +71,24 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class IntentsSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteIntent. */
+  public UnaryCallSettings deleteIntentSettings() {
+    return ((IntentsStubSettings) getStubSettings()).deleteIntentSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteIntents. */
+  public UnaryCallSettings batchDeleteIntentsSettings() {
+    return ((IntentsStubSettings) getStubSettings()).batchDeleteIntentsSettings();
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteIntents. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteIntentsOperationSettings() {
+    return ((IntentsStubSettings) getStubSettings()).batchDeleteIntentsOperationSettings();
+  }
+
   /** Returns the object with the settings used for calls to listIntents. */
   public PagedCallSettings
       listIntentsSettings() {
@@ -92,11 +110,6 @@ public UnaryCallSettings updateIntentSettings() {
     return ((IntentsStubSettings) getStubSettings()).updateIntentSettings();
   }
 
-  /** Returns the object with the settings used for calls to deleteIntent. */
-  public UnaryCallSettings deleteIntentSettings() {
-    return ((IntentsStubSettings) getStubSettings()).deleteIntentSettings();
-  }
-
   /** Returns the object with the settings used for calls to batchUpdateIntents. */
   public UnaryCallSettings batchUpdateIntentsSettings() {
     return ((IntentsStubSettings) getStubSettings()).batchUpdateIntentsSettings();
@@ -110,19 +123,6 @@ public UnaryCallSettings batchUpdateIntent
     return ((IntentsStubSettings) getStubSettings()).batchUpdateIntentsOperationSettings();
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteIntents. */
-  public UnaryCallSettings batchDeleteIntentsSettings() {
-    return ((IntentsStubSettings) getStubSettings()).batchDeleteIntentsSettings();
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteIntents. */
-  @BetaApi(
-      "The surface for long-running operations is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteIntentsOperationSettings() {
-    return ((IntentsStubSettings) getStubSettings()).batchDeleteIntentsOperationSettings();
-  }
-
   public static final IntentsSettings create(IntentsStubSettings stub) throws IOException {
     return new IntentsSettings.Builder(stub.toBuilder()).build();
   }
@@ -219,6 +219,25 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteIntent. */
+    public UnaryCallSettings.Builder deleteIntentSettings() {
+      return getStubSettingsBuilder().deleteIntentSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
+    public UnaryCallSettings.Builder
+        batchDeleteIntentsSettings() {
+      return getStubSettingsBuilder().batchDeleteIntentsSettings();
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteIntentsOperationSettings() {
+      return getStubSettingsBuilder().batchDeleteIntentsOperationSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listIntents. */
     public PagedCallSettings.Builder<
             ListIntentsRequest, ListIntentsResponse, ListIntentsPagedResponse>
@@ -241,11 +260,6 @@ public UnaryCallSettings.Builder updateIntentSettin
       return getStubSettingsBuilder().updateIntentSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteIntent. */
-    public UnaryCallSettings.Builder deleteIntentSettings() {
-      return getStubSettingsBuilder().deleteIntentSettings();
-    }
-
     /** Returns the builder for the settings used for calls to batchUpdateIntents. */
     public UnaryCallSettings.Builder
         batchUpdateIntentsSettings() {
@@ -261,20 +275,6 @@ public UnaryCallSettings.Builder deleteIntentSetting
       return getStubSettingsBuilder().batchUpdateIntentsOperationSettings();
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
-    public UnaryCallSettings.Builder
-        batchDeleteIntentsSettings() {
-      return getStubSettingsBuilder().batchDeleteIntentsSettings();
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
-    @BetaApi(
-        "The surface for long-running operations is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteIntentsOperationSettings() {
-      return getStubSettingsBuilder().batchDeleteIntentsOperationSettings();
-    }
-
     @Override
     public IntentsSettings build() throws IOException {
       return new IntentsSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClient.java
index 4f92e6e9f..7b7f6e8f6 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClient.java
@@ -29,6 +29,7 @@
 import com.google.cloud.dialogflow.v2.stub.SessionEntityTypesStubSettings;
 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;
@@ -56,8 +57,8 @@
  * 
  * 
  * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
- *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
- *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   sessionEntityTypesClient.deleteSessionEntityType(name);
  * }
  * 
  * 
@@ -167,6 +168,120 @@ public SessionEntityTypesStub getStub() { return stub; } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified session entity type. + * + *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if + * you need to use session entities with Google Assistant integration. + * + *

Sample code: + * + *


+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   sessionEntityTypesClient.deleteSessionEntityType(name);
+   * }
+   * 
+ * + * @param name Required. The name of the entity type to delete. Format: `projects/<Project + * ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or + * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + * ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If + * `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is + * not specified, we assume default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSessionEntityType(SessionEntityTypeName name) { + DeleteSessionEntityTypeRequest request = + DeleteSessionEntityTypeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteSessionEntityType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified session entity type. + * + *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if + * you need to use session entities with Google Assistant integration. + * + *

Sample code: + * + *


+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   sessionEntityTypesClient.deleteSessionEntityType(name.toString());
+   * }
+   * 
+ * + * @param name Required. The name of the entity type to delete. Format: `projects/<Project + * ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or + * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User + * ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If + * `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is + * not specified, we assume default '-' user. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteSessionEntityType(String name) { + DeleteSessionEntityTypeRequest request = + DeleteSessionEntityTypeRequest.newBuilder().setName(name).build(); + deleteSessionEntityType(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified session entity type. + * + *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if + * you need to use session entities with Google Assistant integration. + * + *

Sample code: + * + *


+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   sessionEntityTypesClient.deleteSessionEntityType(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 deleteSessionEntityType(DeleteSessionEntityTypeRequest request) { + deleteSessionEntityTypeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified session entity type. + * + *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if + * you need to use session entities with Google Assistant integration. + * + *

Sample code: + * + *


+   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = sessionEntityTypesClient.deleteSessionEntityTypeCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + deleteSessionEntityTypeCallable() { + return stub.deleteSessionEntityTypeCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Returns the list of all session entity types in the specified session. @@ -178,7 +293,7 @@ public SessionEntityTypesStub getStub() { * *

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   for (SessionEntityType element : sessionEntityTypesClient.listSessionEntityTypes(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -211,7 +326,7 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(SessionN
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   for (SessionEntityType element : sessionEntityTypesClient.listSessionEntityTypes(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -242,7 +357,7 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(String p
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -271,7 +386,7 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -299,7 +414,7 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   ListSessionEntityTypesRequest request = ListSessionEntityTypesRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
@@ -334,7 +449,7 @@ public final ListSessionEntityTypesPagedResponse listSessionEntityTypes(
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
    *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
    * }
    * 
@@ -366,7 +481,7 @@ public final SessionEntityType getSessionEntityType(SessionEntityTypeName name) * *

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
    *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name.toString());
    * }
    * 
@@ -396,7 +511,7 @@ public final SessionEntityType getSessionEntityType(String name) { * *

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
    *   GetSessionEntityTypeRequest request = GetSessionEntityTypeRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -422,7 +537,7 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+   *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
    *   GetSessionEntityTypeRequest request = GetSessionEntityTypeRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -450,7 +565,7 @@ public final SessionEntityType getSessionEntityType(GetSessionEntityTypeRequest
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
    *   SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(parent, sessionEntityType);
    * }
@@ -487,7 +602,7 @@ public final SessionEntityType createSessionEntityType(
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
    *   SessionEntityType response = sessionEntityTypesClient.createSessionEntityType(parent.toString(), sessionEntityType);
    * }
@@ -524,7 +639,7 @@ public final SessionEntityType createSessionEntityType(
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
    *   CreateSessionEntityTypeRequest request = CreateSessionEntityTypeRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -554,7 +669,7 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe
    *
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionName parent = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
    *   CreateSessionEntityTypeRequest request = CreateSessionEntityTypeRequest.newBuilder()
    *     .setParent(parent.toString())
@@ -608,18 +723,23 @@ public final SessionEntityType updateSessionEntityType(SessionEntityType session
    * 

    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
    *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
-   *   UpdateSessionEntityTypeRequest request = UpdateSessionEntityTypeRequest.newBuilder()
-   *     .setSessionEntityType(sessionEntityType)
-   *     .build();
-   *   SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(request);
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(sessionEntityType, updateMask);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param sessionEntityType Required. The session entity type to update. + * @param updateMask Optional. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRequest request) { - return updateSessionEntityTypeCallable().call(request); + public final SessionEntityType updateSessionEntityType( + SessionEntityType sessionEntityType, FieldMask updateMask) { + UpdateSessionEntityTypeRequest request = + UpdateSessionEntityTypeRequest.newBuilder() + .setSessionEntityType(sessionEntityType) + .setUpdateMask(updateMask) + .build(); + return updateSessionEntityType(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -637,108 +757,20 @@ public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRe * UpdateSessionEntityTypeRequest request = UpdateSessionEntityTypeRequest.newBuilder() * .setSessionEntityType(sessionEntityType) * .build(); - * ApiFuture<SessionEntityType> future = sessionEntityTypesClient.updateSessionEntityTypeCallable().futureCall(request); - * // Do something - * SessionEntityType response = future.get(); - * } - *
- */ - public final UnaryCallable - updateSessionEntityTypeCallable() { - return stub.updateSessionEntityTypeCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified session entity type. - * - *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if - * you need to use session entities with Google Assistant integration. - * - *

Sample code: - * - *


-   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
-   *   sessionEntityTypesClient.deleteSessionEntityType(name);
-   * }
-   * 
- * - * @param name Required. The name of the entity type to delete. Format: `projects/<Project - * ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or - * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - * ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If - * `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is - * not specified, we assume default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteSessionEntityType(SessionEntityTypeName name) { - DeleteSessionEntityTypeRequest request = - DeleteSessionEntityTypeRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteSessionEntityType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified session entity type. - * - *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if - * you need to use session entities with Google Assistant integration. - * - *

Sample code: - * - *


-   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
-   *   sessionEntityTypesClient.deleteSessionEntityType(name.toString());
-   * }
-   * 
- * - * @param name Required. The name of the entity type to delete. Format: `projects/<Project - * ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or - * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - * ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If - * `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is - * not specified, we assume default '-' user. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteSessionEntityType(String name) { - DeleteSessionEntityTypeRequest request = - DeleteSessionEntityTypeRequest.newBuilder().setName(name).build(); - deleteSessionEntityType(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes the specified session entity type. - * - *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if - * you need to use session entities with Google Assistant integration. - * - *

Sample code: - * - *


-   * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
-   *   DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   sessionEntityTypesClient.deleteSessionEntityType(request);
+   *   SessionEntityType response = sessionEntityTypesClient.updateSessionEntityType(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 deleteSessionEntityType(DeleteSessionEntityTypeRequest request) { - deleteSessionEntityTypeCallable().call(request); + public final SessionEntityType updateSessionEntityType(UpdateSessionEntityTypeRequest request) { + return updateSessionEntityTypeCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes the specified session entity type. + * Updates the specified session entity type. * *

This method doesn't work with Google Assistant integration. Contact Dialogflow support if * you need to use session entities with Google Assistant integration. @@ -747,19 +779,19 @@ public final void deleteSessionEntityType(DeleteSessionEntityTypeRequest request * *


    * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
-   *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
-   *   DeleteSessionEntityTypeRequest request = DeleteSessionEntityTypeRequest.newBuilder()
-   *     .setName(name.toString())
+   *   SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build();
+   *   UpdateSessionEntityTypeRequest request = UpdateSessionEntityTypeRequest.newBuilder()
+   *     .setSessionEntityType(sessionEntityType)
    *     .build();
-   *   ApiFuture<Void> future = sessionEntityTypesClient.deleteSessionEntityTypeCallable().futureCall(request);
+   *   ApiFuture<SessionEntityType> future = sessionEntityTypesClient.updateSessionEntityTypeCallable().futureCall(request);
    *   // Do something
-   *   future.get();
+   *   SessionEntityType response = future.get();
    * }
    * 
*/ - public final UnaryCallable - deleteSessionEntityTypeCallable() { - return stub.deleteSessionEntityTypeCallable(); + public final UnaryCallable + updateSessionEntityTypeCallable() { + return stub.updateSessionEntityTypeCallable(); } @Override diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesSettings.java index cb9f2ee6e..fb8b641c8 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypesSettings.java @@ -49,16 +49,16 @@ *

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 getSessionEntityType to 30 seconds: + *

For example, to set the total timeout of deleteSessionEntityType to 30 seconds: * *

  * 
  * SessionEntityTypesSettings.Builder sessionEntityTypesSettingsBuilder =
  *     SessionEntityTypesSettings.newBuilder();
  * sessionEntityTypesSettingsBuilder
- *     .getSessionEntityTypeSettings()
+ *     .deleteSessionEntityTypeSettings()
  *     .setRetrySettings(
- *         sessionEntityTypesSettingsBuilder.getSessionEntityTypeSettings().getRetrySettings().toBuilder()
+ *         sessionEntityTypesSettingsBuilder.deleteSessionEntityTypeSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SessionEntityTypesSettings sessionEntityTypesSettings = sessionEntityTypesSettingsBuilder.build();
@@ -68,6 +68,12 @@
 @Generated("by gapic-generator")
 @BetaApi
 public class SessionEntityTypesSettings extends ClientSettings {
+  /** Returns the object with the settings used for calls to deleteSessionEntityType. */
+  public UnaryCallSettings
+      deleteSessionEntityTypeSettings() {
+    return ((SessionEntityTypesStubSettings) getStubSettings()).deleteSessionEntityTypeSettings();
+  }
+
   /** Returns the object with the settings used for calls to listSessionEntityTypes. */
   public PagedCallSettings<
           ListSessionEntityTypesRequest,
@@ -95,12 +101,6 @@ public class SessionEntityTypesSettings extends ClientSettings
-      deleteSessionEntityTypeSettings() {
-    return ((SessionEntityTypesStubSettings) getStubSettings()).deleteSessionEntityTypeSettings();
-  }
-
   public static final SessionEntityTypesSettings create(SessionEntityTypesStubSettings stub)
       throws IOException {
     return new SessionEntityTypesSettings.Builder(stub.toBuilder()).build();
@@ -198,6 +198,12 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
+    /** Returns the builder for the settings used for calls to deleteSessionEntityType. */
+    public UnaryCallSettings.Builder
+        deleteSessionEntityTypeSettings() {
+      return getStubSettingsBuilder().deleteSessionEntityTypeSettings();
+    }
+
     /** Returns the builder for the settings used for calls to listSessionEntityTypes. */
     public PagedCallSettings.Builder<
             ListSessionEntityTypesRequest,
@@ -225,12 +231,6 @@ public Builder applyToAllUnaryMethods(
       return getStubSettingsBuilder().updateSessionEntityTypeSettings();
     }
 
-    /** Returns the builder for the settings used for calls to deleteSessionEntityType. */
-    public UnaryCallSettings.Builder
-        deleteSessionEntityTypeSettings() {
-      return getStubSettingsBuilder().deleteSessionEntityTypeSettings();
-    }
-
     @Override
     public SessionEntityTypesSettings build() throws IOException {
       return new SessionEntityTypesSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java
index 14faf29a9..c8ae361f8 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/SessionsClient.java
@@ -38,7 +38,7 @@
  * 
  * 
  * try (SessionsClient sessionsClient = SessionsClient.create()) {
- *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+ *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
  *   QueryInput queryInput = QueryInput.newBuilder().build();
  *   DetectIntentResponse response = sessionsClient.detectIntent(session, queryInput);
  * }
@@ -157,7 +157,7 @@ public SessionsStub getStub() {
    *
    * 

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   QueryInput queryInput = QueryInput.newBuilder().build();
    *   DetectIntentResponse response = sessionsClient.detectIntent(session, queryInput);
    * }
@@ -197,7 +197,7 @@ public final DetectIntentResponse detectIntent(SessionName session, QueryInput q
    *
    * 

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   QueryInput queryInput = QueryInput.newBuilder().build();
    *   DetectIntentResponse response = sessionsClient.detectIntent(session.toString(), queryInput);
    * }
@@ -234,7 +234,7 @@ public final DetectIntentResponse detectIntent(String session, QueryInput queryI
    *
    * 

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   QueryInput queryInput = QueryInput.newBuilder().build();
    *   DetectIntentRequest request = DetectIntentRequest.newBuilder()
    *     .setSession(session.toString())
@@ -261,7 +261,7 @@ public final DetectIntentResponse detectIntent(DetectIntentRequest request) {
    *
    * 

    * try (SessionsClient sessionsClient = SessionsClient.create()) {
-   *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+   *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   QueryInput queryInput = QueryInput.newBuilder().build();
    *   DetectIntentRequest request = DetectIntentRequest.newBuilder()
    *     .setSession(session.toString())
@@ -290,10 +290,10 @@ public final UnaryCallable detectInte
    *   BidiStream<StreamingDetectIntentRequest, StreamingDetectIntentResponse> bidiStream =
    *       sessionsClient.streamingDetectIntentCallable().call();
    *
-   *   String session = "";
+   *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
    *   QueryInput queryInput = QueryInput.newBuilder().build();
    *   StreamingDetectIntentRequest request = StreamingDetectIntentRequest.newBuilder()
-   *     .setSession(session)
+   *     .setSession(session.toString())
    *     .setQueryInput(queryInput)
    *     .build();
    *   bidiStream.send(request);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/package-info.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/package-info.java
index 0197ffacd..b24213259 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/package-info.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/package-info.java
@@ -80,8 +80,8 @@
  * 
  * 
  * try (ContextsClient contextsClient = ContextsClient.create()) {
- *   ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]");
- *   Context response = contextsClient.getContext(name);
+ *   ContextName name = ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]");
+ *   contextsClient.deleteContext(name);
  * }
  * 
  * 
@@ -120,7 +120,25 @@ * * try (EntityTypesClient entityTypesClient = EntityTypesClient.create()) { * EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - * EntityType response = entityTypesClient.getEntityType(name); + * entityTypesClient.deleteEntityType(name); + * } + * + *
+ * + * ================== EnvironmentsClient ================== + * + *

Service Description: Manages agent environments. + * + *

Sample for EnvironmentsClient: + * + *

+ * 
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   AgentName parent = AgentName.of("[PROJECT]");
+ *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder()
+ *     .setParent(parent.toString())
+ *     .build();
+ *   ListEnvironmentsPagedResponse response = environmentsClient.listEnvironmentsPagedCallable(request);
  * }
  * 
  * 
@@ -161,7 +179,7 @@ * * try (IntentsClient intentsClient = IntentsClient.create()) { * IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); - * Intent response = intentsClient.getIntent(name); + * intentsClient.deleteIntent(name); * } * *
@@ -187,8 +205,8 @@ *
  * 
  * try (SessionEntityTypesClient sessionEntityTypesClient = SessionEntityTypesClient.create()) {
- *   SessionEntityTypeName name = SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
- *   SessionEntityType response = sessionEntityTypesClient.getSessionEntityType(name);
+ *   SessionEntityTypeName name = SessionEntityTypeName.ofProjectSessionEntityTypeName("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]");
+ *   sessionEntityTypesClient.deleteSessionEntityType(name);
  * }
  * 
  * 
@@ -205,7 +223,7 @@ *
  * 
  * try (SessionsClient sessionsClient = SessionsClient.create()) {
- *   SessionName session = SessionName.of("[PROJECT]", "[SESSION]");
+ *   SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]");
  *   QueryInput queryInput = QueryInput.newBuilder().build();
  *   DetectIntentResponse response = sessionsClient.detectIntent(session, queryInput);
  * }
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStub.java
index ec31e7dc2..e14e1b099 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStub.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStub.java
@@ -63,10 +63,6 @@ public UnaryCallable deleteAgentCallable() {
     throw new UnsupportedOperationException("Not implemented: deleteAgentCallable()");
   }
 
-  public UnaryCallable getAgentCallable() {
-    throw new UnsupportedOperationException("Not implemented: getAgentCallable()");
-  }
-
   public UnaryCallable searchAgentsPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: searchAgentsPagedCallable()");
   }
@@ -95,21 +91,25 @@ public UnaryCallable exportAgentCallable() {
   }
 
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable importAgentOperationCallable() {
-    throw new UnsupportedOperationException("Not implemented: importAgentOperationCallable()");
+  public OperationCallable restoreAgentOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: restoreAgentOperationCallable()");
   }
 
-  public UnaryCallable importAgentCallable() {
-    throw new UnsupportedOperationException("Not implemented: importAgentCallable()");
+  public UnaryCallable restoreAgentCallable() {
+    throw new UnsupportedOperationException("Not implemented: restoreAgentCallable()");
+  }
+
+  public UnaryCallable getAgentCallable() {
+    throw new UnsupportedOperationException("Not implemented: getAgentCallable()");
   }
 
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable restoreAgentOperationCallable() {
-    throw new UnsupportedOperationException("Not implemented: restoreAgentOperationCallable()");
+  public OperationCallable importAgentOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: importAgentOperationCallable()");
   }
 
-  public UnaryCallable restoreAgentCallable() {
-    throw new UnsupportedOperationException("Not implemented: restoreAgentCallable()");
+  public UnaryCallable importAgentCallable() {
+    throw new UnsupportedOperationException("Not implemented: importAgentCallable()");
   }
 
   public UnaryCallable getValidationResultCallable() {
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java
index ada63ab7d..e0c378984 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/AgentsStubSettings.java
@@ -111,7 +111,6 @@ public class AgentsStubSettings extends StubSettings {
 
   private final UnaryCallSettings setAgentSettings;
   private final UnaryCallSettings deleteAgentSettings;
-  private final UnaryCallSettings getAgentSettings;
   private final PagedCallSettings<
           SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse>
       searchAgentsSettings;
@@ -120,12 +119,13 @@ public class AgentsStubSettings extends StubSettings {
   private final UnaryCallSettings exportAgentSettings;
   private final OperationCallSettings
       exportAgentOperationSettings;
-  private final UnaryCallSettings importAgentSettings;
-  private final OperationCallSettings
-      importAgentOperationSettings;
   private final UnaryCallSettings restoreAgentSettings;
   private final OperationCallSettings
       restoreAgentOperationSettings;
+  private final UnaryCallSettings getAgentSettings;
+  private final UnaryCallSettings importAgentSettings;
+  private final OperationCallSettings
+      importAgentOperationSettings;
   private final UnaryCallSettings
       getValidationResultSettings;
 
@@ -139,11 +139,6 @@ public UnaryCallSettings deleteAgentSettings() {
     return deleteAgentSettings;
   }
 
-  /** Returns the object with the settings used for calls to getAgent. */
-  public UnaryCallSettings getAgentSettings() {
-    return getAgentSettings;
-  }
-
   /** Returns the object with the settings used for calls to searchAgents. */
   public PagedCallSettings
       searchAgentsSettings() {
@@ -173,17 +168,6 @@ public UnaryCallSettings exportAgentSettings() {
     return exportAgentOperationSettings;
   }
 
-  /** Returns the object with the settings used for calls to importAgent. */
-  public UnaryCallSettings importAgentSettings() {
-    return importAgentSettings;
-  }
-
-  /** Returns the object with the settings used for calls to importAgent. */
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallSettings importAgentOperationSettings() {
-    return importAgentOperationSettings;
-  }
-
   /** Returns the object with the settings used for calls to restoreAgent. */
   public UnaryCallSettings restoreAgentSettings() {
     return restoreAgentSettings;
@@ -195,6 +179,22 @@ public OperationCallSettings restoreAgentOpe
     return restoreAgentOperationSettings;
   }
 
+  /** Returns the object with the settings used for calls to getAgent. */
+  public UnaryCallSettings getAgentSettings() {
+    return getAgentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to importAgent. */
+  public UnaryCallSettings importAgentSettings() {
+    return importAgentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to importAgent. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings importAgentOperationSettings() {
+    return importAgentOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to getValidationResult. */
   public UnaryCallSettings
       getValidationResultSettings() {
@@ -271,16 +271,16 @@ protected AgentsStubSettings(Builder settingsBuilder) throws IOException {
 
     setAgentSettings = settingsBuilder.setAgentSettings().build();
     deleteAgentSettings = settingsBuilder.deleteAgentSettings().build();
-    getAgentSettings = settingsBuilder.getAgentSettings().build();
     searchAgentsSettings = settingsBuilder.searchAgentsSettings().build();
     trainAgentSettings = settingsBuilder.trainAgentSettings().build();
     trainAgentOperationSettings = settingsBuilder.trainAgentOperationSettings().build();
     exportAgentSettings = settingsBuilder.exportAgentSettings().build();
     exportAgentOperationSettings = settingsBuilder.exportAgentOperationSettings().build();
-    importAgentSettings = settingsBuilder.importAgentSettings().build();
-    importAgentOperationSettings = settingsBuilder.importAgentOperationSettings().build();
     restoreAgentSettings = settingsBuilder.restoreAgentSettings().build();
     restoreAgentOperationSettings = settingsBuilder.restoreAgentOperationSettings().build();
+    getAgentSettings = settingsBuilder.getAgentSettings().build();
+    importAgentSettings = settingsBuilder.importAgentSettings().build();
+    importAgentOperationSettings = settingsBuilder.importAgentOperationSettings().build();
     getValidationResultSettings = settingsBuilder.getValidationResultSettings().build();
   }
 
@@ -343,7 +343,6 @@ public static class Builder extends StubSettings.Builder setAgentSettings;
     private final UnaryCallSettings.Builder deleteAgentSettings;
-    private final UnaryCallSettings.Builder getAgentSettings;
     private final PagedCallSettings.Builder<
             SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse>
         searchAgentsSettings;
@@ -353,12 +352,13 @@ public static class Builder extends StubSettings.Builder exportAgentSettings;
     private final OperationCallSettings.Builder
         exportAgentOperationSettings;
-    private final UnaryCallSettings.Builder importAgentSettings;
-    private final OperationCallSettings.Builder
-        importAgentOperationSettings;
     private final UnaryCallSettings.Builder restoreAgentSettings;
     private final OperationCallSettings.Builder
         restoreAgentOperationSettings;
+    private final UnaryCallSettings.Builder getAgentSettings;
+    private final UnaryCallSettings.Builder importAgentSettings;
+    private final OperationCallSettings.Builder
+        importAgentOperationSettings;
     private final UnaryCallSettings.Builder
         getValidationResultSettings;
 
@@ -407,8 +407,6 @@ protected Builder(ClientContext clientContext) {
 
       deleteAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      getAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       searchAgentsSettings = PagedCallSettings.newBuilder(SEARCH_AGENTS_PAGE_STR_FACT);
 
       trainAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -419,26 +417,28 @@ protected Builder(ClientContext clientContext) {
 
       exportAgentOperationSettings = OperationCallSettings.newBuilder();
 
-      importAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      importAgentOperationSettings = OperationCallSettings.newBuilder();
-
       restoreAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       restoreAgentOperationSettings = OperationCallSettings.newBuilder();
 
+      getAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      importAgentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      importAgentOperationSettings = OperationCallSettings.newBuilder();
+
       getValidationResultSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               setAgentSettings,
               deleteAgentSettings,
-              getAgentSettings,
               searchAgentsSettings,
               trainAgentSettings,
               exportAgentSettings,
-              importAgentSettings,
               restoreAgentSettings,
+              getAgentSettings,
+              importAgentSettings,
               getValidationResultSettings);
 
       initDefaults(this);
@@ -465,11 +465,6 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .getAgentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .searchAgentsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
@@ -486,15 +481,20 @@ private static Builder initDefaults(Builder builder) {
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .importAgentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .restoreAgentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .restoreAgentSettings()
+          .getAgentSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
+      builder
+          .importAgentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .getValidationResultSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
@@ -544,10 +544,11 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .importAgentOperationSettings()
+          .restoreAgentOperationSettings()
           .setInitialCallSettings(
-              UnaryCallSettings.newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
@@ -566,11 +567,10 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .restoreAgentOperationSettings()
+          .importAgentOperationSettings()
           .setInitialCallSettings(
-              UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+              UnaryCallSettings.newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
@@ -597,28 +597,28 @@ protected Builder(AgentsStubSettings settings) {
 
       setAgentSettings = settings.setAgentSettings.toBuilder();
       deleteAgentSettings = settings.deleteAgentSettings.toBuilder();
-      getAgentSettings = settings.getAgentSettings.toBuilder();
       searchAgentsSettings = settings.searchAgentsSettings.toBuilder();
       trainAgentSettings = settings.trainAgentSettings.toBuilder();
       trainAgentOperationSettings = settings.trainAgentOperationSettings.toBuilder();
       exportAgentSettings = settings.exportAgentSettings.toBuilder();
       exportAgentOperationSettings = settings.exportAgentOperationSettings.toBuilder();
-      importAgentSettings = settings.importAgentSettings.toBuilder();
-      importAgentOperationSettings = settings.importAgentOperationSettings.toBuilder();
       restoreAgentSettings = settings.restoreAgentSettings.toBuilder();
       restoreAgentOperationSettings = settings.restoreAgentOperationSettings.toBuilder();
+      getAgentSettings = settings.getAgentSettings.toBuilder();
+      importAgentSettings = settings.importAgentSettings.toBuilder();
+      importAgentOperationSettings = settings.importAgentOperationSettings.toBuilder();
       getValidationResultSettings = settings.getValidationResultSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               setAgentSettings,
               deleteAgentSettings,
-              getAgentSettings,
               searchAgentsSettings,
               trainAgentSettings,
               exportAgentSettings,
-              importAgentSettings,
               restoreAgentSettings,
+              getAgentSettings,
+              importAgentSettings,
               getValidationResultSettings);
     }
 
@@ -648,11 +648,6 @@ public UnaryCallSettings.Builder deleteAgentSettings(
       return deleteAgentSettings;
     }
 
-    /** Returns the builder for the settings used for calls to getAgent. */
-    public UnaryCallSettings.Builder getAgentSettings() {
-      return getAgentSettings;
-    }
-
     /** Returns the builder for the settings used for calls to searchAgents. */
     public PagedCallSettings.Builder<
             SearchAgentsRequest, SearchAgentsResponse, SearchAgentsPagedResponse>
@@ -686,19 +681,6 @@ public UnaryCallSettings.Builder exportAgentSetti
       return exportAgentOperationSettings;
     }
 
-    /** Returns the builder for the settings used for calls to importAgent. */
-    public UnaryCallSettings.Builder importAgentSettings() {
-      return importAgentSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to importAgent. */
-    @BetaApi(
-        "The surface for use by generated code is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        importAgentOperationSettings() {
-      return importAgentOperationSettings;
-    }
-
     /** Returns the builder for the settings used for calls to restoreAgent. */
     public UnaryCallSettings.Builder restoreAgentSettings() {
       return restoreAgentSettings;
@@ -712,6 +694,24 @@ public UnaryCallSettings.Builder restoreAgentSet
       return restoreAgentOperationSettings;
     }
 
+    /** Returns the builder for the settings used for calls to getAgent. */
+    public UnaryCallSettings.Builder getAgentSettings() {
+      return getAgentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to importAgent. */
+    public UnaryCallSettings.Builder importAgentSettings() {
+      return importAgentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to importAgent. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        importAgentOperationSettings() {
+      return importAgentOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to getValidationResult. */
     public UnaryCallSettings.Builder
         getValidationResultSettings() {
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStub.java
index 94220ea19..f5e34749e 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStub.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStub.java
@@ -41,6 +41,14 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public abstract class ContextsStub implements BackgroundResource {
 
+  public UnaryCallable deleteContextCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteContextCallable()");
+  }
+
+  public UnaryCallable deleteAllContextsCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteAllContextsCallable()");
+  }
+
   public UnaryCallable listContextsPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: listContextsPagedCallable()");
   }
@@ -61,14 +69,6 @@ public UnaryCallable updateContextCallable() {
     throw new UnsupportedOperationException("Not implemented: updateContextCallable()");
   }
 
-  public UnaryCallable deleteContextCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteContextCallable()");
-  }
-
-  public UnaryCallable deleteAllContextsCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteAllContextsCallable()");
-  }
-
   @Override
   public abstract void close();
 }
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java
index f50de426f..d113ddf4a 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/ContextsStubSettings.java
@@ -72,16 +72,16 @@
  * 

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 getContext to 30 seconds: + *

For example, to set the total timeout of deleteContext to 30 seconds: * *

  * 
  * ContextsStubSettings.Builder contextsSettingsBuilder =
  *     ContextsStubSettings.newBuilder();
  * contextsSettingsBuilder
- *     .getContextSettings()
+ *     .deleteContextSettings()
  *     .setRetrySettings(
- *         contextsSettingsBuilder.getContextSettings().getRetrySettings().toBuilder()
+ *         contextsSettingsBuilder.deleteContextSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ContextsStubSettings contextsSettings = contextsSettingsBuilder.build();
@@ -98,14 +98,24 @@ public class ContextsStubSettings extends StubSettings {
           .add("https://www.googleapis.com/auth/dialogflow")
           .build();
 
+  private final UnaryCallSettings deleteContextSettings;
+  private final UnaryCallSettings deleteAllContextsSettings;
   private final PagedCallSettings<
           ListContextsRequest, ListContextsResponse, ListContextsPagedResponse>
       listContextsSettings;
   private final UnaryCallSettings getContextSettings;
   private final UnaryCallSettings createContextSettings;
   private final UnaryCallSettings updateContextSettings;
-  private final UnaryCallSettings deleteContextSettings;
-  private final UnaryCallSettings deleteAllContextsSettings;
+
+  /** Returns the object with the settings used for calls to deleteContext. */
+  public UnaryCallSettings deleteContextSettings() {
+    return deleteContextSettings;
+  }
+
+  /** Returns the object with the settings used for calls to deleteAllContexts. */
+  public UnaryCallSettings deleteAllContextsSettings() {
+    return deleteAllContextsSettings;
+  }
 
   /** Returns the object with the settings used for calls to listContexts. */
   public PagedCallSettings
@@ -128,16 +138,6 @@ public UnaryCallSettings updateContextSettings()
     return updateContextSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteContext. */
-  public UnaryCallSettings deleteContextSettings() {
-    return deleteContextSettings;
-  }
-
-  /** Returns the object with the settings used for calls to deleteAllContexts. */
-  public UnaryCallSettings deleteAllContextsSettings() {
-    return deleteAllContextsSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public ContextsStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -206,12 +206,12 @@ public Builder toBuilder() {
   protected ContextsStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteContextSettings = settingsBuilder.deleteContextSettings().build();
+    deleteAllContextsSettings = settingsBuilder.deleteAllContextsSettings().build();
     listContextsSettings = settingsBuilder.listContextsSettings().build();
     getContextSettings = settingsBuilder.getContextSettings().build();
     createContextSettings = settingsBuilder.createContextSettings().build();
     updateContextSettings = settingsBuilder.updateContextSettings().build();
-    deleteContextSettings = settingsBuilder.deleteContextSettings().build();
-    deleteAllContextsSettings = settingsBuilder.deleteAllContextsSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -271,15 +271,15 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder deleteContextSettings;
+    private final UnaryCallSettings.Builder
+        deleteAllContextsSettings;
     private final PagedCallSettings.Builder<
             ListContextsRequest, ListContextsResponse, ListContextsPagedResponse>
         listContextsSettings;
     private final UnaryCallSettings.Builder getContextSettings;
     private final UnaryCallSettings.Builder createContextSettings;
     private final UnaryCallSettings.Builder updateContextSettings;
-    private final UnaryCallSettings.Builder deleteContextSettings;
-    private final UnaryCallSettings.Builder
-        deleteAllContextsSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -322,6 +322,10 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteContextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      deleteAllContextsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       listContextsSettings = PagedCallSettings.newBuilder(LIST_CONTEXTS_PAGE_STR_FACT);
 
       getContextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -330,18 +334,14 @@ protected Builder(ClientContext clientContext) {
 
       updateContextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteContextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      deleteAllContextsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteContextSettings,
+              deleteAllContextsSettings,
               listContextsSettings,
               getContextSettings,
               createContextSettings,
-              updateContextSettings,
-              deleteContextSettings,
-              deleteAllContextsSettings);
+              updateContextSettings);
 
       initDefaults(this);
     }
@@ -358,33 +358,33 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .listContextsSettings()
+          .deleteContextSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getContextSettings()
+          .deleteAllContextsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .createContextSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .listContextsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateContextSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .getContextSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteContextSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .createContextSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteAllContextsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .updateContextSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       return builder;
@@ -393,21 +393,21 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(ContextsStubSettings settings) {
       super(settings);
 
+      deleteContextSettings = settings.deleteContextSettings.toBuilder();
+      deleteAllContextsSettings = settings.deleteAllContextsSettings.toBuilder();
       listContextsSettings = settings.listContextsSettings.toBuilder();
       getContextSettings = settings.getContextSettings.toBuilder();
       createContextSettings = settings.createContextSettings.toBuilder();
       updateContextSettings = settings.updateContextSettings.toBuilder();
-      deleteContextSettings = settings.deleteContextSettings.toBuilder();
-      deleteAllContextsSettings = settings.deleteAllContextsSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteContextSettings,
+              deleteAllContextsSettings,
               listContextsSettings,
               getContextSettings,
               createContextSettings,
-              updateContextSettings,
-              deleteContextSettings,
-              deleteAllContextsSettings);
+              updateContextSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -426,6 +426,16 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteContext. */
+    public UnaryCallSettings.Builder deleteContextSettings() {
+      return deleteContextSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to deleteAllContexts. */
+    public UnaryCallSettings.Builder deleteAllContextsSettings() {
+      return deleteAllContextsSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listContexts. */
     public PagedCallSettings.Builder<
             ListContextsRequest, ListContextsResponse, ListContextsPagedResponse>
@@ -448,16 +458,6 @@ public UnaryCallSettings.Builder updateContextSet
       return updateContextSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteContext. */
-    public UnaryCallSettings.Builder deleteContextSettings() {
-      return deleteContextSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to deleteAllContexts. */
-    public UnaryCallSettings.Builder deleteAllContextsSettings() {
-      return deleteAllContextsSettings;
-    }
-
     @Override
     public ContextsStubSettings build() throws IOException {
       return new ContextsStubSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStub.java
index 4790505c1..691e04b21 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStub.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStub.java
@@ -55,6 +55,32 @@ public OperationsStub getOperationsStub() {
     throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
   }
 
+  public UnaryCallable deleteEntityTypeCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteEntityTypeCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      batchDeleteEntityTypesOperationCallable() {
+    throw new UnsupportedOperationException(
+        "Not implemented: batchDeleteEntityTypesOperationCallable()");
+  }
+
+  public UnaryCallable batchDeleteEntityTypesCallable() {
+    throw new UnsupportedOperationException("Not implemented: batchDeleteEntityTypesCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      batchDeleteEntitiesOperationCallable() {
+    throw new UnsupportedOperationException(
+        "Not implemented: batchDeleteEntitiesOperationCallable()");
+  }
+
+  public UnaryCallable batchDeleteEntitiesCallable() {
+    throw new UnsupportedOperationException("Not implemented: batchDeleteEntitiesCallable()");
+  }
+
   public UnaryCallable
       listEntityTypesPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: listEntityTypesPagedCallable()");
@@ -76,10 +102,6 @@ public UnaryCallable updateEntityTypeCallab
     throw new UnsupportedOperationException("Not implemented: updateEntityTypeCallable()");
   }
 
-  public UnaryCallable deleteEntityTypeCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteEntityTypeCallable()");
-  }
-
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
   public OperationCallable
       batchUpdateEntityTypesOperationCallable() {
@@ -91,17 +113,6 @@ public UnaryCallable batchUpdateEntity
     throw new UnsupportedOperationException("Not implemented: batchUpdateEntityTypesCallable()");
   }
 
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable
-      batchDeleteEntityTypesOperationCallable() {
-    throw new UnsupportedOperationException(
-        "Not implemented: batchDeleteEntityTypesOperationCallable()");
-  }
-
-  public UnaryCallable batchDeleteEntityTypesCallable() {
-    throw new UnsupportedOperationException("Not implemented: batchDeleteEntityTypesCallable()");
-  }
-
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
   public OperationCallable
       batchCreateEntitiesOperationCallable() {
@@ -124,17 +135,6 @@ public UnaryCallable batchUpdateEntitiesC
     throw new UnsupportedOperationException("Not implemented: batchUpdateEntitiesCallable()");
   }
 
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable
-      batchDeleteEntitiesOperationCallable() {
-    throw new UnsupportedOperationException(
-        "Not implemented: batchDeleteEntitiesOperationCallable()");
-  }
-
-  public UnaryCallable batchDeleteEntitiesCallable() {
-    throw new UnsupportedOperationException("Not implemented: batchDeleteEntitiesCallable()");
-  }
-
   @Override
   public abstract void close();
 }
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java
index 16445bee6..16141ee8c 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EntityTypesStubSettings.java
@@ -83,16 +83,16 @@
  * 

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 getEntityType to 30 seconds: + *

For example, to set the total timeout of deleteEntityType to 30 seconds: * *

  * 
  * EntityTypesStubSettings.Builder entityTypesSettingsBuilder =
  *     EntityTypesStubSettings.newBuilder();
  * entityTypesSettingsBuilder
- *     .getEntityTypeSettings()
+ *     .deleteEntityTypeSettings()
  *     .setRetrySettings(
- *         entityTypesSettingsBuilder.getEntityTypeSettings().getRetrySettings().toBuilder()
+ *         entityTypesSettingsBuilder.deleteEntityTypeSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * EntityTypesStubSettings entityTypesSettings = entityTypesSettingsBuilder.build();
@@ -109,22 +109,26 @@ public class EntityTypesStubSettings extends StubSettings deleteEntityTypeSettings;
+  private final UnaryCallSettings
+      batchDeleteEntityTypesSettings;
+  private final OperationCallSettings
+      batchDeleteEntityTypesOperationSettings;
+  private final UnaryCallSettings
+      batchDeleteEntitiesSettings;
+  private final OperationCallSettings
+      batchDeleteEntitiesOperationSettings;
   private final PagedCallSettings<
           ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse>
       listEntityTypesSettings;
   private final UnaryCallSettings getEntityTypeSettings;
   private final UnaryCallSettings createEntityTypeSettings;
   private final UnaryCallSettings updateEntityTypeSettings;
-  private final UnaryCallSettings deleteEntityTypeSettings;
   private final UnaryCallSettings
       batchUpdateEntityTypesSettings;
   private final OperationCallSettings<
           BatchUpdateEntityTypesRequest, BatchUpdateEntityTypesResponse, Struct>
       batchUpdateEntityTypesOperationSettings;
-  private final UnaryCallSettings
-      batchDeleteEntityTypesSettings;
-  private final OperationCallSettings
-      batchDeleteEntityTypesOperationSettings;
   private final UnaryCallSettings
       batchCreateEntitiesSettings;
   private final OperationCallSettings
@@ -133,10 +137,36 @@ public class EntityTypesStubSettings extends StubSettings
       batchUpdateEntitiesOperationSettings;
-  private final UnaryCallSettings
-      batchDeleteEntitiesSettings;
-  private final OperationCallSettings
-      batchDeleteEntitiesOperationSettings;
+
+  /** Returns the object with the settings used for calls to deleteEntityType. */
+  public UnaryCallSettings deleteEntityTypeSettings() {
+    return deleteEntityTypeSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
+  public UnaryCallSettings
+      batchDeleteEntityTypesSettings() {
+    return batchDeleteEntityTypesSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteEntityTypesOperationSettings() {
+    return batchDeleteEntityTypesOperationSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntities. */
+  public UnaryCallSettings batchDeleteEntitiesSettings() {
+    return batchDeleteEntitiesSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteEntities. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteEntitiesOperationSettings() {
+    return batchDeleteEntitiesOperationSettings;
+  }
 
   /** Returns the object with the settings used for calls to listEntityTypes. */
   public PagedCallSettings<
@@ -160,11 +190,6 @@ public UnaryCallSettings updateEntityTypeSe
     return updateEntityTypeSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteEntityType. */
-  public UnaryCallSettings deleteEntityTypeSettings() {
-    return deleteEntityTypeSettings;
-  }
-
   /** Returns the object with the settings used for calls to batchUpdateEntityTypes. */
   public UnaryCallSettings
       batchUpdateEntityTypesSettings() {
@@ -179,19 +204,6 @@ public UnaryCallSettings deleteEntityTypeSetting
     return batchUpdateEntityTypesOperationSettings;
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
-  public UnaryCallSettings
-      batchDeleteEntityTypesSettings() {
-    return batchDeleteEntityTypesSettings;
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteEntityTypes. */
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteEntityTypesOperationSettings() {
-    return batchDeleteEntityTypesOperationSettings;
-  }
-
   /** Returns the object with the settings used for calls to batchCreateEntities. */
   public UnaryCallSettings batchCreateEntitiesSettings() {
     return batchCreateEntitiesSettings;
@@ -216,18 +228,6 @@ public UnaryCallSettings batchUpdateEntit
     return batchUpdateEntitiesOperationSettings;
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteEntities. */
-  public UnaryCallSettings batchDeleteEntitiesSettings() {
-    return batchDeleteEntitiesSettings;
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteEntities. */
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteEntitiesOperationSettings() {
-    return batchDeleteEntitiesOperationSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public EntityTypesStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -297,26 +297,26 @@ public Builder toBuilder() {
   protected EntityTypesStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build();
+    batchDeleteEntityTypesSettings = settingsBuilder.batchDeleteEntityTypesSettings().build();
+    batchDeleteEntityTypesOperationSettings =
+        settingsBuilder.batchDeleteEntityTypesOperationSettings().build();
+    batchDeleteEntitiesSettings = settingsBuilder.batchDeleteEntitiesSettings().build();
+    batchDeleteEntitiesOperationSettings =
+        settingsBuilder.batchDeleteEntitiesOperationSettings().build();
     listEntityTypesSettings = settingsBuilder.listEntityTypesSettings().build();
     getEntityTypeSettings = settingsBuilder.getEntityTypeSettings().build();
     createEntityTypeSettings = settingsBuilder.createEntityTypeSettings().build();
     updateEntityTypeSettings = settingsBuilder.updateEntityTypeSettings().build();
-    deleteEntityTypeSettings = settingsBuilder.deleteEntityTypeSettings().build();
     batchUpdateEntityTypesSettings = settingsBuilder.batchUpdateEntityTypesSettings().build();
     batchUpdateEntityTypesOperationSettings =
         settingsBuilder.batchUpdateEntityTypesOperationSettings().build();
-    batchDeleteEntityTypesSettings = settingsBuilder.batchDeleteEntityTypesSettings().build();
-    batchDeleteEntityTypesOperationSettings =
-        settingsBuilder.batchDeleteEntityTypesOperationSettings().build();
     batchCreateEntitiesSettings = settingsBuilder.batchCreateEntitiesSettings().build();
     batchCreateEntitiesOperationSettings =
         settingsBuilder.batchCreateEntitiesOperationSettings().build();
     batchUpdateEntitiesSettings = settingsBuilder.batchUpdateEntitiesSettings().build();
     batchUpdateEntitiesOperationSettings =
         settingsBuilder.batchUpdateEntitiesOperationSettings().build();
-    batchDeleteEntitiesSettings = settingsBuilder.batchDeleteEntitiesSettings().build();
-    batchDeleteEntitiesOperationSettings =
-        settingsBuilder.batchDeleteEntitiesOperationSettings().build();
   }
 
   private static final PagedListDescriptor<
@@ -379,6 +379,16 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder
+        deleteEntityTypeSettings;
+    private final UnaryCallSettings.Builder
+        batchDeleteEntityTypesSettings;
+    private final OperationCallSettings.Builder
+        batchDeleteEntityTypesOperationSettings;
+    private final UnaryCallSettings.Builder
+        batchDeleteEntitiesSettings;
+    private final OperationCallSettings.Builder
+        batchDeleteEntitiesOperationSettings;
     private final PagedCallSettings.Builder<
             ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse>
         listEntityTypesSettings;
@@ -387,17 +397,11 @@ public static class Builder extends StubSettings.Builder
         updateEntityTypeSettings;
-    private final UnaryCallSettings.Builder
-        deleteEntityTypeSettings;
     private final UnaryCallSettings.Builder
         batchUpdateEntityTypesSettings;
     private final OperationCallSettings.Builder<
             BatchUpdateEntityTypesRequest, BatchUpdateEntityTypesResponse, Struct>
         batchUpdateEntityTypesOperationSettings;
-    private final UnaryCallSettings.Builder
-        batchDeleteEntityTypesSettings;
-    private final OperationCallSettings.Builder
-        batchDeleteEntityTypesOperationSettings;
     private final UnaryCallSettings.Builder
         batchCreateEntitiesSettings;
     private final OperationCallSettings.Builder
@@ -406,10 +410,6 @@ public static class Builder extends StubSettings.Builder
         batchUpdateEntitiesOperationSettings;
-    private final UnaryCallSettings.Builder
-        batchDeleteEntitiesSettings;
-    private final OperationCallSettings.Builder
-        batchDeleteEntitiesOperationSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -452,6 +452,16 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      batchDeleteEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      batchDeleteEntityTypesOperationSettings = OperationCallSettings.newBuilder();
+
+      batchDeleteEntitiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      batchDeleteEntitiesOperationSettings = OperationCallSettings.newBuilder();
+
       listEntityTypesSettings = PagedCallSettings.newBuilder(LIST_ENTITY_TYPES_PAGE_STR_FACT);
 
       getEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -460,16 +470,10 @@ protected Builder(ClientContext clientContext) {
 
       updateEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       batchUpdateEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       batchUpdateEntityTypesOperationSettings = OperationCallSettings.newBuilder();
 
-      batchDeleteEntityTypesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      batchDeleteEntityTypesOperationSettings = OperationCallSettings.newBuilder();
-
       batchCreateEntitiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       batchCreateEntitiesOperationSettings = OperationCallSettings.newBuilder();
@@ -478,22 +482,18 @@ protected Builder(ClientContext clientContext) {
 
       batchUpdateEntitiesOperationSettings = OperationCallSettings.newBuilder();
 
-      batchDeleteEntitiesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      batchDeleteEntitiesOperationSettings = OperationCallSettings.newBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteEntityTypeSettings,
+              batchDeleteEntityTypesSettings,
+              batchDeleteEntitiesSettings,
               listEntityTypesSettings,
               getEntityTypeSettings,
               createEntityTypeSettings,
               updateEntityTypeSettings,
-              deleteEntityTypeSettings,
               batchUpdateEntityTypesSettings,
-              batchDeleteEntityTypesSettings,
               batchCreateEntitiesSettings,
-              batchUpdateEntitiesSettings,
-              batchDeleteEntitiesSettings);
+              batchUpdateEntitiesSettings);
 
       initDefaults(this);
     }
@@ -510,65 +510,64 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .listEntityTypesSettings()
+          .deleteEntityTypeSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .getEntityTypeSettings()
+          .batchDeleteEntityTypesSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .createEntityTypeSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .batchDeleteEntitiesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateEntityTypeSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .listEntityTypesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .deleteEntityTypeSettings()
+          .getEntityTypeSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchUpdateEntityTypesSettings()
+          .createEntityTypeSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchDeleteEntityTypesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .updateEntityTypeSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchCreateEntitiesSettings()
+          .batchUpdateEntityTypesSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchUpdateEntitiesSettings()
+          .batchCreateEntitiesSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .batchDeleteEntitiesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .batchUpdateEntitiesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
       builder
-          .batchUpdateEntityTypesOperationSettings()
+          .batchDeleteEntityTypesOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
-              ProtoOperationTransformers.ResponseTransformer.create(
-                  BatchUpdateEntityTypesResponse.class))
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
           .setMetadataTransformer(
               ProtoOperationTransformers.MetadataTransformer.create(Struct.class))
           .setPollingAlgorithm(
@@ -583,10 +582,10 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .batchDeleteEntityTypesOperationSettings()
+          .batchDeleteEntitiesOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
+                  .newUnaryCallSettingsBuilder()
                   .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
@@ -606,15 +605,16 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .batchCreateEntitiesOperationSettings()
+          .batchUpdateEntityTypesOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
+                  .newUnaryCallSettingsBuilder()
                   .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
-              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+              ProtoOperationTransformers.ResponseTransformer.create(
+                  BatchUpdateEntityTypesResponse.class))
           .setMetadataTransformer(
               ProtoOperationTransformers.MetadataTransformer.create(Struct.class))
           .setPollingAlgorithm(
@@ -629,10 +629,10 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .batchUpdateEntitiesOperationSettings()
+          .batchCreateEntitiesOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
+                  .newUnaryCallSettingsBuilder()
                   .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
@@ -652,11 +652,11 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .batchDeleteEntitiesOperationSettings()
+          .batchUpdateEntitiesOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
@@ -681,39 +681,39 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(EntityTypesStubSettings settings) {
       super(settings);
 
+      deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder();
+      batchDeleteEntityTypesSettings = settings.batchDeleteEntityTypesSettings.toBuilder();
+      batchDeleteEntityTypesOperationSettings =
+          settings.batchDeleteEntityTypesOperationSettings.toBuilder();
+      batchDeleteEntitiesSettings = settings.batchDeleteEntitiesSettings.toBuilder();
+      batchDeleteEntitiesOperationSettings =
+          settings.batchDeleteEntitiesOperationSettings.toBuilder();
       listEntityTypesSettings = settings.listEntityTypesSettings.toBuilder();
       getEntityTypeSettings = settings.getEntityTypeSettings.toBuilder();
       createEntityTypeSettings = settings.createEntityTypeSettings.toBuilder();
       updateEntityTypeSettings = settings.updateEntityTypeSettings.toBuilder();
-      deleteEntityTypeSettings = settings.deleteEntityTypeSettings.toBuilder();
       batchUpdateEntityTypesSettings = settings.batchUpdateEntityTypesSettings.toBuilder();
       batchUpdateEntityTypesOperationSettings =
           settings.batchUpdateEntityTypesOperationSettings.toBuilder();
-      batchDeleteEntityTypesSettings = settings.batchDeleteEntityTypesSettings.toBuilder();
-      batchDeleteEntityTypesOperationSettings =
-          settings.batchDeleteEntityTypesOperationSettings.toBuilder();
       batchCreateEntitiesSettings = settings.batchCreateEntitiesSettings.toBuilder();
       batchCreateEntitiesOperationSettings =
           settings.batchCreateEntitiesOperationSettings.toBuilder();
       batchUpdateEntitiesSettings = settings.batchUpdateEntitiesSettings.toBuilder();
       batchUpdateEntitiesOperationSettings =
           settings.batchUpdateEntitiesOperationSettings.toBuilder();
-      batchDeleteEntitiesSettings = settings.batchDeleteEntitiesSettings.toBuilder();
-      batchDeleteEntitiesOperationSettings =
-          settings.batchDeleteEntitiesOperationSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteEntityTypeSettings,
+              batchDeleteEntityTypesSettings,
+              batchDeleteEntitiesSettings,
               listEntityTypesSettings,
               getEntityTypeSettings,
               createEntityTypeSettings,
               updateEntityTypeSettings,
-              deleteEntityTypeSettings,
               batchUpdateEntityTypesSettings,
-              batchDeleteEntityTypesSettings,
               batchCreateEntitiesSettings,
-              batchUpdateEntitiesSettings,
-              batchDeleteEntitiesSettings);
+              batchUpdateEntitiesSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -732,6 +732,39 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteEntityType. */
+    public UnaryCallSettings.Builder deleteEntityTypeSettings() {
+      return deleteEntityTypeSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
+    public UnaryCallSettings.Builder
+        batchDeleteEntityTypesSettings() {
+      return batchDeleteEntityTypesSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteEntityTypesOperationSettings() {
+      return batchDeleteEntityTypesOperationSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
+    public UnaryCallSettings.Builder
+        batchDeleteEntitiesSettings() {
+      return batchDeleteEntitiesSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteEntitiesOperationSettings() {
+      return batchDeleteEntitiesOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listEntityTypes. */
     public PagedCallSettings.Builder<
             ListEntityTypesRequest, ListEntityTypesResponse, ListEntityTypesPagedResponse>
@@ -756,11 +789,6 @@ public UnaryCallSettings.Builder getEntityType
       return updateEntityTypeSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteEntityType. */
-    public UnaryCallSettings.Builder deleteEntityTypeSettings() {
-      return deleteEntityTypeSettings;
-    }
-
     /** Returns the builder for the settings used for calls to batchUpdateEntityTypes. */
     public UnaryCallSettings.Builder
         batchUpdateEntityTypesSettings() {
@@ -776,20 +804,6 @@ public UnaryCallSettings.Builder deleteEntityTyp
       return batchUpdateEntityTypesOperationSettings;
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
-    public UnaryCallSettings.Builder
-        batchDeleteEntityTypesSettings() {
-      return batchDeleteEntityTypesSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteEntityTypes. */
-    @BetaApi(
-        "The surface for use by generated code is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteEntityTypesOperationSettings() {
-      return batchDeleteEntityTypesOperationSettings;
-    }
-
     /** Returns the builder for the settings used for calls to batchCreateEntities. */
     public UnaryCallSettings.Builder
         batchCreateEntitiesSettings() {
@@ -818,20 +832,6 @@ public UnaryCallSettings.Builder deleteEntityTyp
       return batchUpdateEntitiesOperationSettings;
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
-    public UnaryCallSettings.Builder
-        batchDeleteEntitiesSettings() {
-      return batchDeleteEntitiesSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteEntities. */
-    @BetaApi(
-        "The surface for use by generated code is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteEntitiesOperationSettings() {
-      return batchDeleteEntitiesOperationSettings;
-    }
-
     @Override
     public EntityTypesStubSettings build() throws IOException {
       return new EntityTypesStubSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStub.java
new file mode 100644
index 000000000..35641d077
--- /dev/null
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStub.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.v2.stub;
+
+import static com.google.cloud.dialogflow.v2.EnvironmentsClient.ListEnvironmentsPagedResponse;
+
+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.v2.ListEnvironmentsRequest;
+import com.google.cloud.dialogflow.v2.ListEnvironmentsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for Dialogflow API.
+ *
+ * 

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class EnvironmentsStub implements BackgroundResource { + + public UnaryCallable + listEnvironmentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsPagedCallable()"); + } + + public UnaryCallable + listEnvironmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStubSettings.java new file mode 100644 index 000000000..c7c542a94 --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/EnvironmentsStubSettings.java @@ -0,0 +1,350 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2.stub; + +import static com.google.cloud.dialogflow.v2.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.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.v2.Environment; +import com.google.cloud.dialogflow.v2.ListEnvironmentsRequest; +import com.google.cloud.dialogflow.v2.ListEnvironmentsResponse; +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 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 EnvironmentsStub}. + * + *

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 listEnvironmentsPagedCallable to 30 seconds: + * + *

+ * 
+ * EnvironmentsStubSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsStubSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .listEnvironmentsSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder.listEnvironmentsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsStubSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsStubSettings 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 PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEnvironmentsStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** 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 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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + 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 defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EnvironmentsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build(); + } + + private static final PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> + LIST_ENVIRONMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEnvironmentsRequest injectToken( + ListEnvironmentsRequest payload, String token) { + return ListEnvironmentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEnvironmentsRequest injectPageSize( + ListEnvironmentsRequest payload, int pageSize) { + return ListEnvironmentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEnvironmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEnvironmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEnvironmentsResponse payload) { + return payload.getEnvironmentsList() != null + ? payload.getEnvironmentsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + LIST_ENVIRONMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEnvironmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ENVIRONMENTS_PAGE_STR_DESC, request, context); + return ListEnvironmentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for EnvironmentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + 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(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listEnvironmentsSettings = PagedCallSettings.newBuilder(LIST_ENVIRONMENTS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listEnvironmentsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .listEnvironmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(EnvironmentsStubSettings settings) { + super(settings); + + listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listEnvironmentsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + @Override + public EnvironmentsStubSettings build() throws IOException { + return new EnvironmentsStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java index 898dda90d..fe60f5839 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcAgentsStub.java @@ -75,13 +75,6 @@ public class GrpcAgentsStub extends AgentsStub { .setRequestMarshaller(ProtoUtils.marshaller(DeleteAgentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); - private static final MethodDescriptor getAgentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Agents/GetAgent") - .setRequestMarshaller(ProtoUtils.marshaller(GetAgentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Agent.getDefaultInstance())) - .build(); private static final MethodDescriptor searchAgentsMethodDescriptor = MethodDescriptor.newBuilder() @@ -105,13 +98,6 @@ public class GrpcAgentsStub extends AgentsStub { .setRequestMarshaller(ProtoUtils.marshaller(ExportAgentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor importAgentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Agents/ImportAgent") - .setRequestMarshaller(ProtoUtils.marshaller(ImportAgentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private static final MethodDescriptor restoreAgentMethodDescriptor = MethodDescriptor.newBuilder() @@ -120,6 +106,20 @@ public class GrpcAgentsStub extends AgentsStub { .setRequestMarshaller(ProtoUtils.marshaller(RestoreAgentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor getAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Agents/GetAgent") + .setRequestMarshaller(ProtoUtils.marshaller(GetAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Agent.getDefaultInstance())) + .build(); + private static final MethodDescriptor importAgentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Agents/ImportAgent") + .setRequestMarshaller(ProtoUtils.marshaller(ImportAgentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private static final MethodDescriptor getValidationResultMethodDescriptor = MethodDescriptor.newBuilder() @@ -135,7 +135,6 @@ public class GrpcAgentsStub extends AgentsStub { private final UnaryCallable setAgentCallable; private final UnaryCallable deleteAgentCallable; - private final UnaryCallable getAgentCallable; private final UnaryCallable searchAgentsCallable; private final UnaryCallable searchAgentsPagedCallable; @@ -144,10 +143,11 @@ public class GrpcAgentsStub extends AgentsStub { private final UnaryCallable exportAgentCallable; private final OperationCallable exportAgentOperationCallable; - private final UnaryCallable importAgentCallable; - private final OperationCallable importAgentOperationCallable; private final UnaryCallable restoreAgentCallable; private final OperationCallable restoreAgentOperationCallable; + private final UnaryCallable getAgentCallable; + private final UnaryCallable importAgentCallable; + private final OperationCallable importAgentOperationCallable; private final UnaryCallable getValidationResultCallable; @@ -214,19 +214,6 @@ public Map extract(DeleteAgentRequest request) { } }) .build(); - GrpcCallSettings getAgentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getAgentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetAgentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); GrpcCallSettings searchAgentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(searchAgentsMethodDescriptor) @@ -266,26 +253,39 @@ public Map extract(ExportAgentRequest request) { } }) .build(); - GrpcCallSettings importAgentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(importAgentMethodDescriptor) + GrpcCallSettings restoreAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restoreAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override - public Map extract(ImportAgentRequest request) { + public Map extract(RestoreAgentRequest request) { ImmutableMap.Builder params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); } }) .build(); - GrpcCallSettings restoreAgentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(restoreAgentMethodDescriptor) + GrpcCallSettings getAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAgentMethodDescriptor) .setParamsExtractor( - new RequestParamsExtractor() { + new RequestParamsExtractor() { @Override - public Map extract(RestoreAgentRequest request) { + public Map extract(GetAgentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importAgentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importAgentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportAgentRequest request) { ImmutableMap.Builder params = ImmutableMap.builder(); params.put("parent", String.valueOf(request.getParent())); return params.build(); @@ -313,9 +313,6 @@ public Map extract(GetValidationResultRequest request) { this.deleteAgentCallable = callableFactory.createUnaryCallable( deleteAgentTransportSettings, settings.deleteAgentSettings(), clientContext); - this.getAgentCallable = - callableFactory.createUnaryCallable( - getAgentTransportSettings, settings.getAgentSettings(), clientContext); this.searchAgentsCallable = callableFactory.createUnaryCallable( searchAgentsTransportSettings, settings.searchAgentsSettings(), clientContext); @@ -340,15 +337,6 @@ public Map extract(GetValidationResultRequest request) { settings.exportAgentOperationSettings(), clientContext, this.operationsStub); - this.importAgentCallable = - callableFactory.createUnaryCallable( - importAgentTransportSettings, settings.importAgentSettings(), clientContext); - this.importAgentOperationCallable = - callableFactory.createOperationCallable( - importAgentTransportSettings, - settings.importAgentOperationSettings(), - clientContext, - this.operationsStub); this.restoreAgentCallable = callableFactory.createUnaryCallable( restoreAgentTransportSettings, settings.restoreAgentSettings(), clientContext); @@ -358,6 +346,18 @@ public Map extract(GetValidationResultRequest request) { settings.restoreAgentOperationSettings(), clientContext, this.operationsStub); + this.getAgentCallable = + callableFactory.createUnaryCallable( + getAgentTransportSettings, settings.getAgentSettings(), clientContext); + this.importAgentCallable = + callableFactory.createUnaryCallable( + importAgentTransportSettings, settings.importAgentSettings(), clientContext); + this.importAgentOperationCallable = + callableFactory.createOperationCallable( + importAgentTransportSettings, + settings.importAgentOperationSettings(), + clientContext, + this.operationsStub); this.getValidationResultCallable = callableFactory.createUnaryCallable( getValidationResultTransportSettings, @@ -380,10 +380,6 @@ public UnaryCallable deleteAgentCallable() { return deleteAgentCallable; } - public UnaryCallable getAgentCallable() { - return getAgentCallable; - } - public UnaryCallable searchAgentsPagedCallable() { return searchAgentsPagedCallable; } @@ -412,21 +408,25 @@ public UnaryCallable exportAgentCallable() { } @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable importAgentOperationCallable() { - return importAgentOperationCallable; + public OperationCallable restoreAgentOperationCallable() { + return restoreAgentOperationCallable; } - public UnaryCallable importAgentCallable() { - return importAgentCallable; + public UnaryCallable restoreAgentCallable() { + return restoreAgentCallable; + } + + public UnaryCallable getAgentCallable() { + return getAgentCallable; } @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable restoreAgentOperationCallable() { - return restoreAgentOperationCallable; + public OperationCallable importAgentOperationCallable() { + return importAgentOperationCallable; } - public UnaryCallable restoreAgentCallable() { - return restoreAgentCallable; + public UnaryCallable importAgentCallable() { + return importAgentCallable; } public UnaryCallable getValidationResultCallable() { diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java index adc258273..40f43495d 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcContextsStub.java @@ -52,6 +52,22 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcContextsStub extends ContextsStub { + private static final MethodDescriptor deleteContextMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Contexts/DeleteContext") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteContextRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteAllContextsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Contexts/DeleteAllContexts") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAllContextsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor listContextsMethodDescriptor = MethodDescriptor.newBuilder() @@ -86,33 +102,17 @@ public class GrpcContextsStub extends ContextsStub { ProtoUtils.marshaller(UpdateContextRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Context.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteContextMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Contexts/DeleteContext") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteContextRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - private static final MethodDescriptor - deleteAllContextsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Contexts/DeleteAllContexts") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteAllContextsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; + private final UnaryCallable deleteContextCallable; + private final UnaryCallable deleteAllContextsCallable; private final UnaryCallable listContextsCallable; private final UnaryCallable listContextsPagedCallable; private final UnaryCallable getContextCallable; private final UnaryCallable createContextCallable; private final UnaryCallable updateContextCallable; - private final UnaryCallable deleteContextCallable; - private final UnaryCallable deleteAllContextsCallable; private final GrpcStubCallableFactory callableFactory; @@ -150,6 +150,32 @@ protected GrpcContextsStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings deleteContextTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteContextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteContextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteAllContextsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAllContextsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAllContextsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings listContextsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listContextsMethodDescriptor) @@ -202,33 +228,15 @@ public Map extract(UpdateContextRequest request) { } }) .build(); - GrpcCallSettings deleteContextTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteContextMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteContextRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings deleteAllContextsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAllContextsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteAllContextsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); + this.deleteContextCallable = + callableFactory.createUnaryCallable( + deleteContextTransportSettings, settings.deleteContextSettings(), clientContext); + this.deleteAllContextsCallable = + callableFactory.createUnaryCallable( + deleteAllContextsTransportSettings, + settings.deleteAllContextsSettings(), + clientContext); this.listContextsCallable = callableFactory.createUnaryCallable( listContextsTransportSettings, settings.listContextsSettings(), clientContext); @@ -244,18 +252,18 @@ public Map extract(DeleteAllContextsRequest request) { this.updateContextCallable = callableFactory.createUnaryCallable( updateContextTransportSettings, settings.updateContextSettings(), clientContext); - this.deleteContextCallable = - callableFactory.createUnaryCallable( - deleteContextTransportSettings, settings.deleteContextSettings(), clientContext); - this.deleteAllContextsCallable = - callableFactory.createUnaryCallable( - deleteAllContextsTransportSettings, - settings.deleteAllContextsSettings(), - clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteContextCallable() { + return deleteContextCallable; + } + + public UnaryCallable deleteAllContextsCallable() { + return deleteAllContextsCallable; + } + public UnaryCallable listContextsPagedCallable() { return listContextsPagedCallable; } @@ -276,14 +284,6 @@ public UnaryCallable updateContextCallable() { return updateContextCallable; } - public UnaryCallable deleteContextCallable() { - return deleteContextCallable; - } - - public UnaryCallable deleteAllContextsCallable() { - return deleteAllContextsCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java index a3dd7fbb9..d5fa542f0 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEntityTypesStub.java @@ -61,6 +61,33 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcEntityTypesStub extends EntityTypesStub { + private static final MethodDescriptor + deleteEntityTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEntityTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchDeleteEntityTypesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteEntityTypesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchDeleteEntitiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntities") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteEntitiesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private static final MethodDescriptor listEntityTypesMethodDescriptor = MethodDescriptor.newBuilder() @@ -98,15 +125,6 @@ public class GrpcEntityTypesStub extends EntityTypesStub { ProtoUtils.marshaller(UpdateEntityTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EntityType.getDefaultInstance())) .build(); - private static final MethodDescriptor - deleteEntityTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/DeleteEntityType") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteEntityTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private static final MethodDescriptor batchUpdateEntityTypesMethodDescriptor = MethodDescriptor.newBuilder() @@ -116,15 +134,6 @@ public class GrpcEntityTypesStub extends EntityTypesStub { ProtoUtils.marshaller(BatchUpdateEntityTypesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor - batchDeleteEntityTypesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntityTypes") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchDeleteEntityTypesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private static final MethodDescriptor batchCreateEntitiesMethodDescriptor = MethodDescriptor.newBuilder() @@ -143,19 +152,18 @@ public class GrpcEntityTypesStub extends EntityTypesStub { ProtoUtils.marshaller(BatchUpdateEntitiesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor - batchDeleteEntitiesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.EntityTypes/BatchDeleteEntities") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchDeleteEntitiesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; + private final UnaryCallable deleteEntityTypeCallable; + private final UnaryCallable + batchDeleteEntityTypesCallable; + private final OperationCallable + batchDeleteEntityTypesOperationCallable; + private final UnaryCallable batchDeleteEntitiesCallable; + private final OperationCallable + batchDeleteEntitiesOperationCallable; private final UnaryCallable listEntityTypesCallable; private final UnaryCallable @@ -163,25 +171,17 @@ public class GrpcEntityTypesStub extends EntityTypesStub { private final UnaryCallable getEntityTypeCallable; private final UnaryCallable createEntityTypeCallable; private final UnaryCallable updateEntityTypeCallable; - private final UnaryCallable deleteEntityTypeCallable; private final UnaryCallable batchUpdateEntityTypesCallable; private final OperationCallable< BatchUpdateEntityTypesRequest, BatchUpdateEntityTypesResponse, Struct> batchUpdateEntityTypesOperationCallable; - private final UnaryCallable - batchDeleteEntityTypesCallable; - private final OperationCallable - batchDeleteEntityTypesOperationCallable; private final UnaryCallable batchCreateEntitiesCallable; private final OperationCallable batchCreateEntitiesOperationCallable; private final UnaryCallable batchUpdateEntitiesCallable; private final OperationCallable batchUpdateEntitiesOperationCallable; - private final UnaryCallable batchDeleteEntitiesCallable; - private final OperationCallable - batchDeleteEntitiesOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -223,6 +223,46 @@ protected GrpcEntityTypesStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings deleteEntityTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + batchDeleteEntityTypesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteEntityTypesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntityTypesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchDeleteEntitiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteEntitiesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteEntitiesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings listEntityTypesTransportSettings = GrpcCallSettings.newBuilder() @@ -277,19 +317,6 @@ public Map extract(UpdateEntityTypeRequest request) { } }) .build(); - GrpcCallSettings deleteEntityTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteEntityTypeMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); GrpcCallSettings batchUpdateEntityTypesTransportSettings = GrpcCallSettings.newBuilder() @@ -304,20 +331,6 @@ public Map extract(BatchUpdateEntityTypesRequest request) { } }) .build(); - GrpcCallSettings - batchDeleteEntityTypesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteEntityTypesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchDeleteEntityTypesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); GrpcCallSettings batchCreateEntitiesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchCreateEntitiesMethodDescriptor) @@ -344,20 +357,32 @@ public Map extract(BatchUpdateEntitiesRequest request) { } }) .build(); - GrpcCallSettings batchDeleteEntitiesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteEntitiesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchDeleteEntitiesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); + this.deleteEntityTypeCallable = + callableFactory.createUnaryCallable( + deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); + this.batchDeleteEntityTypesCallable = + callableFactory.createUnaryCallable( + batchDeleteEntityTypesTransportSettings, + settings.batchDeleteEntityTypesSettings(), + clientContext); + this.batchDeleteEntityTypesOperationCallable = + callableFactory.createOperationCallable( + batchDeleteEntityTypesTransportSettings, + settings.batchDeleteEntityTypesOperationSettings(), + clientContext, + this.operationsStub); + this.batchDeleteEntitiesCallable = + callableFactory.createUnaryCallable( + batchDeleteEntitiesTransportSettings, + settings.batchDeleteEntitiesSettings(), + clientContext); + this.batchDeleteEntitiesOperationCallable = + callableFactory.createOperationCallable( + batchDeleteEntitiesTransportSettings, + settings.batchDeleteEntitiesOperationSettings(), + clientContext, + this.operationsStub); this.listEntityTypesCallable = callableFactory.createUnaryCallable( listEntityTypesTransportSettings, settings.listEntityTypesSettings(), clientContext); @@ -373,9 +398,6 @@ public Map extract(BatchDeleteEntitiesRequest request) { this.updateEntityTypeCallable = callableFactory.createUnaryCallable( updateEntityTypeTransportSettings, settings.updateEntityTypeSettings(), clientContext); - this.deleteEntityTypeCallable = - callableFactory.createUnaryCallable( - deleteEntityTypeTransportSettings, settings.deleteEntityTypeSettings(), clientContext); this.batchUpdateEntityTypesCallable = callableFactory.createUnaryCallable( batchUpdateEntityTypesTransportSettings, @@ -387,17 +409,6 @@ public Map extract(BatchDeleteEntitiesRequest request) { settings.batchUpdateEntityTypesOperationSettings(), clientContext, this.operationsStub); - this.batchDeleteEntityTypesCallable = - callableFactory.createUnaryCallable( - batchDeleteEntityTypesTransportSettings, - settings.batchDeleteEntityTypesSettings(), - clientContext); - this.batchDeleteEntityTypesOperationCallable = - callableFactory.createOperationCallable( - batchDeleteEntityTypesTransportSettings, - settings.batchDeleteEntityTypesOperationSettings(), - clientContext, - this.operationsStub); this.batchCreateEntitiesCallable = callableFactory.createUnaryCallable( batchCreateEntitiesTransportSettings, @@ -420,17 +431,6 @@ public Map extract(BatchDeleteEntitiesRequest request) { settings.batchUpdateEntitiesOperationSettings(), clientContext, this.operationsStub); - this.batchDeleteEntitiesCallable = - callableFactory.createUnaryCallable( - batchDeleteEntitiesTransportSettings, - settings.batchDeleteEntitiesSettings(), - clientContext); - this.batchDeleteEntitiesOperationCallable = - callableFactory.createOperationCallable( - batchDeleteEntitiesTransportSettings, - settings.batchDeleteEntitiesOperationSettings(), - clientContext, - this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -440,6 +440,30 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + public UnaryCallable deleteEntityTypeCallable() { + return deleteEntityTypeCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteEntityTypesOperationCallable() { + return batchDeleteEntityTypesOperationCallable; + } + + public UnaryCallable batchDeleteEntityTypesCallable() { + return batchDeleteEntityTypesCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteEntitiesOperationCallable() { + return batchDeleteEntitiesOperationCallable; + } + + public UnaryCallable batchDeleteEntitiesCallable() { + return batchDeleteEntitiesCallable; + } + public UnaryCallable listEntityTypesPagedCallable() { return listEntityTypesPagedCallable; @@ -461,10 +485,6 @@ public UnaryCallable updateEntityTypeCallab return updateEntityTypeCallable; } - public UnaryCallable deleteEntityTypeCallable() { - return deleteEntityTypeCallable; - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable batchUpdateEntityTypesOperationCallable() { @@ -475,16 +495,6 @@ public UnaryCallable batchUpdateEntity return batchUpdateEntityTypesCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchDeleteEntityTypesOperationCallable() { - return batchDeleteEntityTypesOperationCallable; - } - - public UnaryCallable batchDeleteEntityTypesCallable() { - return batchDeleteEntityTypesCallable; - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable batchCreateEntitiesOperationCallable() { @@ -505,16 +515,6 @@ public UnaryCallable batchUpdateEntitiesC return batchUpdateEntitiesCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchDeleteEntitiesOperationCallable() { - return batchDeleteEntitiesOperationCallable; - } - - public UnaryCallable batchDeleteEntitiesCallable() { - return batchDeleteEntitiesCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsCallableFactory.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsCallableFactory.java new file mode 100644 index 000000000..d8149066e --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2.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.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Dialogflow API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcEnvironmentsCallableFactory 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 pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsStub.java new file mode 100644 index 000000000..d02f0a5ad --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcEnvironmentsStub.java @@ -0,0 +1,169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2.stub; + +import static com.google.cloud.dialogflow.v2.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.v2.ListEnvironmentsRequest; +import com.google.cloud.dialogflow.v2.ListEnvironmentsResponse; +import com.google.common.collect.ImmutableMap; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Dialogflow API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcEnvironmentsStub extends EnvironmentsStub { + + private static final MethodDescriptor + listEnvironmentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Environments/ListEnvironments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnvironmentsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable + listEnvironmentsCallable; + private final UnaryCallable + listEnvironmentsPagedCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEnvironmentsStub create(EnvironmentsStubSettings settings) + throws IOException { + return new GrpcEnvironmentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEnvironmentsStub create(ClientContext clientContext) throws IOException { + return new GrpcEnvironmentsStub(EnvironmentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEnvironmentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEnvironmentsStub( + EnvironmentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub(EnvironmentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEnvironmentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub( + EnvironmentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings + listEnvironmentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEnvironmentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEnvironmentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listEnvironmentsCallable = + callableFactory.createUnaryCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.listEnvironmentsPagedCallable = + callableFactory.createPagedCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable + listEnvironmentsPagedCallable() { + return listEnvironmentsPagedCallable; + } + + public UnaryCallable + listEnvironmentsCallable() { + return listEnvironmentsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java index bc9ef4f93..c26d5b87e 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcIntentsStub.java @@ -58,6 +58,22 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcIntentsStub extends IntentsStub { + private static final MethodDescriptor deleteIntentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Intents/DeleteIntent") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteIntentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + batchDeleteIntentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2.Intents/BatchDeleteIntents") + .setRequestMarshaller( + ProtoUtils.marshaller(BatchDeleteIntentsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private static final MethodDescriptor listIntentsMethodDescriptor = MethodDescriptor.newBuilder() @@ -88,13 +104,6 @@ public class GrpcIntentsStub extends IntentsStub { .setRequestMarshaller(ProtoUtils.marshaller(UpdateIntentRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Intent.getDefaultInstance())) .build(); - private static final MethodDescriptor deleteIntentMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Intents/DeleteIntent") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteIntentRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private static final MethodDescriptor batchUpdateIntentsMethodDescriptor = MethodDescriptor.newBuilder() @@ -104,32 +113,23 @@ public class GrpcIntentsStub extends IntentsStub { ProtoUtils.marshaller(BatchUpdateIntentsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor - batchDeleteIntentsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dialogflow.v2.Intents/BatchDeleteIntents") - .setRequestMarshaller( - ProtoUtils.marshaller(BatchDeleteIntentsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; + private final UnaryCallable deleteIntentCallable; + private final UnaryCallable batchDeleteIntentsCallable; + private final OperationCallable + batchDeleteIntentsOperationCallable; private final UnaryCallable listIntentsCallable; private final UnaryCallable listIntentsPagedCallable; private final UnaryCallable getIntentCallable; private final UnaryCallable createIntentCallable; private final UnaryCallable updateIntentCallable; - private final UnaryCallable deleteIntentCallable; private final UnaryCallable batchUpdateIntentsCallable; private final OperationCallable batchUpdateIntentsOperationCallable; - private final UnaryCallable batchDeleteIntentsCallable; - private final OperationCallable - batchDeleteIntentsOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -168,6 +168,32 @@ protected GrpcIntentsStub( this.callableFactory = callableFactory; this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + GrpcCallSettings deleteIntentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteIntentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteIntentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings batchDeleteIntentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(batchDeleteIntentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(BatchDeleteIntentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings listIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listIntentsMethodDescriptor) @@ -220,19 +246,6 @@ public Map extract(UpdateIntentRequest request) { } }) .build(); - GrpcCallSettings deleteIntentTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteIntentMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteIntentRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); GrpcCallSettings batchUpdateIntentsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(batchUpdateIntentsMethodDescriptor) @@ -246,20 +259,21 @@ public Map extract(BatchUpdateIntentsRequest request) { } }) .build(); - GrpcCallSettings batchDeleteIntentsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchDeleteIntentsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchDeleteIntentsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); + this.deleteIntentCallable = + callableFactory.createUnaryCallable( + deleteIntentTransportSettings, settings.deleteIntentSettings(), clientContext); + this.batchDeleteIntentsCallable = + callableFactory.createUnaryCallable( + batchDeleteIntentsTransportSettings, + settings.batchDeleteIntentsSettings(), + clientContext); + this.batchDeleteIntentsOperationCallable = + callableFactory.createOperationCallable( + batchDeleteIntentsTransportSettings, + settings.batchDeleteIntentsOperationSettings(), + clientContext, + this.operationsStub); this.listIntentsCallable = callableFactory.createUnaryCallable( listIntentsTransportSettings, settings.listIntentsSettings(), clientContext); @@ -275,9 +289,6 @@ public Map extract(BatchDeleteIntentsRequest request) { this.updateIntentCallable = callableFactory.createUnaryCallable( updateIntentTransportSettings, settings.updateIntentSettings(), clientContext); - this.deleteIntentCallable = - callableFactory.createUnaryCallable( - deleteIntentTransportSettings, settings.deleteIntentSettings(), clientContext); this.batchUpdateIntentsCallable = callableFactory.createUnaryCallable( batchUpdateIntentsTransportSettings, @@ -289,17 +300,6 @@ public Map extract(BatchDeleteIntentsRequest request) { settings.batchUpdateIntentsOperationSettings(), clientContext, this.operationsStub); - this.batchDeleteIntentsCallable = - callableFactory.createUnaryCallable( - batchDeleteIntentsTransportSettings, - settings.batchDeleteIntentsSettings(), - clientContext); - this.batchDeleteIntentsOperationCallable = - callableFactory.createOperationCallable( - batchDeleteIntentsTransportSettings, - settings.batchDeleteIntentsOperationSettings(), - clientContext, - this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -309,6 +309,20 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + public UnaryCallable deleteIntentCallable() { + return deleteIntentCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteIntentsOperationCallable() { + return batchDeleteIntentsOperationCallable; + } + + public UnaryCallable batchDeleteIntentsCallable() { + return batchDeleteIntentsCallable; + } + public UnaryCallable listIntentsPagedCallable() { return listIntentsPagedCallable; } @@ -329,10 +343,6 @@ public UnaryCallable updateIntentCallable() { return updateIntentCallable; } - public UnaryCallable deleteIntentCallable() { - return deleteIntentCallable; - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable batchUpdateIntentsOperationCallable() { @@ -343,16 +353,6 @@ public UnaryCallable batchUpdateIntentsCal return batchUpdateIntentsCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchDeleteIntentsOperationCallable() { - return batchDeleteIntentsOperationCallable; - } - - public UnaryCallable batchDeleteIntentsCallable() { - return batchDeleteIntentsCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java index d2c5ba4df..114f808d4 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/GrpcSessionEntityTypesStub.java @@ -51,6 +51,16 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public class GrpcSessionEntityTypesStub extends SessionEntityTypesStub { + private static final MethodDescriptor + deleteSessionEntityTypeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteSessionEntityTypeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); private static final MethodDescriptor< ListSessionEntityTypesRequest, ListSessionEntityTypesResponse> listSessionEntityTypesMethodDescriptor = @@ -94,19 +104,11 @@ public class GrpcSessionEntityTypesStub extends SessionEntityTypesStub { ProtoUtils.marshaller(UpdateSessionEntityTypeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SessionEntityType.getDefaultInstance())) .build(); - private static final MethodDescriptor - deleteSessionEntityTypeMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteSessionEntityTypeRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); private final BackgroundResource backgroundResources; + private final UnaryCallable + deleteSessionEntityTypeCallable; private final UnaryCallable listSessionEntityTypesCallable; private final UnaryCallable @@ -117,8 +119,6 @@ public class GrpcSessionEntityTypesStub extends SessionEntityTypesStub { createSessionEntityTypeCallable; private final UnaryCallable updateSessionEntityTypeCallable; - private final UnaryCallable - deleteSessionEntityTypeCallable; private final GrpcStubCallableFactory callableFactory; @@ -161,6 +161,20 @@ protected GrpcSessionEntityTypesStub( throws IOException { this.callableFactory = callableFactory; + GrpcCallSettings + deleteSessionEntityTypeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteSessionEntityTypeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); GrpcCallSettings listSessionEntityTypesTransportSettings = GrpcCallSettings @@ -220,21 +234,12 @@ public Map extract(UpdateSessionEntityTypeRequest request) { } }) .build(); - GrpcCallSettings - deleteSessionEntityTypeTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteSessionEntityTypeMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteSessionEntityTypeRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); + this.deleteSessionEntityTypeCallable = + callableFactory.createUnaryCallable( + deleteSessionEntityTypeTransportSettings, + settings.deleteSessionEntityTypeSettings(), + clientContext); this.listSessionEntityTypesCallable = callableFactory.createUnaryCallable( listSessionEntityTypesTransportSettings, @@ -260,15 +265,14 @@ public Map extract(DeleteSessionEntityTypeRequest request) { updateSessionEntityTypeTransportSettings, settings.updateSessionEntityTypeSettings(), clientContext); - this.deleteSessionEntityTypeCallable = - callableFactory.createUnaryCallable( - deleteSessionEntityTypeTransportSettings, - settings.deleteSessionEntityTypeSettings(), - clientContext); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } + public UnaryCallable deleteSessionEntityTypeCallable() { + return deleteSessionEntityTypeCallable; + } + public UnaryCallable listSessionEntityTypesPagedCallable() { return listSessionEntityTypesPagedCallable; @@ -294,10 +298,6 @@ public Map extract(DeleteSessionEntityTypeRequest request) { return updateSessionEntityTypeCallable; } - public UnaryCallable deleteSessionEntityTypeCallable() { - return deleteSessionEntityTypeCallable; - } - @Override public final void close() { shutdown(); diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStub.java index 5f6e416cb..9f82de9ec 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStub.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStub.java @@ -52,6 +52,21 @@ public OperationsStub getOperationsStub() { throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); } + public UnaryCallable deleteIntentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteIntentCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + batchDeleteIntentsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: batchDeleteIntentsOperationCallable()"); + } + + public UnaryCallable batchDeleteIntentsCallable() { + throw new UnsupportedOperationException("Not implemented: batchDeleteIntentsCallable()"); + } + public UnaryCallable listIntentsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listIntentsPagedCallable()"); } @@ -72,10 +87,6 @@ public UnaryCallable updateIntentCallable() { throw new UnsupportedOperationException("Not implemented: updateIntentCallable()"); } - public UnaryCallable deleteIntentCallable() { - throw new UnsupportedOperationException("Not implemented: deleteIntentCallable()"); - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable batchUpdateIntentsOperationCallable() { @@ -87,17 +98,6 @@ public UnaryCallable batchUpdateIntentsCal throw new UnsupportedOperationException("Not implemented: batchUpdateIntentsCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchDeleteIntentsOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: batchDeleteIntentsOperationCallable()"); - } - - public UnaryCallable batchDeleteIntentsCallable() { - throw new UnsupportedOperationException("Not implemented: batchDeleteIntentsCallable()"); - } - @Override public abstract void close(); } diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java index 02eb72392..d857053a8 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/IntentsStubSettings.java @@ -80,16 +80,16 @@ *

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 getIntent to 30 seconds: + *

For example, to set the total timeout of deleteIntent to 30 seconds: * *

  * 
  * IntentsStubSettings.Builder intentsSettingsBuilder =
  *     IntentsStubSettings.newBuilder();
  * intentsSettingsBuilder
- *     .getIntentSettings()
+ *     .deleteIntentSettings()
  *     .setRetrySettings(
- *         intentsSettingsBuilder.getIntentSettings().getRetrySettings().toBuilder()
+ *         intentsSettingsBuilder.deleteIntentSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * IntentsStubSettings intentsSettings = intentsSettingsBuilder.build();
@@ -106,18 +106,35 @@ public class IntentsStubSettings extends StubSettings {
           .add("https://www.googleapis.com/auth/dialogflow")
           .build();
 
+  private final UnaryCallSettings deleteIntentSettings;
+  private final UnaryCallSettings batchDeleteIntentsSettings;
+  private final OperationCallSettings
+      batchDeleteIntentsOperationSettings;
   private final PagedCallSettings
       listIntentsSettings;
   private final UnaryCallSettings getIntentSettings;
   private final UnaryCallSettings createIntentSettings;
   private final UnaryCallSettings updateIntentSettings;
-  private final UnaryCallSettings deleteIntentSettings;
   private final UnaryCallSettings batchUpdateIntentsSettings;
   private final OperationCallSettings
       batchUpdateIntentsOperationSettings;
-  private final UnaryCallSettings batchDeleteIntentsSettings;
-  private final OperationCallSettings
-      batchDeleteIntentsOperationSettings;
+
+  /** Returns the object with the settings used for calls to deleteIntent. */
+  public UnaryCallSettings deleteIntentSettings() {
+    return deleteIntentSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteIntents. */
+  public UnaryCallSettings batchDeleteIntentsSettings() {
+    return batchDeleteIntentsSettings;
+  }
+
+  /** Returns the object with the settings used for calls to batchDeleteIntents. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchDeleteIntentsOperationSettings() {
+    return batchDeleteIntentsOperationSettings;
+  }
 
   /** Returns the object with the settings used for calls to listIntents. */
   public PagedCallSettings
@@ -140,11 +157,6 @@ public UnaryCallSettings updateIntentSettings() {
     return updateIntentSettings;
   }
 
-  /** Returns the object with the settings used for calls to deleteIntent. */
-  public UnaryCallSettings deleteIntentSettings() {
-    return deleteIntentSettings;
-  }
-
   /** Returns the object with the settings used for calls to batchUpdateIntents. */
   public UnaryCallSettings batchUpdateIntentsSettings() {
     return batchUpdateIntentsSettings;
@@ -157,18 +169,6 @@ public UnaryCallSettings batchUpdateIntent
     return batchUpdateIntentsOperationSettings;
   }
 
-  /** Returns the object with the settings used for calls to batchDeleteIntents. */
-  public UnaryCallSettings batchDeleteIntentsSettings() {
-    return batchDeleteIntentsSettings;
-  }
-
-  /** Returns the object with the settings used for calls to batchDeleteIntents. */
-  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallSettings
-      batchDeleteIntentsOperationSettings() {
-    return batchDeleteIntentsOperationSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public IntentsStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -237,17 +237,17 @@ public Builder toBuilder() {
   protected IntentsStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteIntentSettings = settingsBuilder.deleteIntentSettings().build();
+    batchDeleteIntentsSettings = settingsBuilder.batchDeleteIntentsSettings().build();
+    batchDeleteIntentsOperationSettings =
+        settingsBuilder.batchDeleteIntentsOperationSettings().build();
     listIntentsSettings = settingsBuilder.listIntentsSettings().build();
     getIntentSettings = settingsBuilder.getIntentSettings().build();
     createIntentSettings = settingsBuilder.createIntentSettings().build();
     updateIntentSettings = settingsBuilder.updateIntentSettings().build();
-    deleteIntentSettings = settingsBuilder.deleteIntentSettings().build();
     batchUpdateIntentsSettings = settingsBuilder.batchUpdateIntentsSettings().build();
     batchUpdateIntentsOperationSettings =
         settingsBuilder.batchUpdateIntentsOperationSettings().build();
-    batchDeleteIntentsSettings = settingsBuilder.batchDeleteIntentsSettings().build();
-    batchDeleteIntentsOperationSettings =
-        settingsBuilder.batchDeleteIntentsOperationSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -307,22 +307,22 @@ public ApiFuture getFuturePagedResponse(
   public static class Builder extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder deleteIntentSettings;
+    private final UnaryCallSettings.Builder
+        batchDeleteIntentsSettings;
+    private final OperationCallSettings.Builder
+        batchDeleteIntentsOperationSettings;
     private final PagedCallSettings.Builder<
             ListIntentsRequest, ListIntentsResponse, ListIntentsPagedResponse>
         listIntentsSettings;
     private final UnaryCallSettings.Builder getIntentSettings;
     private final UnaryCallSettings.Builder createIntentSettings;
     private final UnaryCallSettings.Builder updateIntentSettings;
-    private final UnaryCallSettings.Builder deleteIntentSettings;
     private final UnaryCallSettings.Builder
         batchUpdateIntentsSettings;
     private final OperationCallSettings.Builder<
             BatchUpdateIntentsRequest, BatchUpdateIntentsResponse, Struct>
         batchUpdateIntentsOperationSettings;
-    private final UnaryCallSettings.Builder
-        batchDeleteIntentsSettings;
-    private final OperationCallSettings.Builder
-        batchDeleteIntentsOperationSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -365,6 +365,12 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      batchDeleteIntentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      batchDeleteIntentsOperationSettings = OperationCallSettings.newBuilder();
+
       listIntentsSettings = PagedCallSettings.newBuilder(LIST_INTENTS_PAGE_STR_FACT);
 
       getIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -373,25 +379,19 @@ protected Builder(ClientContext clientContext) {
 
       updateIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteIntentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       batchUpdateIntentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       batchUpdateIntentsOperationSettings = OperationCallSettings.newBuilder();
 
-      batchDeleteIntentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      batchDeleteIntentsOperationSettings = OperationCallSettings.newBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteIntentSettings,
+              batchDeleteIntentsSettings,
               listIntentsSettings,
               getIntentSettings,
               createIntentSettings,
               updateIntentSettings,
-              deleteIntentSettings,
-              batchUpdateIntentsSettings,
-              batchDeleteIntentsSettings);
+              batchUpdateIntentsSettings);
 
       initDefaults(this);
     }
@@ -407,6 +407,16 @@ private static Builder createDefault() {
 
     private static Builder initDefaults(Builder builder) {
 
+      builder
+          .deleteIntentSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .batchDeleteIntentsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .listIntentsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
@@ -427,31 +437,20 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .deleteIntentSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       builder
           .batchUpdateIntentsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      builder
-          .batchDeleteIntentsSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
       builder
-          .batchUpdateIntentsOperationSettings()
+          .batchDeleteIntentsOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
-              ProtoOperationTransformers.ResponseTransformer.create(
-                  BatchUpdateIntentsResponse.class))
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
           .setMetadataTransformer(
               ProtoOperationTransformers.MetadataTransformer.create(Struct.class))
           .setPollingAlgorithm(
@@ -466,15 +465,16 @@ private static Builder initDefaults(Builder builder) {
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
-          .batchDeleteIntentsOperationSettings()
+          .batchUpdateIntentsOperationSettings()
           .setInitialCallSettings(
               UnaryCallSettings
-                  .newUnaryCallSettingsBuilder()
-                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
                   .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
                   .build())
           .setResponseTransformer(
-              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+              ProtoOperationTransformers.ResponseTransformer.create(
+                  BatchUpdateIntentsResponse.class))
           .setMetadataTransformer(
               ProtoOperationTransformers.MetadataTransformer.create(Struct.class))
           .setPollingAlgorithm(
@@ -495,27 +495,27 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(IntentsStubSettings settings) {
       super(settings);
 
+      deleteIntentSettings = settings.deleteIntentSettings.toBuilder();
+      batchDeleteIntentsSettings = settings.batchDeleteIntentsSettings.toBuilder();
+      batchDeleteIntentsOperationSettings =
+          settings.batchDeleteIntentsOperationSettings.toBuilder();
       listIntentsSettings = settings.listIntentsSettings.toBuilder();
       getIntentSettings = settings.getIntentSettings.toBuilder();
       createIntentSettings = settings.createIntentSettings.toBuilder();
       updateIntentSettings = settings.updateIntentSettings.toBuilder();
-      deleteIntentSettings = settings.deleteIntentSettings.toBuilder();
       batchUpdateIntentsSettings = settings.batchUpdateIntentsSettings.toBuilder();
       batchUpdateIntentsOperationSettings =
           settings.batchUpdateIntentsOperationSettings.toBuilder();
-      batchDeleteIntentsSettings = settings.batchDeleteIntentsSettings.toBuilder();
-      batchDeleteIntentsOperationSettings =
-          settings.batchDeleteIntentsOperationSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteIntentSettings,
+              batchDeleteIntentsSettings,
               listIntentsSettings,
               getIntentSettings,
               createIntentSettings,
               updateIntentSettings,
-              deleteIntentSettings,
-              batchUpdateIntentsSettings,
-              batchDeleteIntentsSettings);
+              batchUpdateIntentsSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -534,6 +534,25 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteIntent. */
+    public UnaryCallSettings.Builder deleteIntentSettings() {
+      return deleteIntentSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
+    public UnaryCallSettings.Builder
+        batchDeleteIntentsSettings() {
+      return batchDeleteIntentsSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchDeleteIntentsOperationSettings() {
+      return batchDeleteIntentsOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listIntents. */
     public PagedCallSettings.Builder<
             ListIntentsRequest, ListIntentsResponse, ListIntentsPagedResponse>
@@ -556,11 +575,6 @@ public UnaryCallSettings.Builder updateIntentSettin
       return updateIntentSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteIntent. */
-    public UnaryCallSettings.Builder deleteIntentSettings() {
-      return deleteIntentSettings;
-    }
-
     /** Returns the builder for the settings used for calls to batchUpdateIntents. */
     public UnaryCallSettings.Builder
         batchUpdateIntentsSettings() {
@@ -576,20 +590,6 @@ public UnaryCallSettings.Builder deleteIntentSetting
       return batchUpdateIntentsOperationSettings;
     }
 
-    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
-    public UnaryCallSettings.Builder
-        batchDeleteIntentsSettings() {
-      return batchDeleteIntentsSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to batchDeleteIntents. */
-    @BetaApi(
-        "The surface for use by generated code is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
-        batchDeleteIntentsOperationSettings() {
-      return batchDeleteIntentsOperationSettings;
-    }
-
     @Override
     public IntentsStubSettings build() throws IOException {
       return new IntentsStubSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStub.java
index 55aa7d926..f3a5ae955 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStub.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStub.java
@@ -40,6 +40,10 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public abstract class SessionEntityTypesStub implements BackgroundResource {
 
+  public UnaryCallable deleteSessionEntityTypeCallable() {
+    throw new UnsupportedOperationException("Not implemented: deleteSessionEntityTypeCallable()");
+  }
+
   public UnaryCallable
       listSessionEntityTypesPagedCallable() {
     throw new UnsupportedOperationException(
@@ -66,10 +70,6 @@ public abstract class SessionEntityTypesStub implements BackgroundResource {
     throw new UnsupportedOperationException("Not implemented: updateSessionEntityTypeCallable()");
   }
 
-  public UnaryCallable deleteSessionEntityTypeCallable() {
-    throw new UnsupportedOperationException("Not implemented: deleteSessionEntityTypeCallable()");
-  }
-
   @Override
   public abstract void close();
 }
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java
index cfa7ad384..0e9c6a5a2 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/stub/SessionEntityTypesStubSettings.java
@@ -71,16 +71,16 @@
  * 

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 getSessionEntityType to 30 seconds: + *

For example, to set the total timeout of deleteSessionEntityType to 30 seconds: * *

  * 
  * SessionEntityTypesStubSettings.Builder sessionEntityTypesSettingsBuilder =
  *     SessionEntityTypesStubSettings.newBuilder();
  * sessionEntityTypesSettingsBuilder
- *     .getSessionEntityTypeSettings()
+ *     .deleteSessionEntityTypeSettings()
  *     .setRetrySettings(
- *         sessionEntityTypesSettingsBuilder.getSessionEntityTypeSettings().getRetrySettings().toBuilder()
+ *         sessionEntityTypesSettingsBuilder.deleteSessionEntityTypeSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SessionEntityTypesStubSettings sessionEntityTypesSettings = sessionEntityTypesSettingsBuilder.build();
@@ -97,6 +97,8 @@ public class SessionEntityTypesStubSettings extends StubSettings
+      deleteSessionEntityTypeSettings;
   private final PagedCallSettings<
           ListSessionEntityTypesRequest,
           ListSessionEntityTypesResponse,
@@ -108,8 +110,12 @@ public class SessionEntityTypesStubSettings extends StubSettings
       updateSessionEntityTypeSettings;
-  private final UnaryCallSettings
-      deleteSessionEntityTypeSettings;
+
+  /** Returns the object with the settings used for calls to deleteSessionEntityType. */
+  public UnaryCallSettings
+      deleteSessionEntityTypeSettings() {
+    return deleteSessionEntityTypeSettings;
+  }
 
   /** Returns the object with the settings used for calls to listSessionEntityTypes. */
   public PagedCallSettings<
@@ -138,12 +144,6 @@ public class SessionEntityTypesStubSettings extends StubSettings
-      deleteSessionEntityTypeSettings() {
-    return deleteSessionEntityTypeSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public SessionEntityTypesStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -213,11 +213,11 @@ public Builder toBuilder() {
   protected SessionEntityTypesStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
+    deleteSessionEntityTypeSettings = settingsBuilder.deleteSessionEntityTypeSettings().build();
     listSessionEntityTypesSettings = settingsBuilder.listSessionEntityTypesSettings().build();
     getSessionEntityTypeSettings = settingsBuilder.getSessionEntityTypeSettings().build();
     createSessionEntityTypeSettings = settingsBuilder.createSessionEntityTypeSettings().build();
     updateSessionEntityTypeSettings = settingsBuilder.updateSessionEntityTypeSettings().build();
-    deleteSessionEntityTypeSettings = settingsBuilder.deleteSessionEntityTypeSettings().build();
   }
 
   private static final PagedListDescriptor<
@@ -295,6 +295,8 @@ public static class Builder
       extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
+    private final UnaryCallSettings.Builder
+        deleteSessionEntityTypeSettings;
     private final PagedCallSettings.Builder<
             ListSessionEntityTypesRequest,
             ListSessionEntityTypesResponse,
@@ -306,8 +308,6 @@ public static class Builder
         createSessionEntityTypeSettings;
     private final UnaryCallSettings.Builder
         updateSessionEntityTypeSettings;
-    private final UnaryCallSettings.Builder
-        deleteSessionEntityTypeSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -350,6 +350,8 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
+      deleteSessionEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       listSessionEntityTypesSettings =
           PagedCallSettings.newBuilder(LIST_SESSION_ENTITY_TYPES_PAGE_STR_FACT);
 
@@ -359,15 +361,13 @@ protected Builder(ClientContext clientContext) {
 
       updateSessionEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      deleteSessionEntityTypeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteSessionEntityTypeSettings,
               listSessionEntityTypesSettings,
               getSessionEntityTypeSettings,
               createSessionEntityTypeSettings,
-              updateSessionEntityTypeSettings,
-              deleteSessionEntityTypeSettings);
+              updateSessionEntityTypeSettings);
 
       initDefaults(this);
     }
@@ -383,6 +383,11 @@ private static Builder createDefault() {
 
     private static Builder initDefaults(Builder builder) {
 
+      builder
+          .deleteSessionEntityTypeSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .listSessionEntityTypesSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
@@ -403,30 +408,25 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
-      builder
-          .deleteSessionEntityTypeSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
       return builder;
     }
 
     protected Builder(SessionEntityTypesStubSettings settings) {
       super(settings);
 
+      deleteSessionEntityTypeSettings = settings.deleteSessionEntityTypeSettings.toBuilder();
       listSessionEntityTypesSettings = settings.listSessionEntityTypesSettings.toBuilder();
       getSessionEntityTypeSettings = settings.getSessionEntityTypeSettings.toBuilder();
       createSessionEntityTypeSettings = settings.createSessionEntityTypeSettings.toBuilder();
       updateSessionEntityTypeSettings = settings.updateSessionEntityTypeSettings.toBuilder();
-      deleteSessionEntityTypeSettings = settings.deleteSessionEntityTypeSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
+              deleteSessionEntityTypeSettings,
               listSessionEntityTypesSettings,
               getSessionEntityTypeSettings,
               createSessionEntityTypeSettings,
-              updateSessionEntityTypeSettings,
-              deleteSessionEntityTypeSettings);
+              updateSessionEntityTypeSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -445,6 +445,12 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
+    /** Returns the builder for the settings used for calls to deleteSessionEntityType. */
+    public UnaryCallSettings.Builder
+        deleteSessionEntityTypeSettings() {
+      return deleteSessionEntityTypeSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listSessionEntityTypes. */
     public PagedCallSettings.Builder<
             ListSessionEntityTypesRequest,
@@ -472,12 +478,6 @@ public Builder applyToAllUnaryMethods(
       return updateSessionEntityTypeSettings;
     }
 
-    /** Returns the builder for the settings used for calls to deleteSessionEntityType. */
-    public UnaryCallSettings.Builder
-        deleteSessionEntityTypeSettings() {
-      return deleteSessionEntityTypeSettings;
-    }
-
     @Override
     public SessionEntityTypesStubSettings build() throws IOException {
       return new SessionEntityTypesStubSettings(this);
diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsClient.java
index e5d90c982..99ac1c9fe 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsClient.java
@@ -425,9 +425,6 @@ public final UnaryCallable getDocumentCallable() {
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -462,9 +459,6 @@ public final OperationFuture createDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -496,9 +490,6 @@ public final OperationFuture createDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -530,9 +521,6 @@ public final OperationFuture createDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -562,9 +550,6 @@ public final OperationFuture createDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -592,9 +577,6 @@ public final UnaryCallable createDocumentCalla
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -624,9 +606,6 @@ public final OperationFuture deleteDocumentAs
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -654,9 +633,6 @@ public final OperationFuture deleteDocumentAs
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -686,9 +662,6 @@ public final OperationFuture deleteDocumentAs
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -716,9 +689,6 @@ public final OperationFuture deleteDocumentAs
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [google.protobuf.Empty][google.protobuf.Empty], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -744,9 +714,6 @@ public final UnaryCallable deleteDocumentCalla
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -775,9 +742,6 @@ public final OperationFuture updateDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -807,9 +771,6 @@ public final OperationFuture updateDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -837,9 +798,6 @@ public final OperationFuture updateDocumen
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -868,9 +826,6 @@ public final UnaryCallable updateDocumentCalla
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


@@ -897,9 +852,6 @@ public final Operation reloadDocument(ReloadDocumentRequest request) {
    * 

Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; only use * `projects.knowledgeBases.documents`. * - *

Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], metadata: - * [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> - * *

Sample code: * *


diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClient.java
index 3c4f158da..285a6bc9b 100644
--- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClient.java
+++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClient.java
@@ -264,10 +264,10 @@ public final ListEntityTypesPagedResponse listEntityTypes(String parent) {
    *
    * @param parent Required. The agent to list all entity types from. Format: `projects/<Project
    *     ID>/agent`.
-   * @param languageCode Optional. The language to list entity synonyms for. If not specified, the
-   *     agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final ListEntityTypesPagedResponse listEntityTypes(
@@ -298,10 +298,10 @@ public final ListEntityTypesPagedResponse listEntityTypes(
    *
    * @param parent Required. The agent to list all entity types from. Format: `projects/<Project
    *     ID>/agent`.
-   * @param languageCode Optional. The language to list entity synonyms for. If not specified, the
-   *     agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final ListEntityTypesPagedResponse listEntityTypes(String parent, String languageCode) {
@@ -453,10 +453,10 @@ public final EntityType getEntityType(String name) {
    *
    * @param name Required. The name of the entity type. Format: `projects/<Project
    *     ID>/agent/entityTypes/<EntityType ID>`.
-   * @param languageCode Optional. The language to retrieve entity synonyms for. If not specified,
-   *     the agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final EntityType getEntityType(EntityTypeName name, String languageCode) {
@@ -484,10 +484,10 @@ public final EntityType getEntityType(EntityTypeName name, String languageCode)
    *
    * @param name Required. The name of the entity type. Format: `projects/<Project
    *     ID>/agent/entityTypes/<EntityType ID>`.
-   * @param languageCode Optional. The language to retrieve entity synonyms for. If not specified,
-   *     the agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final EntityType getEntityType(String name, String languageCode) {
@@ -612,10 +612,10 @@ public final EntityType createEntityType(String parent, EntityType entityType) {
    * @param parent Required. The agent to create a entity type for. Format: `projects/<Project
    *     ID>/agent`.
    * @param entityType Required. The entity type to create.
-   * @param languageCode Optional. The language of entity synonyms defined in `entity_type`. If not
-   *     specified, the agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final EntityType createEntityType(
@@ -647,10 +647,10 @@ public final EntityType createEntityType(
    * @param parent Required. The agent to create a entity type for. Format: `projects/<Project
    *     ID>/agent`.
    * @param entityType Required. The entity type to create.
-   * @param languageCode Optional. The language of entity synonyms defined in `entity_type`. If not
-   *     specified, the agent's default language is used. [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.
+   * @param languageCode Optional. The language used to access language-specific data. If not
+   *     specified, the agent's default language is used. For more information, see [Multilingual
+   *     intent and entity
+   *     data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
    */
   public final EntityType createEntityType(
@@ -750,10 +750,10 @@ public final EntityType updateEntityType(EntityType entityType) {
    * 
* * @param entityType Required. The entity type to update. - * @param languageCode Optional. The language of entity synonyms defined in `entity_type`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final EntityType updateEntityType(EntityType entityType, String languageCode) { @@ -1219,10 +1219,10 @@ public final OperationFuture batchCreateEntitiesAsync( * @param parent Required. The name of the entity type to create entities in. Format: * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entities Required. The entities to create. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( @@ -1258,10 +1258,10 @@ public final OperationFuture batchCreateEntitiesAsync( * @param parent Required. The name of the entity type to create entities in. Format: * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entities Required. The entities to create. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( @@ -1447,10 +1447,10 @@ public final OperationFuture batchUpdateEntitiesAsync( * @param parent Required. The name of the entity type to update or create entities in. Format: * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entities Required. The entities to update or create. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( @@ -1487,10 +1487,10 @@ public final OperationFuture batchUpdateEntitiesAsync( * @param parent Required. The name of the entity type to update or create entities in. Format: * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entities Required. The entities to update or create. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( @@ -1682,10 +1682,10 @@ public final OperationFuture batchDeleteEntitiesAsync( * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entityValues Required. The reference `values` of the entities to delete. Note that these * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( @@ -1722,10 +1722,10 @@ public final OperationFuture batchDeleteEntitiesAsync( * `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`. * @param entityValues Required. The reference `values` of the entities to delete. Note that these * are not fully-qualified names, i.e. they don't start with `projects/<Project ID>`. - * @param languageCode Optional. The language of entity synonyms defined in `entities`. If not - * specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClient.java new file mode 100644 index 000000000..cd8cc95a2 --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClient.java @@ -0,0 +1,215 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +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.v2beta1.stub.EnvironmentsStub; +import com.google.cloud.dialogflow.v2beta1.stub.EnvironmentsStubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Manages agent environments. + * + *

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: + * + *

+ * 
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build();
+ *   ListEnvironmentsResponse response = environmentsClient.listEnvironments(request);
+ * }
+ * 
+ * 
+ * + *

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

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of EnvironmentsSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EnvironmentsClient environmentsClient =
+ *     EnvironmentsClient.create(environmentsSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EnvironmentsClient environmentsClient =
+ *     EnvironmentsClient.create(environmentsSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsClient implements BackgroundResource { + private final EnvironmentsSettings settings; + private final EnvironmentsStub stub; + + /** Constructs an instance of EnvironmentsClient with default settings. */ + public static final EnvironmentsClient create() throws IOException { + return create(EnvironmentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient create(EnvironmentsSettings settings) throws IOException { + return new EnvironmentsClient(settings); + } + + /** + * Constructs an instance of EnvironmentsClient, using the given stub for making calls. This is + * for advanced usage - prefer to use EnvironmentsSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final EnvironmentsClient create(EnvironmentsStub stub) { + return new EnvironmentsClient(stub); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient(EnvironmentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EnvironmentsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected EnvironmentsClient(EnvironmentsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final EnvironmentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the list of all non-draft environments of the specified agent. + * + *

Sample code: + * + *


+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build();
+   *   ListEnvironmentsResponse response = environmentsClient.listEnvironments(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 ListEnvironmentsResponse listEnvironments(ListEnvironmentsRequest request) { + return listEnvironmentsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns the list of all non-draft environments of the specified agent. + * + *

Sample code: + * + *


+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build();
+   *   ApiFuture<ListEnvironmentsResponse> future = environmentsClient.listEnvironmentsCallable().futureCall(request);
+   *   // Do something
+   *   ListEnvironmentsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + listEnvironmentsCallable() { + return stub.listEnvironmentsCallable(); + } + + @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); + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsSettings.java new file mode 100644 index 000000000..1e8ce8e28 --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsSettings.java @@ -0,0 +1,181 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +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.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.dialogflow.v2beta1.stub.EnvironmentsStubSettings; +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 EnvironmentsClient}. + * + *

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 listEnvironments to 30 seconds: + * + *

+ * 
+ * EnvironmentsSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .listEnvironmentsSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder.listEnvironmentsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsSettings extends ClientSettings { + /** Returns the object with the settings used for calls to listEnvironments. */ + public UnaryCallSettings + listEnvironmentsSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).listEnvironmentsSettings(); + } + + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) + throws IOException { + return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EnvironmentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EnvironmentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EnvironmentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EnvironmentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EnvironmentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EnvironmentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnvironmentsStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 EnvironmentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EnvironmentsSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(EnvironmentsStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(EnvironmentsStubSettings.newBuilder()); + } + + protected Builder(EnvironmentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EnvironmentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { + return ((EnvironmentsStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public UnaryCallSettings.Builder + listEnvironmentsSettings() { + return getStubSettingsBuilder().listEnvironmentsSettings(); + } + + @Override + public EnvironmentsSettings build() throws IOException { + return new EnvironmentsSettings(this); + } + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java index c37460300..7bafbdb91 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentsClient.java @@ -266,10 +266,10 @@ public final ListIntentsPagedResponse listIntents(String parent) { * * @param parent Required. The agent to list all intents from. Format: `projects/<Project * ID>/agent`. - * @param languageCode Optional. The language to list training phrases, parameters and rich - * messages for. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIntentsPagedResponse listIntents(ProjectAgentName parent, String languageCode) { @@ -299,10 +299,10 @@ public final ListIntentsPagedResponse listIntents(ProjectAgentName parent, Strin * * @param parent Required. The agent to list all intents from. Format: `projects/<Project * ID>/agent`. - * @param languageCode Optional. The language to list training phrases, parameters and rich - * messages for. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListIntentsPagedResponse listIntents(String parent, String languageCode) { @@ -453,10 +453,10 @@ public final Intent getIntent(String name) { * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/agent/intents/<Intent ID>`. - * @param languageCode Optional. The language to retrieve training phrases, parameters and rich - * messages for. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Intent getIntent(IntentName name, String languageCode) { @@ -484,10 +484,10 @@ public final Intent getIntent(IntentName name, String languageCode) { * * @param name Required. The name of the intent. Format: `projects/<Project * ID>/agent/intents/<Intent ID>`. - * @param languageCode Optional. The language to retrieve training phrases, parameters and rich - * messages for. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Intent getIntent(String name, String languageCode) { @@ -612,10 +612,10 @@ public final Intent createIntent(String parent, Intent intent) { * @param parent Required. The agent to create a intent for. Format: `projects/<Project * ID>/agent`. * @param intent Required. The intent to create. - * @param languageCode Optional. The language of training phrases, parameters and rich messages - * defined in `intent`. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Intent createIntent(ProjectAgentName parent, Intent intent, String languageCode) { @@ -646,10 +646,10 @@ public final Intent createIntent(ProjectAgentName parent, Intent intent, String * @param parent Required. The agent to create a intent for. Format: `projects/<Project * ID>/agent`. * @param intent Required. The intent to create. - * @param languageCode Optional. The language of training phrases, parameters and rich messages - * defined in `intent`. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Intent createIntent(String parent, Intent intent, String languageCode) { @@ -726,10 +726,10 @@ public final UnaryCallable createIntentCallable() { *

* * @param intent Required. The intent to update. - * @param languageCode Optional. The language of training phrases, parameters and rich messages - * defined in `intent`. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Intent updateIntent(Intent intent, String languageCode) { @@ -754,10 +754,10 @@ public final Intent updateIntent(Intent intent, String languageCode) { *
* * @param intent Required. The intent to update. - * @param languageCode Optional. The language of training phrases, parameters and rich messages - * defined in `intent`. If not specified, the agent's default language is used. [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. + * @param languageCode Optional. The language used to access language-specific data. If not + * specified, the agent's default language is used. For more information, see [Multilingual + * intent and entity + * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). * @param updateMask Optional. The mask to control which fields get updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClient.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClient.java index 4eb84d003..d6ecb1b18 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClient.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClient.java @@ -587,12 +587,7 @@ public final SessionEntityType createSessionEntityType(CreateSessionEntityTypeRe * } *
* - * @param sessionEntityType Required. The entity type to update. Format: `projects/<Project - * ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>` or - * `projects/<Project ID>/agent/environments/<Environment ID>/users/<User - * ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If - * `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is - * not specified, we assume default '-' user. + * @param sessionEntityType Required. The session entity type to update. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SessionEntityType updateSessionEntityType(SessionEntityType sessionEntityType) { diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/package-info.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/package-info.java index 128710b5b..4ae803685 100644 --- a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/package-info.java +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/package-info.java @@ -140,6 +140,21 @@ * *
* + * ================== EnvironmentsClient ================== + * + *

Service Description: Manages agent environments. + * + *

Sample for EnvironmentsClient: + * + *

+ * 
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build();
+ *   ListEnvironmentsResponse response = environmentsClient.listEnvironments(request);
+ * }
+ * 
+ * 
+ * * ============= IntentsClient ============= * *

Service Description: An intent represents a mapping between input from a user and an action to diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStub.java new file mode 100644 index 000000000..b6441f17f --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStub.java @@ -0,0 +1,42 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1.stub; + +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.v2beta1.ListEnvironmentsRequest; +import com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Dialogflow API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class EnvironmentsStub implements BackgroundResource { + + public UnaryCallable + listEnvironmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStubSettings.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStubSettings.java new file mode 100644 index 000000000..77bb95264 --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/EnvironmentsStubSettings.java @@ -0,0 +1,277 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1.stub; + +import com.google.api.core.ApiFunction; +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.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +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.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; +import com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; +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 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 EnvironmentsStub}. + * + *

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 listEnvironments to 30 seconds: + * + *

+ * 
+ * EnvironmentsStubSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsStubSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .listEnvironmentsSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder.listEnvironmentsSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsStubSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class EnvironmentsStubSettings 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 + listEnvironmentsSettings; + + /** Returns the object with the settings used for calls to listEnvironments. */ + public UnaryCallSettings + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEnvironmentsStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** 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 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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + 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 defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EnvironmentsStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** 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 EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build(); + } + + /** Builder for EnvironmentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + listEnvironmentsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + 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(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listEnvironmentsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listEnvironmentsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .listEnvironmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(EnvironmentsStubSettings settings) { + super(settings); + + listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listEnvironmentsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public UnaryCallSettings.Builder + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + @Override + public EnvironmentsStubSettings build() throws IOException { + return new EnvironmentsStubSettings(this); + } + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsCallableFactory.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsCallableFactory.java new file mode 100644 index 000000000..195d1ba0d --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1.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.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Dialogflow API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcEnvironmentsCallableFactory 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 pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsStub.java new file mode 100644 index 000000000..0651ec3cb --- /dev/null +++ b/google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2beta1/stub/GrpcEnvironmentsStub.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1.stub; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest; +import com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse; +import com.google.common.collect.ImmutableMap; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Dialogflow API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcEnvironmentsStub extends EnvironmentsStub { + + private static final MethodDescriptor + listEnvironmentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dialogflow.v2beta1.Environments/ListEnvironments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnvironmentsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable + listEnvironmentsCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEnvironmentsStub create(EnvironmentsStubSettings settings) + throws IOException { + return new GrpcEnvironmentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEnvironmentsStub create(ClientContext clientContext) throws IOException { + return new GrpcEnvironmentsStub(EnvironmentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEnvironmentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEnvironmentsStub( + EnvironmentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub(EnvironmentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEnvironmentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub( + EnvironmentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings + listEnvironmentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEnvironmentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEnvironmentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listEnvironmentsCallable = + callableFactory.createUnaryCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable + listEnvironmentsCallable() { + return listEnvironmentsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/AgentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/AgentsClientTest.java index 818ee71c3..4de74f8e9 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/AgentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/AgentsClientTest.java @@ -49,6 +49,7 @@ public class AgentsClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -61,6 +62,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -71,6 +73,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -102,7 +105,7 @@ public void tearDown() throws Exception { @Test @SuppressWarnings("all") public void setAgentTest() { - String parent = "parent-995424086"; + ProjectName parent = ProjectName.of("[PROJECT]"); String displayName = "displayName1615086568"; String defaultLanguageCode = "defaultLanguageCode856575222"; String timeZone = "timeZone36848094"; @@ -112,7 +115,7 @@ public void setAgentTest() { float classificationThreshold = 1.11581064E8F; Agent expectedResponse = Agent.newBuilder() - .setParent(parent) + .setParent(parent.toString()) .setDisplayName(displayName) .setDefaultLanguageCode(defaultLanguageCode) .setTimeZone(timeZone) @@ -192,62 +195,6 @@ public void deleteAgentExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void getAgentTest() { - String parent2 = "parent21175163357"; - String displayName = "displayName1615086568"; - String defaultLanguageCode = "defaultLanguageCode856575222"; - String timeZone = "timeZone36848094"; - String description = "description-1724546052"; - String avatarUri = "avatarUri-402824826"; - boolean enableLogging = false; - float classificationThreshold = 1.11581064E8F; - Agent expectedResponse = - Agent.newBuilder() - .setParent(parent2) - .setDisplayName(displayName) - .setDefaultLanguageCode(defaultLanguageCode) - .setTimeZone(timeZone) - .setDescription(description) - .setAvatarUri(avatarUri) - .setEnableLogging(enableLogging) - .setClassificationThreshold(classificationThreshold) - .build(); - mockAgents.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - Agent actualResponse = client.getAgent(parent); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAgents.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAgentRequest actualRequest = (GetAgentRequest) actualRequests.get(0); - - Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getAgentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAgents.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - - client.getAgent(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void searchAgentsTest() { @@ -392,26 +339,26 @@ public void exportAgentExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void importAgentTest() throws Exception { + public void restoreAgentTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() - .setName("importAgentTest") + .setName("restoreAgentTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockAgents.addResponse(resultOperation); ProjectName parent = ProjectName.of("[PROJECT]"); - ImportAgentRequest request = - ImportAgentRequest.newBuilder().setParent(parent.toString()).build(); + RestoreAgentRequest request = + RestoreAgentRequest.newBuilder().setParent(parent.toString()).build(); - Empty actualResponse = client.importAgentAsync(request).get(); + Empty actualResponse = client.restoreAgentAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAgents.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ImportAgentRequest actualRequest = (ImportAgentRequest) actualRequests.get(0); + RestoreAgentRequest actualRequest = (RestoreAgentRequest) actualRequests.get(0); Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); Assert.assertTrue( @@ -422,16 +369,16 @@ public void importAgentTest() throws Exception { @Test @SuppressWarnings("all") - public void importAgentExceptionTest() throws Exception { + public void restoreAgentExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockAgents.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); - ImportAgentRequest request = - ImportAgentRequest.newBuilder().setParent(parent.toString()).build(); + RestoreAgentRequest request = + RestoreAgentRequest.newBuilder().setParent(parent.toString()).build(); - client.importAgentAsync(request).get(); + client.restoreAgentAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -442,26 +389,82 @@ public void importAgentExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void restoreAgentTest() throws Exception { + public void getAgentTest() { + ProjectName parent2 = ProjectName.of("[PROJECT]"); + String displayName = "displayName1615086568"; + String defaultLanguageCode = "defaultLanguageCode856575222"; + String timeZone = "timeZone36848094"; + String description = "description-1724546052"; + String avatarUri = "avatarUri-402824826"; + boolean enableLogging = false; + float classificationThreshold = 1.11581064E8F; + Agent expectedResponse = + Agent.newBuilder() + .setParent(parent2.toString()) + .setDisplayName(displayName) + .setDefaultLanguageCode(defaultLanguageCode) + .setTimeZone(timeZone) + .setDescription(description) + .setAvatarUri(avatarUri) + .setEnableLogging(enableLogging) + .setClassificationThreshold(classificationThreshold) + .build(); + mockAgents.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + Agent actualResponse = client.getAgent(parent); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAgents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAgentRequest actualRequest = (GetAgentRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getAgentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAgents.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + + client.getAgent(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void importAgentTest() throws Exception { Empty expectedResponse = Empty.newBuilder().build(); Operation resultOperation = Operation.newBuilder() - .setName("restoreAgentTest") + .setName("importAgentTest") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockAgents.addResponse(resultOperation); ProjectName parent = ProjectName.of("[PROJECT]"); - RestoreAgentRequest request = - RestoreAgentRequest.newBuilder().setParent(parent.toString()).build(); + ImportAgentRequest request = + ImportAgentRequest.newBuilder().setParent(parent.toString()).build(); - Empty actualResponse = client.restoreAgentAsync(request).get(); + Empty actualResponse = client.importAgentAsync(request).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockAgents.getRequests(); Assert.assertEquals(1, actualRequests.size()); - RestoreAgentRequest actualRequest = (RestoreAgentRequest) actualRequests.get(0); + ImportAgentRequest actualRequest = (ImportAgentRequest) actualRequests.get(0); Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); Assert.assertTrue( @@ -472,16 +475,16 @@ public void restoreAgentTest() throws Exception { @Test @SuppressWarnings("all") - public void restoreAgentExceptionTest() throws Exception { + public void importAgentExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockAgents.addException(exception); try { ProjectName parent = ProjectName.of("[PROJECT]"); - RestoreAgentRequest request = - RestoreAgentRequest.newBuilder().setParent(parent.toString()).build(); + ImportAgentRequest request = + ImportAgentRequest.newBuilder().setParent(parent.toString()).build(); - client.restoreAgentAsync(request).get(); + client.importAgentAsync(request).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -496,7 +499,9 @@ public void getValidationResultTest() { ValidationResult expectedResponse = ValidationResult.newBuilder().build(); mockAgents.addResponse(expectedResponse); - GetValidationResultRequest request = GetValidationResultRequest.newBuilder().build(); + ProjectName parent = ProjectName.of("[PROJECT]"); + GetValidationResultRequest request = + GetValidationResultRequest.newBuilder().setParent(parent.toString()).build(); ValidationResult actualResponse = client.getValidationResult(request); Assert.assertEquals(expectedResponse, actualResponse); @@ -505,6 +510,7 @@ public void getValidationResultTest() { Assert.assertEquals(1, actualRequests.size()); GetValidationResultRequest actualRequest = (GetValidationResultRequest) actualRequests.get(0); + Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -518,7 +524,9 @@ public void getValidationResultExceptionTest() throws Exception { mockAgents.addException(exception); try { - GetValidationResultRequest request = GetValidationResultRequest.newBuilder().build(); + ProjectName parent = ProjectName.of("[PROJECT]"); + GetValidationResultRequest request = + GetValidationResultRequest.newBuilder().setParent(parent.toString()).build(); client.getValidationResult(request); Assert.fail("No exception raised"); diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ContextsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ContextsClientTest.java index bcb3ba47e..df44df508 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ContextsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/ContextsClientTest.java @@ -27,6 +27,7 @@ import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import io.grpc.Status; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -45,6 +46,7 @@ public class ContextsClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -57,6 +59,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -67,6 +70,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -97,30 +101,20 @@ public void tearDown() throws Exception { @Test @SuppressWarnings("all") - public void listContextsTest() { - String nextPageToken = ""; - Context contextsElement = Context.newBuilder().build(); - List contexts = Arrays.asList(contextsElement); - ListContextsResponse expectedResponse = - ListContextsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllContexts(contexts) - .build(); + public void deleteContextTest() { + Empty expectedResponse = Empty.newBuilder().build(); mockContexts.addResponse(expectedResponse); - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); - - ListContextsPagedResponse pagedListResponse = client.listContexts(parent); + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getContextsList().get(0), resources.get(0)); + client.deleteContext(name); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - ListContextsRequest actualRequest = (ListContextsRequest) actualRequests.get(0); + DeleteContextRequest actualRequest = (DeleteContextRequest) actualRequests.get(0); - Assert.assertEquals(parent, SessionName.parse(actualRequest.getParent())); + Assert.assertEquals(name, ContextName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -129,14 +123,15 @@ public void listContextsTest() { @Test @SuppressWarnings("all") - public void listContextsExceptionTest() throws Exception { + public void deleteContextExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); - client.listContexts(parent); + client.deleteContext(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -145,23 +140,19 @@ public void listContextsExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void getContextTest() { - ContextName name2 = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); - int lifespanCount = 1178775510; - Context expectedResponse = - Context.newBuilder().setName(name2.toString()).setLifespanCount(lifespanCount).build(); + public void deleteAllContextsTest() { + Empty expectedResponse = Empty.newBuilder().build(); mockContexts.addResponse(expectedResponse); - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); - Context actualResponse = client.getContext(name); - Assert.assertEquals(expectedResponse, actualResponse); + client.deleteAllContexts(parent); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - GetContextRequest actualRequest = (GetContextRequest) actualRequests.get(0); + DeleteAllContextsRequest actualRequest = (DeleteAllContextsRequest) actualRequests.get(0); - Assert.assertEquals(name, ContextName.parse(actualRequest.getName())); + Assert.assertEquals(parent, SessionName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -170,14 +161,14 @@ public void getContextTest() { @Test @SuppressWarnings("all") - public void getContextExceptionTest() throws Exception { + public void deleteAllContextsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); - client.getContext(name); + client.deleteAllContexts(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -186,25 +177,30 @@ public void getContextExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void createContextTest() { - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); - int lifespanCount = 1178775510; - Context expectedResponse = - Context.newBuilder().setName(name.toString()).setLifespanCount(lifespanCount).build(); + public void listContextsTest() { + String nextPageToken = ""; + Context contextsElement = Context.newBuilder().build(); + List contexts = Arrays.asList(contextsElement); + ListContextsResponse expectedResponse = + ListContextsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllContexts(contexts) + .build(); mockContexts.addResponse(expectedResponse); - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); - Context context = Context.newBuilder().build(); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); - Context actualResponse = client.createContext(parent, context); - Assert.assertEquals(expectedResponse, actualResponse); + ListContextsPagedResponse pagedListResponse = client.listContexts(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getContextsList().get(0), resources.get(0)); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - CreateContextRequest actualRequest = (CreateContextRequest) actualRequests.get(0); + ListContextsRequest actualRequest = (ListContextsRequest) actualRequests.get(0); Assert.assertEquals(parent, SessionName.parse(actualRequest.getParent())); - Assert.assertEquals(context, actualRequest.getContext()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -213,15 +209,14 @@ public void createContextTest() { @Test @SuppressWarnings("all") - public void createContextExceptionTest() throws Exception { + public void listContextsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); - Context context = Context.newBuilder().build(); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); - client.createContext(parent, context); + client.listContexts(parent); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -230,23 +225,25 @@ public void createContextExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void updateContextTest() { - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); + public void getContextTest() { + ContextName name2 = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); int lifespanCount = 1178775510; Context expectedResponse = - Context.newBuilder().setName(name.toString()).setLifespanCount(lifespanCount).build(); + Context.newBuilder().setName(name2.toString()).setLifespanCount(lifespanCount).build(); mockContexts.addResponse(expectedResponse); - Context context = Context.newBuilder().build(); + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); - Context actualResponse = client.updateContext(context); + Context actualResponse = client.getContext(name); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - UpdateContextRequest actualRequest = (UpdateContextRequest) actualRequests.get(0); + GetContextRequest actualRequest = (GetContextRequest) actualRequests.get(0); - Assert.assertEquals(context, actualRequest.getContext()); + Assert.assertEquals(name, ContextName.parse(actualRequest.getName())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -255,14 +252,15 @@ public void updateContextTest() { @Test @SuppressWarnings("all") - public void updateContextExceptionTest() throws Exception { + public void getContextExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - Context context = Context.newBuilder().build(); + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); - client.updateContext(context); + client.getContext(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -271,19 +269,26 @@ public void updateContextExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void deleteContextTest() { - Empty expectedResponse = Empty.newBuilder().build(); + public void createContextTest() { + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); + int lifespanCount = 1178775510; + Context expectedResponse = + Context.newBuilder().setName(name.toString()).setLifespanCount(lifespanCount).build(); mockContexts.addResponse(expectedResponse); - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); + Context context = Context.newBuilder().build(); - client.deleteContext(name); + Context actualResponse = client.createContext(parent, context); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteContextRequest actualRequest = (DeleteContextRequest) actualRequests.get(0); + CreateContextRequest actualRequest = (CreateContextRequest) actualRequests.get(0); - Assert.assertEquals(name, ContextName.parse(actualRequest.getName())); + Assert.assertEquals(parent, SessionName.parse(actualRequest.getParent())); + Assert.assertEquals(context, actualRequest.getContext()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -292,14 +297,15 @@ public void deleteContextTest() { @Test @SuppressWarnings("all") - public void deleteContextExceptionTest() throws Exception { + public void createContextExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - ContextName name = ContextName.of("[PROJECT]", "[SESSION]", "[CONTEXT]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); + Context context = Context.newBuilder().build(); - client.deleteContext(name); + client.createContext(parent, context); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception @@ -308,19 +314,26 @@ public void deleteContextExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void deleteAllContextsTest() { - Empty expectedResponse = Empty.newBuilder().build(); + public void updateContextTest() { + ContextName name = + ContextName.ofProjectSessionContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"); + int lifespanCount = 1178775510; + Context expectedResponse = + Context.newBuilder().setName(name.toString()).setLifespanCount(lifespanCount).build(); mockContexts.addResponse(expectedResponse); - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + Context context = Context.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteAllContexts(parent); + Context actualResponse = client.updateContext(context, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockContexts.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteAllContextsRequest actualRequest = (DeleteAllContextsRequest) actualRequests.get(0); + UpdateContextRequest actualRequest = (UpdateContextRequest) actualRequests.get(0); - Assert.assertEquals(parent, SessionName.parse(actualRequest.getParent())); + Assert.assertEquals(context, actualRequest.getContext()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -329,14 +342,15 @@ public void deleteAllContextsTest() { @Test @SuppressWarnings("all") - public void deleteAllContextsExceptionTest() throws Exception { + public void updateContextExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockContexts.addException(exception); try { - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + Context context = Context.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); - client.deleteAllContexts(parent); + client.updateContext(context, updateMask); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EntityTypesClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EntityTypesClientTest.java index c8a604b16..f9015f237 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EntityTypesClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EntityTypesClientTest.java @@ -50,6 +50,7 @@ public class EntityTypesClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -62,6 +63,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -72,6 +74,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -100,6 +103,195 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteEntityTypeTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockEntityTypes.addResponse(expectedResponse); + + EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + + client.deleteEntityType(name); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEntityTypeRequest actualRequest = (DeleteEntityTypeRequest) actualRequests.get(0); + + Assert.assertEquals(name, EntityTypeName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteEntityTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + + client.deleteEntityType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void batchDeleteEntityTypesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteEntityTypesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + AgentName parent = AgentName.of("[PROJECT]"); + List entityTypeNames = new ArrayList<>(); + + Empty actualResponse = client.batchDeleteEntityTypesAsync(parent, entityTypeNames).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteEntityTypesRequest actualRequest = + (BatchDeleteEntityTypesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); + Assert.assertEquals(entityTypeNames, actualRequest.getEntityTypeNamesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchDeleteEntityTypesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]"); + List entityTypeNames = new ArrayList<>(); + + client.batchDeleteEntityTypesAsync(parent, entityTypeNames).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 + @SuppressWarnings("all") + public void batchDeleteEntitiesTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteEntitiesTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + List entityValues = new ArrayList<>(); + + Empty actualResponse = client.batchDeleteEntitiesAsync(parent, entityValues).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteEntitiesRequest actualRequest = (BatchDeleteEntitiesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntityTypeName.parse(actualRequest.getParent())); + Assert.assertEquals(entityValues, actualRequest.getEntityValuesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchDeleteEntitiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + List entityValues = new ArrayList<>(); + + client.batchDeleteEntitiesAsync(parent, entityValues).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 + @SuppressWarnings("all") + public void batchDeleteEntitiesTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteEntitiesTest2") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEntityTypes.addResponse(resultOperation); + + EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + List entityValues = new ArrayList<>(); + String languageCode = "languageCode-412800396"; + + Empty actualResponse = + client.batchDeleteEntitiesAsync(parent, entityValues, languageCode).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteEntitiesRequest actualRequest = (BatchDeleteEntitiesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, EntityTypeName.parse(actualRequest.getParent())); + Assert.assertEquals(entityValues, actualRequest.getEntityValuesList()); + Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchDeleteEntitiesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEntityTypes.addException(exception); + + try { + EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); + List entityValues = new ArrayList<>(); + String languageCode = "languageCode-412800396"; + + client.batchDeleteEntitiesAsync(parent, entityValues, languageCode).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 @SuppressWarnings("all") public void listEntityTypesTest() { @@ -113,7 +305,7 @@ public void listEntityTypesTest() { .build(); mockEntityTypes.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent); @@ -125,7 +317,7 @@ public void listEntityTypesTest() { Assert.assertEquals(1, actualRequests.size()); ListEntityTypesRequest actualRequest = (ListEntityTypesRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -139,7 +331,7 @@ public void listEntityTypesExceptionTest() throws Exception { mockEntityTypes.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); client.listEntityTypes(parent); Assert.fail("No exception raised"); @@ -161,7 +353,7 @@ public void listEntityTypesTest2() { .build(); mockEntityTypes.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); String languageCode = "languageCode-412800396"; ListEntityTypesPagedResponse pagedListResponse = client.listEntityTypes(parent, languageCode); @@ -174,7 +366,7 @@ public void listEntityTypesTest2() { Assert.assertEquals(1, actualRequests.size()); ListEntityTypesRequest actualRequest = (ListEntityTypesRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -189,7 +381,7 @@ public void listEntityTypesExceptionTest2() throws Exception { mockEntityTypes.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); String languageCode = "languageCode-412800396"; client.listEntityTypes(parent, languageCode); @@ -308,7 +500,7 @@ public void createEntityTypeTest() { .build(); mockEntityTypes.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); EntityType entityType = EntityType.newBuilder().build(); EntityType actualResponse = client.createEntityType(parent, entityType); @@ -318,7 +510,7 @@ public void createEntityTypeTest() { Assert.assertEquals(1, actualRequests.size()); CreateEntityTypeRequest actualRequest = (CreateEntityTypeRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(entityType, actualRequest.getEntityType()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -333,7 +525,7 @@ public void createEntityTypeExceptionTest() throws Exception { mockEntityTypes.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); EntityType entityType = EntityType.newBuilder().build(); client.createEntityType(parent, entityType); @@ -357,7 +549,7 @@ public void createEntityTypeTest2() { .build(); mockEntityTypes.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); EntityType entityType = EntityType.newBuilder().build(); String languageCode = "languageCode-412800396"; @@ -368,7 +560,7 @@ public void createEntityTypeTest2() { Assert.assertEquals(1, actualRequests.size()); CreateEntityTypeRequest actualRequest = (CreateEntityTypeRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(entityType, actualRequest.getEntityType()); Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); Assert.assertTrue( @@ -384,7 +576,7 @@ public void createEntityTypeExceptionTest2() throws Exception { mockEntityTypes.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); EntityType entityType = EntityType.newBuilder().build(); String languageCode = "languageCode-412800396"; @@ -487,43 +679,6 @@ public void updateEntityTypeExceptionTest2() throws Exception { } } - @Test - @SuppressWarnings("all") - public void deleteEntityTypeTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockEntityTypes.addResponse(expectedResponse); - - EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - - client.deleteEntityType(name); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteEntityTypeRequest actualRequest = (DeleteEntityTypeRequest) actualRequests.get(0); - - Assert.assertEquals(name, EntityTypeName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteEntityTypeExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - EntityTypeName name = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - - client.deleteEntityType(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void batchUpdateEntityTypesTest() throws Exception { @@ -537,7 +692,7 @@ public void batchUpdateEntityTypesTest() throws Exception { .build(); mockEntityTypes.addResponse(resultOperation); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder().setParent(parent.toString()).build(); @@ -550,7 +705,7 @@ public void batchUpdateEntityTypesTest() throws Exception { BatchUpdateEntityTypesRequest actualRequest = (BatchUpdateEntityTypesRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -564,7 +719,7 @@ public void batchUpdateEntityTypesExceptionTest() throws Exception { mockEntityTypes.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); BatchUpdateEntityTypesRequest request = BatchUpdateEntityTypesRequest.newBuilder().setParent(parent.toString()).build(); @@ -577,56 +732,6 @@ public void batchUpdateEntityTypesExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void batchDeleteEntityTypesTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchDeleteEntityTypesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEntityTypes.addResponse(resultOperation); - - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - List entityTypeNames = new ArrayList<>(); - - Empty actualResponse = client.batchDeleteEntityTypesAsync(parent, entityTypeNames).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchDeleteEntityTypesRequest actualRequest = - (BatchDeleteEntityTypesRequest) actualRequests.get(0); - - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); - Assert.assertEquals(entityTypeNames, actualRequest.getEntityTypeNamesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void batchDeleteEntityTypesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - List entityTypeNames = new ArrayList<>(); - - client.batchDeleteEntityTypesAsync(parent, entityTypeNames).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 @SuppressWarnings("all") public void batchCreateEntitiesTest() throws Exception { @@ -828,106 +933,4 @@ public void batchUpdateEntitiesExceptionTest2() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } - - @Test - @SuppressWarnings("all") - public void batchDeleteEntitiesTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchDeleteEntitiesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEntityTypes.addResponse(resultOperation); - - EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - List entityValues = new ArrayList<>(); - - Empty actualResponse = client.batchDeleteEntitiesAsync(parent, entityValues).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchDeleteEntitiesRequest actualRequest = (BatchDeleteEntitiesRequest) actualRequests.get(0); - - Assert.assertEquals(parent, EntityTypeName.parse(actualRequest.getParent())); - Assert.assertEquals(entityValues, actualRequest.getEntityValuesList()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void batchDeleteEntitiesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - List entityValues = new ArrayList<>(); - - client.batchDeleteEntitiesAsync(parent, entityValues).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 - @SuppressWarnings("all") - public void batchDeleteEntitiesTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchDeleteEntitiesTest2") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockEntityTypes.addResponse(resultOperation); - - EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - List entityValues = new ArrayList<>(); - String languageCode = "languageCode-412800396"; - - Empty actualResponse = - client.batchDeleteEntitiesAsync(parent, entityValues, languageCode).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockEntityTypes.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchDeleteEntitiesRequest actualRequest = (BatchDeleteEntitiesRequest) actualRequests.get(0); - - Assert.assertEquals(parent, EntityTypeName.parse(actualRequest.getParent())); - Assert.assertEquals(entityValues, actualRequest.getEntityValuesList()); - Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void batchDeleteEntitiesExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockEntityTypes.addException(exception); - - try { - EntityTypeName parent = EntityTypeName.of("[PROJECT]", "[ENTITY_TYPE]"); - List entityValues = new ArrayList<>(); - String languageCode = "languageCode-412800396"; - - client.batchDeleteEntitiesAsync(parent, entityValues, languageCode).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()); - } - } } diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EnvironmentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EnvironmentsClientTest.java new file mode 100644 index 000000000..b6c0e75b8 --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/EnvironmentsClientTest.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +import static com.google.cloud.dialogflow.v2.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class EnvironmentsClientTest { + private static MockAgents mockAgents; + private static MockContexts mockContexts; + private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; + private static MockIntents mockIntents; + private static MockSessionEntityTypes mockSessionEntityTypes; + private static MockSessions mockSessions; + private static MockServiceHelper serviceHelper; + private EnvironmentsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAgents = new MockAgents(); + mockContexts = new MockContexts(); + mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); + mockIntents = new MockIntents(); + mockSessionEntityTypes = new MockSessionEntityTypes(); + mockSessions = new MockSessions(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockAgents, + mockContexts, + mockEntityTypes, + mockEnvironments, + mockIntents, + mockSessionEntityTypes, + mockSessions)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + EnvironmentsSettings settings = + EnvironmentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnvironmentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void listEnvironmentsTest() { + String nextPageToken = ""; + Environment environmentsElement = Environment.newBuilder().build(); + List environments = Arrays.asList(environmentsElement); + ListEnvironmentsResponse expectedResponse = + ListEnvironmentsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllEnvironments(environments) + .build(); + mockEnvironments.addResponse(expectedResponse); + + AgentName parent = AgentName.of("[PROJECT]"); + ListEnvironmentsRequest request = + ListEnvironmentsRequest.newBuilder().setParent(parent.toString()).build(); + + ListEnvironmentsPagedResponse pagedListResponse = client.listEnvironments(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEnvironmentsList().get(0), resources.get(0)); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnvironmentsRequest actualRequest = (ListEnvironmentsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listEnvironmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]"); + ListEnvironmentsRequest request = + ListEnvironmentsRequest.newBuilder().setParent(parent.toString()).build(); + + client.listEnvironments(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/IntentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/IntentsClientTest.java index b32dd6ff4..4c59fc56a 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/IntentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/IntentsClientTest.java @@ -50,6 +50,7 @@ public class IntentsClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -62,6 +63,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -72,6 +74,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -100,6 +103,92 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteIntentTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockIntents.addResponse(expectedResponse); + + IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); + + client.deleteIntent(name); + + List actualRequests = mockIntents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteIntentRequest actualRequest = (DeleteIntentRequest) actualRequests.get(0); + + Assert.assertEquals(name, IntentName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteIntentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockIntents.addException(exception); + + try { + IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); + + client.deleteIntent(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void batchDeleteIntentsTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("batchDeleteIntentsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockIntents.addResponse(resultOperation); + + AgentName parent = AgentName.of("[PROJECT]"); + List intents = new ArrayList<>(); + + Empty actualResponse = client.batchDeleteIntentsAsync(parent, intents).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockIntents.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + BatchDeleteIntentsRequest actualRequest = (BatchDeleteIntentsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); + Assert.assertEquals(intents, actualRequest.getIntentsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void batchDeleteIntentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockIntents.addException(exception); + + try { + AgentName parent = AgentName.of("[PROJECT]"); + List intents = new ArrayList<>(); + + client.batchDeleteIntentsAsync(parent, intents).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 @SuppressWarnings("all") public void listIntentsTest() { @@ -113,7 +202,7 @@ public void listIntentsTest() { .build(); mockIntents.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); ListIntentsPagedResponse pagedListResponse = client.listIntents(parent); @@ -125,7 +214,7 @@ public void listIntentsTest() { Assert.assertEquals(1, actualRequests.size()); ListIntentsRequest actualRequest = (ListIntentsRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -139,7 +228,7 @@ public void listIntentsExceptionTest() throws Exception { mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); client.listIntents(parent); Assert.fail("No exception raised"); @@ -161,7 +250,7 @@ public void listIntentsTest2() { .build(); mockIntents.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); String languageCode = "languageCode-412800396"; ListIntentsPagedResponse pagedListResponse = client.listIntents(parent, languageCode); @@ -174,7 +263,7 @@ public void listIntentsTest2() { Assert.assertEquals(1, actualRequests.size()); ListIntentsRequest actualRequest = (ListIntentsRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -189,7 +278,7 @@ public void listIntentsExceptionTest2() throws Exception { mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); String languageCode = "languageCode-412800396"; client.listIntents(parent, languageCode); @@ -344,7 +433,7 @@ public void createIntentTest() { .build(); mockIntents.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder().build(); Intent actualResponse = client.createIntent(parent, intent); @@ -354,7 +443,7 @@ public void createIntentTest() { Assert.assertEquals(1, actualRequests.size()); CreateIntentRequest actualRequest = (CreateIntentRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(intent, actualRequest.getIntent()); Assert.assertTrue( channelProvider.isHeaderSent( @@ -369,7 +458,7 @@ public void createIntentExceptionTest() throws Exception { mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder().build(); client.createIntent(parent, intent); @@ -405,7 +494,7 @@ public void createIntentTest2() { .build(); mockIntents.addResponse(expectedResponse); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder().build(); String languageCode = "languageCode-412800396"; @@ -416,7 +505,7 @@ public void createIntentTest2() { Assert.assertEquals(1, actualRequests.size()); CreateIntentRequest actualRequest = (CreateIntentRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); Assert.assertEquals(intent, actualRequest.getIntent()); Assert.assertEquals(languageCode, actualRequest.getLanguageCode()); Assert.assertTrue( @@ -432,7 +521,7 @@ public void createIntentExceptionTest2() throws Exception { mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); + AgentName parent = AgentName.of("[PROJECT]"); Intent intent = Intent.newBuilder().build(); String languageCode = "languageCode-412800396"; @@ -565,43 +654,6 @@ public void updateIntentExceptionTest2() throws Exception { } } - @Test - @SuppressWarnings("all") - public void deleteIntentTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockIntents.addResponse(expectedResponse); - - IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); - - client.deleteIntent(name); - - List actualRequests = mockIntents.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteIntentRequest actualRequest = (DeleteIntentRequest) actualRequests.get(0); - - Assert.assertEquals(name, IntentName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteIntentExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockIntents.addException(exception); - - try { - IntentName name = IntentName.of("[PROJECT]", "[INTENT]"); - - client.deleteIntent(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - @Test @SuppressWarnings("all") public void batchUpdateIntentsTest() throws Exception { @@ -614,18 +666,19 @@ public void batchUpdateIntentsTest() throws Exception { .build(); mockIntents.addResponse(resultOperation); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - BatchUpdateIntentsRequest request = - BatchUpdateIntentsRequest.newBuilder().setParent(parent.toString()).build(); + AgentName parent = AgentName.of("[PROJECT]"); + String intentBatchUri = "intentBatchUri-969851644"; - BatchUpdateIntentsResponse actualResponse = client.batchUpdateIntentsAsync(request).get(); + BatchUpdateIntentsResponse actualResponse = + client.batchUpdateIntentsAsync(parent, intentBatchUri).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockIntents.getRequests(); Assert.assertEquals(1, actualRequests.size()); BatchUpdateIntentsRequest actualRequest = (BatchUpdateIntentsRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); + Assert.assertEquals(intentBatchUri, actualRequest.getIntentBatchUri()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -639,11 +692,10 @@ public void batchUpdateIntentsExceptionTest() throws Exception { mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - BatchUpdateIntentsRequest request = - BatchUpdateIntentsRequest.newBuilder().setParent(parent.toString()).build(); + AgentName parent = AgentName.of("[PROJECT]"); + String intentBatchUri = "intentBatchUri-969851644"; - client.batchUpdateIntentsAsync(request).get(); + client.batchUpdateIntentsAsync(parent, intentBatchUri).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); @@ -654,28 +706,29 @@ public void batchUpdateIntentsExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void batchDeleteIntentsTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); + public void batchUpdateIntentsTest2() throws Exception { + BatchUpdateIntentsResponse expectedResponse = BatchUpdateIntentsResponse.newBuilder().build(); Operation resultOperation = Operation.newBuilder() - .setName("batchDeleteIntentsTest") + .setName("batchUpdateIntentsTest2") .setDone(true) .setResponse(Any.pack(expectedResponse)) .build(); mockIntents.addResponse(resultOperation); - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - List intents = new ArrayList<>(); + AgentName parent = AgentName.of("[PROJECT]"); + IntentBatch intentBatchInline = IntentBatch.newBuilder().build(); - Empty actualResponse = client.batchDeleteIntentsAsync(parent, intents).get(); + BatchUpdateIntentsResponse actualResponse = + client.batchUpdateIntentsAsync(parent, intentBatchInline).get(); Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockIntents.getRequests(); Assert.assertEquals(1, actualRequests.size()); - BatchDeleteIntentsRequest actualRequest = (BatchDeleteIntentsRequest) actualRequests.get(0); + BatchUpdateIntentsRequest actualRequest = (BatchUpdateIntentsRequest) actualRequests.get(0); - Assert.assertEquals(parent, ProjectAgentName.parse(actualRequest.getParent())); - Assert.assertEquals(intents, actualRequest.getIntentsList()); + Assert.assertEquals(parent, AgentName.parse(actualRequest.getParent())); + Assert.assertEquals(intentBatchInline, actualRequest.getIntentBatchInline()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -684,15 +737,15 @@ public void batchDeleteIntentsTest() throws Exception { @Test @SuppressWarnings("all") - public void batchDeleteIntentsExceptionTest() throws Exception { + public void batchUpdateIntentsExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockIntents.addException(exception); try { - ProjectAgentName parent = ProjectAgentName.of("[PROJECT]"); - List intents = new ArrayList<>(); + AgentName parent = AgentName.of("[PROJECT]"); + IntentBatch intentBatchInline = IntentBatch.newBuilder().build(); - client.batchDeleteIntentsAsync(parent, intents).get(); + client.batchUpdateIntentsAsync(parent, intentBatchInline).get(); Assert.fail("No exception raised"); } catch (ExecutionException e) { Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironments.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironments.java new file mode 100644 index 000000000..6f050d883 --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironments.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +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; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEnvironments implements MockGrpcService { + private final MockEnvironmentsImpl serviceImpl; + + public MockEnvironments() { + serviceImpl = new MockEnvironmentsImpl(); + } + + @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/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironmentsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironmentsImpl.java new file mode 100644 index 000000000..415381b1c --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockEnvironmentsImpl.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.v2.EnvironmentsGrpc.EnvironmentsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEnvironmentsImpl extends EnvironmentsImplBase { + private List requests; + private Queue responses; + + public MockEnvironmentsImpl() { + 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 listEnvironments( + ListEnvironmentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEnvironmentsResponse) { + requests.add(request); + responseObserver.onNext((ListEnvironmentsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockSessionsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockSessionsImpl.java index 819f7ba27..475e5d457 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockSessionsImpl.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/MockSessionsImpl.java @@ -74,11 +74,12 @@ public void detectIntent( @Override public StreamObserver streamingDetectIntent( final StreamObserver responseObserver) { - final Object response = responses.remove(); StreamObserver requestObserver = new StreamObserver() { @Override public void onNext(StreamingDetectIntentRequest value) { + requests.add(value); + final Object response = responses.remove(); if (response instanceof StreamingDetectIntentResponse) { responseObserver.onNext((StreamingDetectIntentResponse) response); } else if (response instanceof Exception) { diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClientTest.java index 38227efe1..47c0428f8 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionEntityTypesClientTest.java @@ -45,6 +45,7 @@ public class SessionEntityTypesClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -57,6 +58,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -67,6 +69,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -95,6 +98,48 @@ public void tearDown() throws Exception { client.close(); } + @Test + @SuppressWarnings("all") + public void deleteSessionEntityTypeTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockSessionEntityTypes.addResponse(expectedResponse); + + SessionEntityTypeName name = + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + + client.deleteSessionEntityType(name); + + List actualRequests = mockSessionEntityTypes.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteSessionEntityTypeRequest actualRequest = + (DeleteSessionEntityTypeRequest) actualRequests.get(0); + + Assert.assertEquals(name, SessionEntityTypeName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteSessionEntityTypeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockSessionEntityTypes.addException(exception); + + try { + SessionEntityTypeName name = + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + + client.deleteSessionEntityType(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + @Test @SuppressWarnings("all") public void listSessionEntityTypesTest() { @@ -108,7 +153,7 @@ public void listSessionEntityTypesTest() { .build(); mockSessionEntityTypes.addResponse(expectedResponse); - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); ListSessionEntityTypesPagedResponse pagedListResponse = client.listSessionEntityTypes(parent); @@ -135,7 +180,7 @@ public void listSessionEntityTypesExceptionTest() throws Exception { mockSessionEntityTypes.addException(exception); try { - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); client.listSessionEntityTypes(parent); Assert.fail("No exception raised"); @@ -148,13 +193,15 @@ public void listSessionEntityTypesExceptionTest() throws Exception { @SuppressWarnings("all") public void getSessionEntityTypeTest() { SessionEntityTypeName name2 = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); SessionEntityType expectedResponse = SessionEntityType.newBuilder().setName(name2.toString()).build(); mockSessionEntityTypes.addResponse(expectedResponse); SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); SessionEntityType actualResponse = client.getSessionEntityType(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -178,7 +225,8 @@ public void getSessionEntityTypeExceptionTest() throws Exception { try { SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); client.getSessionEntityType(name); Assert.fail("No exception raised"); @@ -191,12 +239,13 @@ public void getSessionEntityTypeExceptionTest() throws Exception { @SuppressWarnings("all") public void createSessionEntityTypeTest() { SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); SessionEntityType expectedResponse = SessionEntityType.newBuilder().setName(name.toString()).build(); mockSessionEntityTypes.addResponse(expectedResponse); - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build(); SessionEntityType actualResponse = client.createSessionEntityType(parent, sessionEntityType); @@ -222,7 +271,7 @@ public void createSessionEntityTypeExceptionTest() throws Exception { mockSessionEntityTypes.addException(exception); try { - SessionName parent = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName parent = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build(); client.createSessionEntityType(parent, sessionEntityType); @@ -236,7 +285,8 @@ public void createSessionEntityTypeExceptionTest() throws Exception { @SuppressWarnings("all") public void updateSessionEntityTypeTest() { SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); SessionEntityType expectedResponse = SessionEntityType.newBuilder().setName(name.toString()).build(); mockSessionEntityTypes.addResponse(expectedResponse); @@ -276,21 +326,25 @@ public void updateSessionEntityTypeExceptionTest() throws Exception { @Test @SuppressWarnings("all") - public void deleteSessionEntityTypeTest() { - Empty expectedResponse = Empty.newBuilder().build(); + public void updateSessionEntityTypeTest2() { + SessionEntityTypeName name = + SessionEntityTypeName.ofProjectSessionEntityTypeName( + "[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityType expectedResponse = + SessionEntityType.newBuilder().setName(name.toString()).build(); mockSessionEntityTypes.addResponse(expectedResponse); - SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build(); - client.deleteSessionEntityType(name); + SessionEntityType actualResponse = client.updateSessionEntityType(sessionEntityType); + Assert.assertEquals(expectedResponse, actualResponse); List actualRequests = mockSessionEntityTypes.getRequests(); Assert.assertEquals(1, actualRequests.size()); - DeleteSessionEntityTypeRequest actualRequest = - (DeleteSessionEntityTypeRequest) actualRequests.get(0); + UpdateSessionEntityTypeRequest actualRequest = + (UpdateSessionEntityTypeRequest) actualRequests.get(0); - Assert.assertEquals(name, SessionEntityTypeName.parse(actualRequest.getName())); + Assert.assertEquals(sessionEntityType, actualRequest.getSessionEntityType()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), @@ -299,15 +353,14 @@ public void deleteSessionEntityTypeTest() { @Test @SuppressWarnings("all") - public void deleteSessionEntityTypeExceptionTest() throws Exception { + public void updateSessionEntityTypeExceptionTest2() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockSessionEntityTypes.addException(exception); try { - SessionEntityTypeName name = - SessionEntityTypeName.of("[PROJECT]", "[SESSION]", "[ENTITY_TYPE]"); + SessionEntityType sessionEntityType = SessionEntityType.newBuilder().build(); - client.deleteSessionEntityType(name); + client.updateSessionEntityType(sessionEntityType); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionsClientTest.java index cd8a7a1b2..fba6436ad 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2/SessionsClientTest.java @@ -47,6 +47,7 @@ public class SessionsClientTest { private static MockAgents mockAgents; private static MockContexts mockContexts; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockSessionEntityTypes mockSessionEntityTypes; private static MockSessions mockSessions; @@ -59,6 +60,7 @@ public static void startStaticServer() { mockAgents = new MockAgents(); mockContexts = new MockContexts(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockSessionEntityTypes = new MockSessionEntityTypes(); mockSessions = new MockSessions(); @@ -69,6 +71,7 @@ public static void startStaticServer() { mockAgents, mockContexts, mockEntityTypes, + mockEnvironments, mockIntents, mockSessionEntityTypes, mockSessions)); @@ -109,7 +112,7 @@ public void detectIntentTest() { .build(); mockSessions.addResponse(expectedResponse); - SessionName session = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); QueryInput queryInput = QueryInput.newBuilder().build(); DetectIntentResponse actualResponse = client.detectIntent(session, queryInput); @@ -134,7 +137,7 @@ public void detectIntentExceptionTest() throws Exception { mockSessions.addException(exception); try { - SessionName session = SessionName.of("[PROJECT]", "[SESSION]"); + SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); QueryInput queryInput = QueryInput.newBuilder().build(); client.detectIntent(session, queryInput); @@ -155,11 +158,11 @@ public void streamingDetectIntentTest() throws Exception { .setOutputAudio(outputAudio) .build(); mockSessions.addResponse(expectedResponse); - String session = "session1984987798"; + SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); QueryInput queryInput = QueryInput.newBuilder().build(); StreamingDetectIntentRequest request = StreamingDetectIntentRequest.newBuilder() - .setSession(session) + .setSession(session.toString()) .setQueryInput(queryInput) .build(); @@ -183,11 +186,11 @@ public void streamingDetectIntentTest() throws Exception { public void streamingDetectIntentExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockSessions.addException(exception); - String session = "session1984987798"; + SessionName session = SessionName.ofProjectSessionName("[PROJECT]", "[SESSION]"); QueryInput queryInput = QueryInput.newBuilder().build(); StreamingDetectIntentRequest request = StreamingDetectIntentRequest.newBuilder() - .setSession(session) + .setSession(session.toString()) .setQueryInput(queryInput) .build(); diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java index aefe412bf..cde05a703 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/AgentsClientTest.java @@ -50,6 +50,7 @@ public class AgentsClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -64,6 +65,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -76,6 +78,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ContextsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ContextsClientTest.java index 3c00f3d3b..b106d7e2a 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ContextsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/ContextsClientTest.java @@ -46,6 +46,7 @@ public class ContextsClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -60,6 +61,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -72,6 +74,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/DocumentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/DocumentsClientTest.java index 980e36468..1829dc979 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/DocumentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/DocumentsClientTest.java @@ -50,6 +50,7 @@ public class DocumentsClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -64,6 +65,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -76,6 +78,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java index a24df5ccb..2328e49b9 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EntityTypesClientTest.java @@ -51,6 +51,7 @@ public class EntityTypesClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -65,6 +66,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -77,6 +79,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java new file mode 100644 index 000000000..199c3ca4d --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsClientTest.java @@ -0,0 +1,141 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +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.protobuf.AbstractMessage; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class EnvironmentsClientTest { + private static MockAgents mockAgents; + private static MockContexts mockContexts; + private static MockDocuments mockDocuments; + private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; + private static MockIntents mockIntents; + private static MockKnowledgeBases mockKnowledgeBases; + private static MockSessionEntityTypes mockSessionEntityTypes; + private static MockSessions mockSessions; + private static MockServiceHelper serviceHelper; + private EnvironmentsClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAgents = new MockAgents(); + mockContexts = new MockContexts(); + mockDocuments = new MockDocuments(); + mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); + mockIntents = new MockIntents(); + mockKnowledgeBases = new MockKnowledgeBases(); + mockSessionEntityTypes = new MockSessionEntityTypes(); + mockSessions = new MockSessions(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList( + mockAgents, + mockContexts, + mockDocuments, + mockEntityTypes, + mockEnvironments, + mockIntents, + mockKnowledgeBases, + mockSessionEntityTypes, + mockSessions)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + EnvironmentsSettings settings = + EnvironmentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnvironmentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void listEnvironmentsTest() { + String nextPageToken = "nextPageToken-1530815211"; + ListEnvironmentsResponse expectedResponse = + ListEnvironmentsResponse.newBuilder().setNextPageToken(nextPageToken).build(); + mockEnvironments.addResponse(expectedResponse); + + ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build(); + + ListEnvironmentsResponse actualResponse = client.listEnvironments(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnvironmentsRequest actualRequest = (ListEnvironmentsRequest) actualRequests.get(0); + + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listEnvironmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + ListEnvironmentsRequest request = ListEnvironmentsRequest.newBuilder().build(); + + client.listEnvironments(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java index 1cf9b0307..f39f71892 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/IntentsClientTest.java @@ -51,6 +51,7 @@ public class IntentsClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -65,6 +66,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -77,6 +79,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClientTest.java index 371d84b63..bc1398d55 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/KnowledgeBasesClientTest.java @@ -46,6 +46,7 @@ public class KnowledgeBasesClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -60,6 +61,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -72,6 +74,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironments.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironments.java new file mode 100644 index 000000000..a0f7cf8f5 --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironments.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +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; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEnvironments implements MockGrpcService { + private final MockEnvironmentsImpl serviceImpl; + + public MockEnvironments() { + serviceImpl = new MockEnvironmentsImpl(); + } + + @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/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironmentsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironmentsImpl.java new file mode 100644 index 000000000..6484ba96c --- /dev/null +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockEnvironmentsImpl.java @@ -0,0 +1,73 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dialogflow.v2beta1.EnvironmentsGrpc.EnvironmentsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockEnvironmentsImpl extends EnvironmentsImplBase { + private List requests; + private Queue responses; + + public MockEnvironmentsImpl() { + 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 listEnvironments( + ListEnvironmentsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEnvironmentsResponse) { + requests.add(request); + responseObserver.onNext((ListEnvironmentsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockSessionsImpl.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockSessionsImpl.java index e647a6e08..c9724e217 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockSessionsImpl.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/MockSessionsImpl.java @@ -74,11 +74,12 @@ public void detectIntent( @Override public StreamObserver streamingDetectIntent( final StreamObserver responseObserver) { - final Object response = responses.remove(); StreamObserver requestObserver = new StreamObserver() { @Override public void onNext(StreamingDetectIntentRequest value) { + requests.add(value); + final Object response = responses.remove(); if (response instanceof StreamingDetectIntentResponse) { responseObserver.onNext((StreamingDetectIntentResponse) response); } else if (response instanceof Exception) { diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClientTest.java index 0690154dd..3fe39c948 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionEntityTypesClientTest.java @@ -46,6 +46,7 @@ public class SessionEntityTypesClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -60,6 +61,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -72,6 +74,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionsClientTest.java b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionsClientTest.java index 4acd2ef71..3455e9150 100644 --- a/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionsClientTest.java +++ b/google-cloud-dialogflow/src/test/java/com/google/cloud/dialogflow/v2beta1/SessionsClientTest.java @@ -48,6 +48,7 @@ public class SessionsClientTest { private static MockContexts mockContexts; private static MockDocuments mockDocuments; private static MockEntityTypes mockEntityTypes; + private static MockEnvironments mockEnvironments; private static MockIntents mockIntents; private static MockKnowledgeBases mockKnowledgeBases; private static MockSessionEntityTypes mockSessionEntityTypes; @@ -62,6 +63,7 @@ public static void startStaticServer() { mockContexts = new MockContexts(); mockDocuments = new MockDocuments(); mockEntityTypes = new MockEntityTypes(); + mockEnvironments = new MockEnvironments(); mockIntents = new MockIntents(); mockKnowledgeBases = new MockKnowledgeBases(); mockSessionEntityTypes = new MockSessionEntityTypes(); @@ -74,6 +76,7 @@ public static void startStaticServer() { mockContexts, mockDocuments, mockEntityTypes, + mockEnvironments, mockIntents, mockKnowledgeBases, mockSessionEntityTypes, diff --git a/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsGrpc.java b/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsGrpc.java new file mode 100644 index 000000000..67fdd7e64 --- /dev/null +++ b/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentsGrpc.java @@ -0,0 +1,366 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Manages agent environments.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/v2/environment.proto") +public final class EnvironmentsGrpc { + + private EnvironmentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.v2.Environments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse> + getListEnvironmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnvironments", + requestType = com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.class, + responseType = com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse> + getListEnvironmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse> + getListEnvironmentsMethod; + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + EnvironmentsGrpc.getListEnvironmentsMethod = + getListEnvironmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEnvironments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ListEnvironments")) + .build(); + } + } + } + return getListEnvironmentsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EnvironmentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + }; + return EnvironmentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EnvironmentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + }; + return EnvironmentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EnvironmentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + }; + return EnvironmentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public abstract static class EnvironmentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEnvironmentsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListEnvironmentsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse>( + this, METHODID_LIST_ENVIRONMENTS))) + .build(); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsStub + extends io.grpc.stub.AbstractAsyncStub { + private EnvironmentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EnvironmentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.v2.ListEnvironmentsResponse listEnvironments( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest request) { + return blockingUnaryCall( + getChannel(), getListEnvironmentsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EnvironmentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse> + listEnvironments(com.google.cloud.dialogflow.v2.ListEnvironmentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ENVIRONMENTS = 0; + + 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 EnvironmentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EnvironmentsImplBase 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_LIST_ENVIRONMENTS: + serviceImpl.listEnvironments( + (com.google.cloud.dialogflow.v2.ListEnvironmentsRequest) 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(); + } + } + } + + private abstract static class EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EnvironmentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Environments"); + } + } + + private static final class EnvironmentsFileDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier { + EnvironmentsFileDescriptorSupplier() {} + } + + private static final class EnvironmentsMethodDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EnvironmentsMethodDescriptorSupplier(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 (EnvironmentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EnvironmentsFileDescriptorSupplier()) + .addMethod(getListEnvironmentsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsGrpc.java b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsGrpc.java index f4312a489..885552c77 100644 --- a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsGrpc.java +++ b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentsGrpc.java @@ -398,8 +398,6 @@ public void getDocument( * Creates a new document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void createDocument( @@ -415,8 +413,6 @@ public void createDocument( * Deletes the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [google.protobuf.Empty][google.protobuf.Empty], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void deleteDocument( @@ -432,8 +428,6 @@ public void deleteDocument( * Updates the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void updateDocument( @@ -452,8 +446,6 @@ public void updateDocument( * may be side effects because of internal implementation changes. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void reloadDocument( @@ -568,8 +560,6 @@ public void getDocument( * Creates a new document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void createDocument( @@ -588,8 +578,6 @@ public void createDocument( * Deletes the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [google.protobuf.Empty][google.protobuf.Empty], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void deleteDocument( @@ -608,8 +596,6 @@ public void deleteDocument( * Updates the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void updateDocument( @@ -631,8 +617,6 @@ public void updateDocument( * may be side effects because of internal implementation changes. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public void reloadDocument( @@ -699,8 +683,6 @@ public com.google.cloud.dialogflow.v2beta1.Document getDocument( * Creates a new document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.longrunning.Operation createDocument( @@ -715,8 +697,6 @@ public com.google.longrunning.Operation createDocument( * Deletes the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [google.protobuf.Empty][google.protobuf.Empty], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.longrunning.Operation deleteDocument( @@ -731,8 +711,6 @@ public com.google.longrunning.Operation deleteDocument( * Updates the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.longrunning.Operation updateDocument( @@ -750,8 +728,6 @@ public com.google.longrunning.Operation updateDocument( * may be side effects because of internal implementation changes. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.longrunning.Operation reloadDocument( @@ -817,8 +793,6 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * Creates a new document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.common.util.concurrent.ListenableFuture @@ -834,8 +808,6 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * Deletes the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [google.protobuf.Empty][google.protobuf.Empty], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.common.util.concurrent.ListenableFuture @@ -851,8 +823,6 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * Updates the specified document. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.common.util.concurrent.ListenableFuture @@ -871,8 +841,6 @@ protected DocumentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions * may be side effects because of internal implementation changes. * Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; * only use `projects.knowledgeBases.documents`. - * Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document], - * metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]> * */ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsGrpc.java b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsGrpc.java new file mode 100644 index 000000000..47f50a292 --- /dev/null +++ b/grpc-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentsGrpc.java @@ -0,0 +1,367 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Manages agent environments.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dialogflow/v2beta1/environment.proto") +public final class EnvironmentsGrpc { + + private EnvironmentsGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dialogflow.v2beta1.Environments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnvironments", + requestType = com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.class, + responseType = com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + EnvironmentsGrpc.getListEnvironmentsMethod = + getListEnvironmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEnvironments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ListEnvironments")) + .build(); + } + } + } + return getListEnvironmentsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EnvironmentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + }; + return EnvironmentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EnvironmentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + }; + return EnvironmentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EnvironmentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + }; + return EnvironmentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public abstract static class EnvironmentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEnvironmentsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListEnvironmentsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse>( + this, METHODID_LIST_ENVIRONMENTS))) + .build(); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsStub + extends io.grpc.stub.AbstractAsyncStub { + private EnvironmentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EnvironmentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse listEnvironments( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest request) { + return blockingUnaryCall( + getChannel(), getListEnvironmentsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Manages agent environments.
+   * 
+ */ + public static final class EnvironmentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EnvironmentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the list of all non-draft environments of the specified agent.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse> + listEnvironments(com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_ENVIRONMENTS = 0; + + 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 EnvironmentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EnvironmentsImplBase 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_LIST_ENVIRONMENTS: + serviceImpl.listEnvironments( + (com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse>) + 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(); + } + } + } + + private abstract static class EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EnvironmentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Environments"); + } + } + + private static final class EnvironmentsFileDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier { + EnvironmentsFileDescriptorSupplier() {} + } + + private static final class EnvironmentsMethodDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EnvironmentsMethodDescriptorSupplier(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 (EnvironmentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EnvironmentsFileDescriptorSupplier()) + .addMethod(getListEnvironmentsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-dialogflow-v2/clirr-ignored-differences.xml b/proto-google-cloud-dialogflow-v2/clirr-ignored-differences.xml index f239c8b85..23df8a884 100644 --- a/proto-google-cloud-dialogflow-v2/clirr-ignored-differences.xml +++ b/proto-google-cloud-dialogflow-v2/clirr-ignored-differences.xml @@ -16,4 +16,20 @@ com/google/cloud/dialogflow/v2/*OrBuilder boolean has*(*) + + + 7002 + com/google/cloud/dialogflow/v2/AgentName* + * *Agent(*) + + + 7004 + com/google/cloud/dialogflow/v2/AgentName + java.lang.String format(java.lang.String, java.lang.String) + + + 7004 + com/google/cloud/dialogflow/v2/AgentName + com.google.cloud.dialogflow.v2.AgentName of(java.lang.String, java.lang.String) + diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentName.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentName.java index ce629396c..72f51a466 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentName.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/AgentName.java @@ -29,21 +29,16 @@ public class AgentName implements ResourceName { private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/agents/{agent}"); + PathTemplate.createWithoutUrlEncoding("projects/{project}/agent"); private volatile Map fieldValuesMap; private final String project; - private final String agent; public String getProject() { return project; } - public String getAgent() { - return agent; - } - public static Builder newBuilder() { return new Builder(); } @@ -54,15 +49,14 @@ public Builder toBuilder() { private AgentName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); - agent = Preconditions.checkNotNull(builder.getAgent()); } - public static AgentName of(String project, String agent) { - return newBuilder().setProject(project).setAgent(agent).build(); + public static AgentName of(String project) { + return newBuilder().setProject(project).build(); } - public static String format(String project, String agent) { - return newBuilder().setProject(project).setAgent(agent).build().toString(); + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); } public static AgentName parse(String formattedString) { @@ -72,7 +66,7 @@ public static AgentName parse(String formattedString) { Map matchMap = PATH_TEMPLATE.validatedMatch( formattedString, "AgentName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("agent")); + return of(matchMap.get("project")); } public static List parseList(List formattedStrings) { @@ -105,7 +99,6 @@ public Map getFieldValuesMap() { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); fieldMapBuilder.put("project", project); - fieldMapBuilder.put("agent", agent); fieldValuesMap = fieldMapBuilder.build(); } } @@ -119,38 +112,27 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "agent", agent); + return PATH_TEMPLATE.instantiate("project", project); } /** Builder for AgentName. */ public static class Builder { private String project; - private String agent; public String getProject() { return project; } - public String getAgent() { - return agent; - } - public Builder setProject(String project) { this.project = project; return this; } - public Builder setAgent(String agent) { - this.agent = agent; - return this; - } - private Builder() {} private Builder(AgentName agentName) { project = agentName.project; - agent = agentName.agent; } public AgentName build() { @@ -165,7 +147,7 @@ public boolean equals(Object o) { } if (o instanceof AgentName) { AgentName that = (AgentName) o; - return (this.project.equals(that.project)) && (this.agent.equals(that.agent)); + return (this.project.equals(that.project)); } return false; } @@ -175,8 +157,6 @@ public int hashCode() { int h = 1; h *= 1000003; h ^= project.hashCode(); - h *= 1000003; - h ^= agent.hashCode(); return h; } } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Context.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Context.java index 9f9e0d7f7..4c0a6b187 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Context.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Context.java @@ -236,7 +236,7 @@ public int getLifespanCount() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -262,7 +262,7 @@ public boolean hasParameters() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -288,7 +288,7 @@ public com.google.protobuf.Struct getParameters() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -903,7 +903,7 @@ public Builder clearLifespanCount() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -930,7 +930,7 @@ public boolean hasParameters() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -961,7 +961,7 @@ public com.google.protobuf.Struct getParameters() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -996,7 +996,7 @@ public Builder setParameters(com.google.protobuf.Struct value) { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -1028,7 +1028,7 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -1065,7 +1065,7 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -1098,7 +1098,7 @@ public Builder clearParameters() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -1125,7 +1125,7 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -1154,7 +1154,7 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextName.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextName.java index 8a8e822cd..59820715f 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextName.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextName.java @@ -16,27 +16,40 @@ package com.google.cloud.dialogflow.v2; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; 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; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") public class ContextName implements ResourceName { - private static final PathTemplate PATH_TEMPLATE = + @Deprecated + protected ContextName() {} + + private static final PathTemplate PROJECT_SESSION_CONTEXT_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/agent/sessions/{session}/contexts/{context}"); + private static final PathTemplate PROJECT_ENVIRONMENT_USER_SESSION_CONTEXT_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; - private final String project; - private final String session; - private final String context; + private String project; + private String session; + private String context; + private String environment; + private String user; public String getProject() { return project; @@ -50,22 +63,77 @@ public String getContext() { return context; } - public static Builder newBuilder() { - return new Builder(); + public String getEnvironment() { + return environment; } - public Builder toBuilder() { - return new Builder(this); + public String getUser() { + return user; } private ContextName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); session = Preconditions.checkNotNull(builder.getSession()); context = Preconditions.checkNotNull(builder.getContext()); + pathTemplate = PROJECT_SESSION_CONTEXT_PATH_TEMPLATE; + } + + private ContextName(ProjectEnvironmentUserSessionContextBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + user = Preconditions.checkNotNull(builder.getUser()); + session = Preconditions.checkNotNull(builder.getSession()); + context = Preconditions.checkNotNull(builder.getContext()); + pathTemplate = PROJECT_ENVIRONMENT_USER_SESSION_CONTEXT_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectSessionContextBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectEnvironmentUserSessionContextBuilder + newProjectEnvironmentUserSessionContextBuilder() { + return new ProjectEnvironmentUserSessionContextBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); } public static ContextName of(String project, String session, String context) { - return newBuilder().setProject(project).setSession(session).setContext(context).build(); + return newProjectSessionContextBuilder() + .setProject(project) + .setSession(session) + .setContext(context) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ContextName ofProjectSessionContextName( + String project, String session, String context) { + return newProjectSessionContextBuilder() + .setProject(project) + .setSession(session) + .setContext(context) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static ContextName ofProjectEnvironmentUserSessionContextName( + String project, String environment, String user, String session, String context) { + return newProjectEnvironmentUserSessionContextBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .setContext(context) + .build(); } public static String format(String project, String session, String context) { @@ -77,14 +145,49 @@ public static String format(String project, String session, String context) { .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectSessionContextName( + String project, String session, String context) { + return newBuilder() + .setProject(project) + .setSession(session) + .setContext(context) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectEnvironmentUserSessionContextName( + String project, String environment, String user, String session, String context) { + return newProjectEnvironmentUserSessionContextBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .setContext(context) + .build() + .toString(); + } + public static ContextName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ContextName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("session"), matchMap.get("context")); + if (PROJECT_SESSION_CONTEXT_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_SESSION_CONTEXT_PATH_TEMPLATE.match(formattedString); + return ofProjectSessionContextName( + matchMap.get("project"), matchMap.get("session"), matchMap.get("context")); + } else if (PROJECT_ENVIRONMENT_USER_SESSION_CONTEXT_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_ENVIRONMENT_USER_SESSION_CONTEXT_PATH_TEMPLATE.match(formattedString); + return ofProjectEnvironmentUserSessionContextName( + matchMap.get("project"), + matchMap.get("environment"), + matchMap.get("user"), + matchMap.get("session"), + matchMap.get("context")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -96,7 +199,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (ContextName value : values) { if (value == null) { list.add(""); @@ -108,17 +211,31 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_SESSION_CONTEXT_PATH_TEMPLATE.matches(formattedString) + || PROJECT_ENVIRONMENT_USER_SESSION_CONTEXT_PATH_TEMPLATE.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("session", session); - fieldMapBuilder.put("context", context); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (session != null) { + fieldMapBuilder.put("session", session); + } + if (context != null) { + fieldMapBuilder.put("context", context); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (user != null) { + fieldMapBuilder.put("user", user); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,16 +249,18 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "session", session, "context", context); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } - /** Builder for ContextName. */ + /** Builder for projects/{project}/agent/sessions/{session}/contexts/{context}. */ public static class Builder { private String project; private String session; private String context; + protected Builder() {} + public String getProject() { return project; } @@ -169,9 +288,11 @@ public Builder setContext(String context) { return this; } - private Builder() {} - private Builder(ContextName contextName) { + Preconditions.checkArgument( + contextName.pathTemplate == PROJECT_SESSION_CONTEXT_PATH_TEMPLATE, + "toBuilder is only supported when ContextName has the pattern of " + + "projects/{project}/agent/sessions/{session}/contexts/{context}."); project = contextName.project; session = contextName.session; context = contextName.context; @@ -182,16 +303,83 @@ public ContextName build() { } } + /** + * Builder for + * projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectEnvironmentUserSessionContextBuilder { + + private String project; + private String environment; + private String user; + private String session; + private String context; + + private ProjectEnvironmentUserSessionContextBuilder() {} + + public String getProject() { + return project; + } + + public String getEnvironment() { + return environment; + } + + public String getUser() { + return user; + } + + public String getSession() { + return session; + } + + public String getContext() { + return context; + } + + public ProjectEnvironmentUserSessionContextBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectEnvironmentUserSessionContextBuilder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public ProjectEnvironmentUserSessionContextBuilder setUser(String user) { + this.user = user; + return this; + } + + public ProjectEnvironmentUserSessionContextBuilder setSession(String session) { + this.session = session; + return this; + } + + public ProjectEnvironmentUserSessionContextBuilder setContext(String context) { + this.context = context; + return this; + } + + public ContextName build() { + return new ContextName(this); + } + } + @Override public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof ContextName) { + if (o != null || getClass() == o.getClass()) { ContextName that = (ContextName) o; - return (this.project.equals(that.project)) - && (this.session.equals(that.session)) - && (this.context.equals(that.context)); + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.session, that.session)) + && (Objects.equals(this.context, that.context)) + && (Objects.equals(this.environment, that.environment)) + && (Objects.equals(this.user, that.user)); } return false; } @@ -200,11 +388,17 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; - h ^= project.hashCode(); + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(session); + h *= 1000003; + h ^= Objects.hashCode(context); h *= 1000003; - h ^= session.hashCode(); + h ^= Objects.hashCode(environment); h *= 1000003; - h ^= context.hashCode(); + h ^= Objects.hashCode(user); return h; } } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextOrBuilder.java index 665fcf9c3..b3bb1f904 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ContextOrBuilder.java @@ -100,7 +100,7 @@ public interface ContextOrBuilder * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -124,7 +124,7 @@ public interface ContextOrBuilder * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values @@ -148,7 +148,7 @@ public interface ContextOrBuilder * - MapKey value: parameter name * - MapValue type: * - If parameter's entity type is a composite entity: map - * - Else: string + * - Else: string or number, depending on parameter value type * - MapValue value: * - If parameter's entity type is a composite entity: * map from composite entity property names to property values diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DetectIntentRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DetectIntentRequest.java index a719c9c52..02cb1a0ce 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DetectIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/DetectIntentRequest.java @@ -22,7 +22,6 @@ * * *
- * Requests and responses for custom methods.
  * The request to detect user's intent.
  * 
* @@ -712,7 +711,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Requests and responses for custom methods.
    * The request to detect user's intent.
    * 
* diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Environment.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Environment.java new file mode 100644 index 000000000..ddf42965d --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/Environment.java @@ -0,0 +1,1663 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * Represents an agent environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + description_ = ""; + agentVersion_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Environment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + agentVersion_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.Environment.class, + com.google.cloud.dialogflow.v2.Environment.Builder.class); + } + + /** + * + * + *
+   * Represents an environment state. When a environment is pointed to a new
+   * agent version, the environment is temporarily set to the `LOADING` state.
+   * During that time, the environment keeps on serving the previous version of
+   * the agent. After the new agent version is done loading, the environment is
+   * set back to the `RUNNING` state.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.v2.Environment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. This value is not used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Stopped.
+     * 
+ * + * STOPPED = 1; + */ + STOPPED(1), + /** + * + * + *
+     * Loading.
+     * 
+ * + * LOADING = 2; + */ + LOADING(2), + /** + * + * + *
+     * Running.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. This value is not used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Stopped.
+     * 
+ * + * STOPPED = 1; + */ + public static final int STOPPED_VALUE = 1; + /** + * + * + *
+     * Loading.
+     * 
+ * + * LOADING = 2; + */ + public static final int LOADING_VALUE = 2; + /** + * + * + *
+     * Running.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STOPPED; + case 2: + return LOADING; + case 3: + return RUNNING; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.v2.Environment.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Environment.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + 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; + } + } + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + 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; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * 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) { + 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 developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * 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 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 AGENT_VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object agentVersion_; + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentVersion. + */ + public java.lang.String getAgentVersion() { + java.lang.Object ref = agentVersion_; + 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(); + agentVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentVersion. + */ + public com.google.protobuf.ByteString getAgentVersionBytes() { + java.lang.Object ref = agentVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + public com.google.cloud.dialogflow.v2.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.v2.Environment.State result = + com.google.cloud.dialogflow.v2.Environment.State.valueOf(state_); + return result == null ? com.google.cloud.dialogflow.v2.Environment.State.UNRECOGNIZED : result; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getAgentVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentVersion_); + } + if (state_ != com.google.cloud.dialogflow.v2.Environment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getAgentVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentVersion_); + } + if (state_ != com.google.cloud.dialogflow.v2.Environment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + size += unknownFields.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.v2.Environment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.Environment other = + (com.google.cloud.dialogflow.v2.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getAgentVersion().equals(other.getAgentVersion())) return false; + if (state_ != other.state_) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + AGENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAgentVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.Environment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.Environment 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.v2.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.Environment 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.v2.Environment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.Environment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.Environment 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.v2.Environment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.Environment 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.v2.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.Environment 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.v2.Environment 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 an agent environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Environment) + com.google.cloud.dialogflow.v2.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.Environment.class, + com.google.cloud.dialogflow.v2.Environment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.Environment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + agentVersion_ = ""; + + state_ = 0; + + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_Environment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.Environment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.Environment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.Environment build() { + com.google.cloud.dialogflow.v2.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.Environment buildPartial() { + com.google.cloud.dialogflow.v2.Environment result = + new com.google.cloud.dialogflow.v2.Environment(this); + result.name_ = name_; + result.description_ = description_; + result.agentVersion_ = agentVersion_; + result.state_ = state_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + 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.v2.Environment) { + return mergeFrom((com.google.cloud.dialogflow.v2.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.Environment other) { + if (other == com.google.cloud.dialogflow.v2.Environment.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getAgentVersion().isEmpty()) { + agentVersion_ = other.agentVersion_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2.Environment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.v2.Environment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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 developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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 developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object agentVersion_ = ""; + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentVersion. + */ + public java.lang.String getAgentVersion() { + java.lang.Object ref = agentVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentVersion. + */ + public com.google.protobuf.ByteString getAgentVersionBytes() { + java.lang.Object ref = agentVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The agentVersion to set. + * @return This builder for chaining. + */ + public Builder setAgentVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agentVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAgentVersion() { + + agentVersion_ = getDefaultInstance().getAgentVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for agentVersion to set. + * @return This builder for chaining. + */ + public Builder setAgentVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agentVersion_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + public com.google.cloud.dialogflow.v2.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.v2.Environment.State result = + com.google.cloud.dialogflow.v2.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.v2.Environment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.v2.Environment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + 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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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.v2.Environment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Environment) + private static final com.google.cloud.dialogflow.v2.Environment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Environment(); + } + + public static com.google.cloud.dialogflow.v2.Environment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Environment(input, extensionRegistry); + } + }; + + 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.v2.Environment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentName.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentName.java new file mode 100644 index 000000000..750aacbc2 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentName.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.v2; + +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; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class EnvironmentName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/agent/environments/{environment}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String environment; + + public String getProject() { + return project; + } + + public String getEnvironment() { + return environment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private EnvironmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + } + + public static EnvironmentName of(String project, String environment) { + return newBuilder().setProject(project).setEnvironment(environment).build(); + } + + public static String format(String project, String environment) { + return newBuilder().setProject(project).setEnvironment(environment).build().toString(); + } + + public static EnvironmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "EnvironmentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("environment")); + } + + 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 (EnvironmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("environment", environment); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "environment", environment); + } + + /** Builder for EnvironmentName. */ + public static class Builder { + + private String project; + private String environment; + + public String getProject() { + return project; + } + + public String getEnvironment() { + return environment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + private Builder() {} + + private Builder(EnvironmentName environmentName) { + project = environmentName.project; + environment = environmentName.environment; + } + + public EnvironmentName build() { + return new EnvironmentName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof EnvironmentName) { + EnvironmentName that = (EnvironmentName) o; + return (this.project.equals(that.project)) && (this.environment.equals(that.environment)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= environment.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentOrBuilder.java new file mode 100644 index 000000000..82cf877ca --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The agentVersion. + */ + java.lang.String getAgentVersion(); + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for agentVersion. + */ + com.google.protobuf.ByteString getAgentVersionBytes(); + + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.dialogflow.v2.Environment.State getState(); + + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentProto.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentProto.java new file mode 100644 index 000000000..e03a3c1d4 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EnvironmentProto.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +public final class EnvironmentProto { + private EnvironmentProto() {} + + 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_v2_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_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/v2/environment" + + ".proto\022\032google.cloud.dialogflow.v2\032\034goog" + + "le/api/annotations.proto\032\037google/api/fie" + + "ld_behavior.proto\032\031google/api/resource.p" + + "roto\032\033google/protobuf/empty.proto\032 googl" + + "e/protobuf/field_mask.proto\032\037google/prot" + + "obuf/timestamp.proto\032\027google/api/client." + + "proto\"\367\002\n\013Environment\022\021\n\004name\030\001 \001(\tB\003\340A\003" + + "\022\030\n\013description\030\002 \001(\tB\003\340A\001\022\032\n\ragent_vers" + + "ion\030\003 \001(\tB\003\340A\001\022A\n\005state\030\004 \001(\0162-.google.c" + + "loud.dialogflow.v2.Environment.StateB\003\340A" + + "\003\0224\n\013update_time\030\005 \001(\0132\032.google.protobuf" + + ".TimestampB\003\340A\003\"E\n\005State\022\025\n\021STATE_UNSPEC" + + "IFIED\020\000\022\013\n\007STOPPED\020\001\022\013\n\007LOADING\020\002\022\013\n\007RUN" + + "NING\020\003:_\352A\\\n%dialogflow.googleapis.com/E" + + "nvironment\0223projects/{project}/agent/env" + + "ironments/{environment}\"\211\001\n\027ListEnvironm" + + "entsRequest\022=\n\006parent\030\001 \001(\tB-\340A\002\372A\'\022%dia" + + "logflow.googleapis.com/Environment\022\026\n\tpa" + + "ge_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003" + + "\340A\001\"r\n\030ListEnvironmentsResponse\022=\n\014envir" + + "onments\030\001 \003(\0132\'.google.cloud.dialogflow." + + "v2.Environment\022\027\n\017next_page_token\030\002 \001(\t2" + + "\274\002\n\014Environments\022\261\001\n\020ListEnvironments\0223." + + "google.cloud.dialogflow.v2.ListEnvironme" + + "ntsRequest\0324.google.cloud.dialogflow.v2." + + "ListEnvironmentsResponse\"2\202\323\344\223\002,\022*/v2/{p" + + "arent=projects/*/agent}/environments\032x\312A" + + "\031dialogflow.googleapis.com\322AYhttps://www" + + ".googleapis.com/auth/cloud-platform,http" + + "s://www.googleapis.com/auth/dialogflowB\237" + + "\001\n\036com.google.cloud.dialogflow.v2B\020Envir" + + "onmentProtoP\001ZDgoogle.golang.org/genprot" + + "o/googleapis/cloud/dialogflow/v2;dialogf" + + "low\370\001\001\242\002\002DF\252\002\032Google.Cloud.Dialogflow.V2" + + "b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_v2_Environment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_v2_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_Environment_descriptor, + new java.lang.String[] { + "Name", "Description", "AgentVersion", "State", "UpdateTime", + }); + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor, + new java.lang.String[] { + "Environments", "NextPageToken", + }); + 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.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.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInput.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInput.java index 8a99b4a5f..9f8bcc8cc 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInput.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInput.java @@ -192,6 +192,18 @@ public com.google.protobuf.ByteString getNameBytes() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -206,6 +218,18 @@ public boolean hasParameters() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -220,6 +244,18 @@ public com.google.protobuf.Struct getParameters() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -762,6 +798,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -776,6 +824,18 @@ public boolean hasParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -794,6 +854,18 @@ public com.google.protobuf.Struct getParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -816,6 +888,18 @@ public Builder setParameters(com.google.protobuf.Struct value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -835,6 +919,18 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -859,6 +955,18 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -879,6 +987,18 @@ public Builder clearParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -893,6 +1013,18 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -909,6 +1041,18 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInputOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInputOrBuilder.java index f22789632..6c7257f1c 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInputOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EventInputOrBuilder.java @@ -53,6 +53,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -65,6 +77,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -77,6 +101,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequest.java new file mode 100644 index 000000000..44fd0987e --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequest.java @@ -0,0 +1,925 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ListEnvironmentsRequest} + */ +public final class ListEnvironmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.ListEnvironmentsRequest) + ListEnvironmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsRequest.newBuilder() to construct. + private ListEnvironmentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.class, + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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) { + 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 all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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 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_; + /** + * + * + *
+   * 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. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + 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. + */ + 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. + */ + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.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.v2.ListEnvironmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest other = + (com.google.cloud.dialogflow.v2.ListEnvironmentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest 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.v2.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest 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.v2.ListEnvironmentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest 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.v2.ListEnvironmentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest 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.v2.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest 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.v2.ListEnvironmentsRequest 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ListEnvironmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.ListEnvironmentsRequest) + com.google.cloud.dialogflow.v2.ListEnvironmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.class, + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsRequest build() { + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsRequest buildPartial() { + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest result = + new com.google.cloud.dialogflow.v2.ListEnvironmentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.v2.ListEnvironmentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.v2.ListEnvironmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.ListEnvironmentsRequest other) { + if (other == com.google.cloud.dialogflow.v2.ListEnvironmentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2.ListEnvironmentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2.ListEnvironmentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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 all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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 all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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; + 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. + */ + 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; + 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() { + + 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; + 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(); + 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; + 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.v2.ListEnvironmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEnvironmentsRequest) + private static final com.google.cloud.dialogflow.v2.ListEnvironmentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.ListEnvironmentsRequest(); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsRequest(input, extensionRegistry); + } + }; + + 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.v2.ListEnvironmentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequestOrBuilder.java new file mode 100644 index 000000000..a1f24da8f --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +public interface ListEnvironmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.ListEnvironmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponse.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponse.java new file mode 100644 index 000000000..d0a825cc7 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponse.java @@ -0,0 +1,1155 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +/** + * + * + *
+ * The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ListEnvironmentsResponse} + */ +public final class ListEnvironmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.ListEnvironmentsResponse) + ListEnvironmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsResponse.newBuilder() to construct. + private ListEnvironmentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsResponse() { + environments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + environments_.add( + input.readMessage( + com.google.cloud.dialogflow.v2.Environment.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.class, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.Builder.class); + } + + public static final int ENVIRONMENTS_FIELD_NUMBER = 1; + private java.util.List environments_; + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public java.util.List getEnvironmentsList() { + return environments_; + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public java.util.List + getEnvironmentsOrBuilderList() { + return environments_; + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public int getEnvironmentsCount() { + return environments_.size(); + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.Environment getEnvironments(int index) { + return environments_.get(index); + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.EnvironmentOrBuilder getEnvironmentsOrBuilder(int index) { + return environments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + 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. + */ + 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. + */ + 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 < environments_.size(); i++) { + output.writeMessage(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < environments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.v2.ListEnvironmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse other = + (com.google.cloud.dialogflow.v2.ListEnvironmentsResponse) obj; + + if (!getEnvironmentsList().equals(other.getEnvironmentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEnvironmentsCount() > 0) { + hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse 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.v2.ListEnvironmentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse 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.v2.ListEnvironmentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse 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.v2.ListEnvironmentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse 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.v2.ListEnvironmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse 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.v2.ListEnvironmentsResponse 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2.ListEnvironmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.ListEnvironmentsResponse) + com.google.cloud.dialogflow.v2.ListEnvironmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.class, + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvironmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + environmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsResponse getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsResponse build() { + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2.ListEnvironmentsResponse buildPartial() { + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse result = + new com.google.cloud.dialogflow.v2.ListEnvironmentsResponse(this); + int from_bitField0_ = bitField0_; + if (environmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.environments_ = environments_; + } else { + result.environments_ = environmentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v2.ListEnvironmentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.v2.ListEnvironmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2.ListEnvironmentsResponse other) { + if (other == com.google.cloud.dialogflow.v2.ListEnvironmentsResponse.getDefaultInstance()) + return this; + if (environmentsBuilder_ == null) { + if (!other.environments_.isEmpty()) { + if (environments_.isEmpty()) { + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnvironmentsIsMutable(); + environments_.addAll(other.environments_); + } + onChanged(); + } + } else { + if (!other.environments_.isEmpty()) { + if (environmentsBuilder_.isEmpty()) { + environmentsBuilder_.dispose(); + environmentsBuilder_ = null; + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + environmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvironmentsFieldBuilder() + : null; + } else { + environmentsBuilder_.addAllMessages(other.environments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2.ListEnvironmentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2.ListEnvironmentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List environments_ = + java.util.Collections.emptyList(); + + private void ensureEnvironmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(environments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.Environment, + com.google.cloud.dialogflow.v2.Environment.Builder, + com.google.cloud.dialogflow.v2.EnvironmentOrBuilder> + environmentsBuilder_; + + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public java.util.List getEnvironmentsList() { + if (environmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(environments_); + } else { + return environmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public int getEnvironmentsCount() { + if (environmentsBuilder_ == null) { + return environments_.size(); + } else { + return environmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.Environment getEnvironments(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder setEnvironments(int index, com.google.cloud.dialogflow.v2.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.set(index, value); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder setEnvironments( + int index, com.google.cloud.dialogflow.v2.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder addEnvironments(com.google.cloud.dialogflow.v2.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(value); + onChanged(); + } else { + environmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder addEnvironments(int index, com.google.cloud.dialogflow.v2.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(index, value); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder addEnvironments( + com.google.cloud.dialogflow.v2.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder addEnvironments( + int index, com.google.cloud.dialogflow.v2.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder addAllEnvironments( + java.lang.Iterable values) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, environments_); + onChanged(); + } else { + environmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder clearEnvironments() { + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + environmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public Builder removeEnvironments(int index) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.remove(index); + onChanged(); + } else { + environmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.Environment.Builder getEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.EnvironmentOrBuilder getEnvironmentsOrBuilder(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public java.util.List + getEnvironmentsOrBuilderList() { + if (environmentsBuilder_ != null) { + return environmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environments_); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.Environment.Builder addEnvironmentsBuilder() { + return getEnvironmentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.v2.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2.Environment.Builder addEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.v2.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + public java.util.List + getEnvironmentsBuilderList() { + return getEnvironmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.Environment, + com.google.cloud.dialogflow.v2.Environment.Builder, + com.google.cloud.dialogflow.v2.EnvironmentOrBuilder> + getEnvironmentsFieldBuilder() { + if (environmentsBuilder_ == null) { + environmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2.Environment, + com.google.cloud.dialogflow.v2.Environment.Builder, + com.google.cloud.dialogflow.v2.EnvironmentOrBuilder>( + environments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + environments_ = null; + } + return environmentsBuilder_; + } + + 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; + 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(); + 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; + 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.v2.ListEnvironmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.ListEnvironmentsResponse) + private static final com.google.cloud.dialogflow.v2.ListEnvironmentsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.ListEnvironmentsResponse(); + } + + public static com.google.cloud.dialogflow.v2.ListEnvironmentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsResponse(input, extensionRegistry); + } + }; + + 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.v2.ListEnvironmentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponseOrBuilder.java new file mode 100644 index 000000000..4e5edf4ec --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/ListEnvironmentsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2/environment.proto + +package com.google.cloud.dialogflow.v2; + +public interface ListEnvironmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.ListEnvironmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + java.util.List getEnvironmentsList(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + com.google.cloud.dialogflow.v2.Environment getEnvironments(int index); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + int getEnvironmentsCount(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + java.util.List + getEnvironmentsOrBuilderList(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2.Environment environments = 1; + */ + com.google.cloud.dialogflow.v2.EnvironmentOrBuilder getEnvironmentsOrBuilder(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/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResult.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResult.java index b5620b09c..ecb3ffcc9 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResult.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResult.java @@ -460,6 +460,18 @@ public com.google.protobuf.ByteString getActionBytes() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -474,6 +486,18 @@ public boolean hasParameters() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -488,6 +512,18 @@ public com.google.protobuf.Struct getParameters() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -2128,6 +2164,18 @@ public Builder setActionBytes(com.google.protobuf.ByteString value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2142,6 +2190,18 @@ public boolean hasParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2160,6 +2220,18 @@ public com.google.protobuf.Struct getParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2182,6 +2254,18 @@ public Builder setParameters(com.google.protobuf.Struct value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2201,6 +2285,18 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2225,6 +2321,18 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2245,6 +2353,18 @@ public Builder clearParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2259,6 +2379,18 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2275,6 +2407,18 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResultOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResultOrBuilder.java index 11c1b0f42..5e2766b41 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/QueryResultOrBuilder.java @@ -143,6 +143,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -155,6 +167,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -167,6 +191,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchAgentsRequest.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchAgentsRequest.java index b13ba506f..13d8435d1 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchAgentsRequest.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SearchAgentsRequest.java @@ -22,8 +22,6 @@ * * *
- * ============================================================================
- * Requests and responses for custom methods.
  * The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
  * 
* @@ -425,8 +423,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * ============================================================================
-   * Requests and responses for custom methods.
    * The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
    * 
* diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypeName.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypeName.java index 079318fc7..34ddb26e4 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypeName.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionEntityTypeName.java @@ -16,27 +16,40 @@ package com.google.cloud.dialogflow.v2; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; 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; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") public class SessionEntityTypeName implements ResourceName { - private static final PathTemplate PATH_TEMPLATE = + @Deprecated + protected SessionEntityTypeName() {} + + private static final PathTemplate PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}"); + private static final PathTemplate PROJECT_ENVIRONMENT_USER_SESSION_ENTITY_TYPE_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; - private final String project; - private final String session; - private final String entityType; + private String project; + private String session; + private String entityType; + private String environment; + private String user; public String getProject() { return project; @@ -50,22 +63,77 @@ public String getEntityType() { return entityType; } - public static Builder newBuilder() { - return new Builder(); + public String getEnvironment() { + return environment; } - public Builder toBuilder() { - return new Builder(this); + public String getUser() { + return user; } private SessionEntityTypeName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); session = Preconditions.checkNotNull(builder.getSession()); entityType = Preconditions.checkNotNull(builder.getEntityType()); + pathTemplate = PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE; + } + + private SessionEntityTypeName(ProjectEnvironmentUserSessionEntityTypeBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + user = Preconditions.checkNotNull(builder.getUser()); + session = Preconditions.checkNotNull(builder.getSession()); + entityType = Preconditions.checkNotNull(builder.getEntityType()); + pathTemplate = PROJECT_ENVIRONMENT_USER_SESSION_ENTITY_TYPE_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectSessionEntityTypeBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectEnvironmentUserSessionEntityTypeBuilder + newProjectEnvironmentUserSessionEntityTypeBuilder() { + return new ProjectEnvironmentUserSessionEntityTypeBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); } public static SessionEntityTypeName of(String project, String session, String entityType) { - return newBuilder().setProject(project).setSession(session).setEntityType(entityType).build(); + return newProjectSessionEntityTypeBuilder() + .setProject(project) + .setSession(session) + .setEntityType(entityType) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SessionEntityTypeName ofProjectSessionEntityTypeName( + String project, String session, String entityType) { + return newProjectSessionEntityTypeBuilder() + .setProject(project) + .setSession(session) + .setEntityType(entityType) + .build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SessionEntityTypeName ofProjectEnvironmentUserSessionEntityTypeName( + String project, String environment, String user, String session, String entityType) { + return newProjectEnvironmentUserSessionEntityTypeBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .setEntityType(entityType) + .build(); } public static String format(String project, String session, String entityType) { @@ -77,14 +145,51 @@ public static String format(String project, String session, String entityType) { .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectSessionEntityTypeName( + String project, String session, String entityType) { + return newBuilder() + .setProject(project) + .setSession(session) + .setEntityType(entityType) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectEnvironmentUserSessionEntityTypeName( + String project, String environment, String user, String session, String entityType) { + return newProjectEnvironmentUserSessionEntityTypeBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .setEntityType(entityType) + .build() + .toString(); + } + public static SessionEntityTypeName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "SessionEntityTypeName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("session"), matchMap.get("entity_type")); + if (PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE.match(formattedString); + return ofProjectSessionEntityTypeName( + matchMap.get("project"), matchMap.get("session"), matchMap.get("entity_type")); + } else if (PROJECT_ENVIRONMENT_USER_SESSION_ENTITY_TYPE_PATH_TEMPLATE.matches( + formattedString)) { + Map matchMap = + PROJECT_ENVIRONMENT_USER_SESSION_ENTITY_TYPE_PATH_TEMPLATE.match(formattedString); + return ofProjectEnvironmentUserSessionEntityTypeName( + matchMap.get("project"), + matchMap.get("environment"), + matchMap.get("user"), + matchMap.get("session"), + matchMap.get("entity_type")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -96,7 +201,7 @@ public static List parseList(List formattedString } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (SessionEntityTypeName value : values) { if (value == null) { list.add(""); @@ -108,17 +213,31 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE.matches(formattedString) + || PROJECT_ENVIRONMENT_USER_SESSION_ENTITY_TYPE_PATH_TEMPLATE.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("session", session); - fieldMapBuilder.put("entityType", entityType); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (session != null) { + fieldMapBuilder.put("session", session); + } + if (entityType != null) { + fieldMapBuilder.put("entity_type", entityType); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (user != null) { + fieldMapBuilder.put("user", user); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -132,17 +251,18 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( - "project", project, "session", session, "entity_type", entityType); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } - /** Builder for SessionEntityTypeName. */ + /** Builder for projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}. */ public static class Builder { private String project; private String session; private String entityType; + protected Builder() {} + public String getProject() { return project; } @@ -170,9 +290,11 @@ public Builder setEntityType(String entityType) { return this; } - private Builder() {} - private Builder(SessionEntityTypeName sessionEntityTypeName) { + Preconditions.checkArgument( + sessionEntityTypeName.pathTemplate == PROJECT_SESSION_ENTITY_TYPE_PATH_TEMPLATE, + "toBuilder is only supported when SessionEntityTypeName has the pattern of " + + "projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}."); project = sessionEntityTypeName.project; session = sessionEntityTypeName.session; entityType = sessionEntityTypeName.entityType; @@ -183,16 +305,83 @@ public SessionEntityTypeName build() { } } + /** + * Builder for + * projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectEnvironmentUserSessionEntityTypeBuilder { + + private String project; + private String environment; + private String user; + private String session; + private String entityType; + + private ProjectEnvironmentUserSessionEntityTypeBuilder() {} + + public String getProject() { + return project; + } + + public String getEnvironment() { + return environment; + } + + public String getUser() { + return user; + } + + public String getSession() { + return session; + } + + public String getEntityType() { + return entityType; + } + + public ProjectEnvironmentUserSessionEntityTypeBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectEnvironmentUserSessionEntityTypeBuilder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public ProjectEnvironmentUserSessionEntityTypeBuilder setUser(String user) { + this.user = user; + return this; + } + + public ProjectEnvironmentUserSessionEntityTypeBuilder setSession(String session) { + this.session = session; + return this; + } + + public ProjectEnvironmentUserSessionEntityTypeBuilder setEntityType(String entityType) { + this.entityType = entityType; + return this; + } + + public SessionEntityTypeName build() { + return new SessionEntityTypeName(this); + } + } + @Override public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof SessionEntityTypeName) { + if (o != null || getClass() == o.getClass()) { SessionEntityTypeName that = (SessionEntityTypeName) o; - return (this.project.equals(that.project)) - && (this.session.equals(that.session)) - && (this.entityType.equals(that.entityType)); + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.session, that.session)) + && (Objects.equals(this.entityType, that.entityType)) + && (Objects.equals(this.environment, that.environment)) + && (Objects.equals(this.user, that.user)); } return false; } @@ -201,11 +390,17 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; - h ^= project.hashCode(); + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(session); + h *= 1000003; + h ^= Objects.hashCode(entityType); h *= 1000003; - h ^= session.hashCode(); + h ^= Objects.hashCode(environment); h *= 1000003; - h ^= entityType.hashCode(); + h ^= Objects.hashCode(user); return h; } } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionName.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionName.java index 630b17f41..26969d6cb 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionName.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/SessionName.java @@ -16,25 +16,38 @@ package com.google.cloud.dialogflow.v2; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; 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; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") public class SessionName implements ResourceName { - private static final PathTemplate PATH_TEMPLATE = + @Deprecated + protected SessionName() {} + + private static final PathTemplate PROJECT_SESSION_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding("projects/{project}/agent/sessions/{session}"); + private static final PathTemplate PROJECT_ENVIRONMENT_USER_SESSION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; - private final String project; - private final String session; + private String project; + private String session; + private String environment; + private String user; public String getProject() { return project; @@ -44,35 +57,104 @@ public String getSession() { return session; } - public static Builder newBuilder() { - return new Builder(); + public String getEnvironment() { + return environment; } - public Builder toBuilder() { - return new Builder(this); + public String getUser() { + return user; } private SessionName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); session = Preconditions.checkNotNull(builder.getSession()); + pathTemplate = PROJECT_SESSION_PATH_TEMPLATE; + } + + private SessionName(ProjectEnvironmentUserSessionBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + user = Preconditions.checkNotNull(builder.getUser()); + session = Preconditions.checkNotNull(builder.getSession()); + pathTemplate = PROJECT_ENVIRONMENT_USER_SESSION_PATH_TEMPLATE; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectSessionBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectEnvironmentUserSessionBuilder newProjectEnvironmentUserSessionBuilder() { + return new ProjectEnvironmentUserSessionBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); } public static SessionName of(String project, String session) { - return newBuilder().setProject(project).setSession(session).build(); + return newProjectSessionBuilder().setProject(project).setSession(session).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SessionName ofProjectSessionName(String project, String session) { + return newProjectSessionBuilder().setProject(project).setSession(session).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static SessionName ofProjectEnvironmentUserSessionName( + String project, String environment, String user, String session) { + return newProjectEnvironmentUserSessionBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .build(); } public static String format(String project, String session) { return newBuilder().setProject(project).setSession(session).build().toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectSessionName(String project, String session) { + return newBuilder().setProject(project).setSession(session).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectEnvironmentUserSessionName( + String project, String environment, String user, String session) { + return newProjectEnvironmentUserSessionBuilder() + .setProject(project) + .setEnvironment(environment) + .setUser(user) + .setSession(session) + .build() + .toString(); + } + public static SessionName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "SessionName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("session")); + if (PROJECT_SESSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = PROJECT_SESSION_PATH_TEMPLATE.match(formattedString); + return ofProjectSessionName(matchMap.get("project"), matchMap.get("session")); + } else if (PROJECT_ENVIRONMENT_USER_SESSION_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_ENVIRONMENT_USER_SESSION_PATH_TEMPLATE.match(formattedString); + return ofProjectEnvironmentUserSessionName( + matchMap.get("project"), + matchMap.get("environment"), + matchMap.get("user"), + matchMap.get("session")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -84,7 +166,7 @@ public static List parseList(List formattedStrings) { } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (SessionName value : values) { if (value == null) { list.add(""); @@ -96,16 +178,28 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_SESSION_PATH_TEMPLATE.matches(formattedString) + || PROJECT_ENVIRONMENT_USER_SESSION_PATH_TEMPLATE.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("session", session); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (session != null) { + fieldMapBuilder.put("session", session); + } + if (environment != null) { + fieldMapBuilder.put("environment", environment); + } + if (user != null) { + fieldMapBuilder.put("user", user); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -119,15 +213,17 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "session", session); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } - /** Builder for SessionName. */ + /** Builder for projects/{project}/agent/sessions/{session}. */ public static class Builder { private String project; private String session; + protected Builder() {} + public String getProject() { return project; } @@ -146,9 +242,11 @@ public Builder setSession(String session) { return this; } - private Builder() {} - private Builder(SessionName sessionName) { + Preconditions.checkArgument( + sessionName.pathTemplate == PROJECT_SESSION_PATH_TEMPLATE, + "toBuilder is only supported when SessionName has the pattern of " + + "projects/{project}/agent/sessions/{session}."); project = sessionName.project; session = sessionName.session; } @@ -158,14 +256,72 @@ public SessionName build() { } } + /** + * Builder for + * projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}. + */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectEnvironmentUserSessionBuilder { + + private String project; + private String environment; + private String user; + private String session; + + private ProjectEnvironmentUserSessionBuilder() {} + + public String getProject() { + return project; + } + + public String getEnvironment() { + return environment; + } + + public String getUser() { + return user; + } + + public String getSession() { + return session; + } + + public ProjectEnvironmentUserSessionBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectEnvironmentUserSessionBuilder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + public ProjectEnvironmentUserSessionBuilder setUser(String user) { + this.user = user; + return this; + } + + public ProjectEnvironmentUserSessionBuilder setSession(String session) { + this.session = session; + return this; + } + + public SessionName build() { + return new SessionName(this); + } + } + @Override public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof SessionName) { + if (o != null || getClass() == o.getClass()) { SessionName that = (SessionName) o; - return (this.project.equals(that.project)) && (this.session.equals(that.session)); + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.session, that.session)) + && (Objects.equals(this.environment, that.environment)) + && (Objects.equals(this.user, that.user)); } return false; } @@ -174,9 +330,15 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; - h ^= project.hashCode(); + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(session); + h *= 1000003; + h ^= Objects.hashCode(environment); h *= 1000003; - h ^= session.hashCode(); + h ^= Objects.hashCode(user); return h; } } diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponse.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponse.java index 07c25638e..586659340 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponse.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponse.java @@ -214,8 +214,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -237,8 +239,10 @@ public java.lang.String getFulfillmentText() { * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -263,8 +267,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -277,8 +282,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -291,8 +297,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -304,8 +311,9 @@ public int getFulfillmentMessagesCount() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -317,8 +325,9 @@ public com.google.cloud.dialogflow.v2.Intent.Message getFulfillmentMessages(int * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -334,7 +343,10 @@ public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getFulfillmentMess * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -356,7 +368,10 @@ public java.lang.String getSource() { * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -381,10 +396,10 @@ public com.google.protobuf.ByteString getSourceBytes() { * * *
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -404,10 +419,10 @@ public boolean hasPayload() {
    *
    *
    * 
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -427,10 +442,10 @@ public com.google.protobuf.Struct getPayload() {
    *
    *
    * 
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -451,8 +466,10 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
    *
    *
    * 
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -464,8 +481,10 @@ public java.util.List getOutputContextsL * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -478,8 +497,10 @@ public java.util.List getOutputContextsL * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -491,8 +512,10 @@ public int getOutputContextsCount() { * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -504,8 +527,10 @@ public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) { * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -520,8 +545,7 @@ public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilde * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -537,8 +561,7 @@ public boolean hasFollowupEventInput() { * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -556,8 +579,7 @@ public com.google.cloud.dialogflow.v2.EventInput getFollowupEventInput() { * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -576,9 +598,9 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getFollowupEventInputO *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -593,9 +615,9 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getFollowupEventInputO *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -610,9 +632,9 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getFollowupEventInputO *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -626,9 +648,9 @@ public int getSessionEntityTypesCount() { *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -642,9 +664,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityType getSessionEntityTypes(in *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -1225,8 +1247,10 @@ public Builder mergeFrom( * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1248,8 +1272,10 @@ public java.lang.String getFulfillmentText() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1271,8 +1297,10 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1293,8 +1321,10 @@ public Builder setFulfillmentText(java.lang.String value) { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1311,8 +1341,10 @@ public Builder clearFulfillmentText() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1353,8 +1385,9 @@ private void ensureFulfillmentMessagesIsMutable() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1371,8 +1404,9 @@ private void ensureFulfillmentMessagesIsMutable() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1388,8 +1422,9 @@ public int getFulfillmentMessagesCount() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1405,8 +1440,9 @@ public com.google.cloud.dialogflow.v2.Intent.Message getFulfillmentMessages(int * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1429,8 +1465,9 @@ public Builder setFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1450,8 +1487,9 @@ public Builder setFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1473,8 +1511,9 @@ public Builder addFulfillmentMessages(com.google.cloud.dialogflow.v2.Intent.Mess * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1497,8 +1536,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1518,8 +1558,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1539,8 +1580,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1560,8 +1602,9 @@ public Builder addAllFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1580,8 +1623,9 @@ public Builder clearFulfillmentMessages() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1600,8 +1644,9 @@ public Builder removeFulfillmentMessages(int index) { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1614,8 +1659,9 @@ public com.google.cloud.dialogflow.v2.Intent.Message.Builder getFulfillmentMessa * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1632,8 +1678,9 @@ public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getFulfillmentMess * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1650,8 +1697,9 @@ public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getFulfillmentMess * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1664,8 +1712,9 @@ public com.google.cloud.dialogflow.v2.Intent.Message.Builder addFulfillmentMessa * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1679,8 +1728,9 @@ public com.google.cloud.dialogflow.v2.Intent.Message.Builder addFulfillmentMessa * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -1715,7 +1765,10 @@ public com.google.cloud.dialogflow.v2.Intent.Message.Builder addFulfillmentMessa * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1737,7 +1790,10 @@ public java.lang.String getSource() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1759,7 +1815,10 @@ public com.google.protobuf.ByteString getSourceBytes() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1780,7 +1839,10 @@ public Builder setSource(java.lang.String value) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1797,7 +1859,10 @@ public Builder clearSource() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1826,10 +1891,10 @@ public Builder setSourceBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1849,10 +1914,10 @@ public boolean hasPayload() {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1876,10 +1941,10 @@ public com.google.protobuf.Struct getPayload() {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1907,10 +1972,10 @@ public Builder setPayload(com.google.protobuf.Struct value) {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1935,10 +2000,10 @@ public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1968,10 +2033,10 @@ public Builder mergePayload(com.google.protobuf.Struct value) {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -1997,10 +2062,10 @@ public Builder clearPayload() {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -2020,10 +2085,10 @@ public com.google.protobuf.Struct.Builder getPayloadBuilder() {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -2045,10 +2110,10 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
      *
      *
      * 
-     * Optional. This field can be used to pass custom data from your webhook to the API
-     * caller. Arbitrary JSON objects are supported.
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
      * When provided, Dialogflow uses this field to populate
-     * `QueryResult.webhook_payload` sent to the API caller.
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
      * This field is also used by the
      * [Google Assistant
      * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -2097,8 +2162,10 @@ private void ensureOutputContextsIsMutable() {
      *
      *
      * 
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2114,8 +2181,10 @@ public java.util.List getOutputContextsL * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2131,8 +2200,10 @@ public int getOutputContextsCount() { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2148,8 +2219,10 @@ public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2171,8 +2244,10 @@ public Builder setOutputContexts(int index, com.google.cloud.dialogflow.v2.Conte * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2192,8 +2267,10 @@ public Builder setOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2215,8 +2292,10 @@ public Builder addOutputContexts(com.google.cloud.dialogflow.v2.Context value) { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2238,8 +2317,10 @@ public Builder addOutputContexts(int index, com.google.cloud.dialogflow.v2.Conte * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2259,8 +2340,10 @@ public Builder addOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2280,8 +2363,10 @@ public Builder addOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2301,8 +2386,10 @@ public Builder addAllOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2321,8 +2408,10 @@ public Builder clearOutputContexts() { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2341,8 +2430,10 @@ public Builder removeOutputContexts(int index) { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2354,8 +2445,10 @@ public com.google.cloud.dialogflow.v2.Context.Builder getOutputContextsBuilder(i * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2371,8 +2464,10 @@ public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilde * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2389,8 +2484,10 @@ public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilde * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2403,8 +2500,10 @@ public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder() * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2417,8 +2516,10 @@ public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder(i * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -2458,8 +2559,7 @@ public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder(i * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2475,8 +2575,7 @@ public boolean hasFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2498,8 +2597,7 @@ public com.google.cloud.dialogflow.v2.EventInput getFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2523,8 +2621,7 @@ public Builder setFollowupEventInput(com.google.cloud.dialogflow.v2.EventInput v * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2546,8 +2643,7 @@ public Builder setFollowupEventInput( * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2575,8 +2671,7 @@ public Builder mergeFollowupEventInput(com.google.cloud.dialogflow.v2.EventInput * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2598,8 +2693,7 @@ public Builder clearFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2615,8 +2709,7 @@ public com.google.cloud.dialogflow.v2.EventInput.Builder getFollowupEventInputBu * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2636,8 +2729,7 @@ public com.google.cloud.dialogflow.v2.EventInputOrBuilder getFollowupEventInputO * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2685,9 +2777,9 @@ private void ensureSessionEntityTypesIsMutable() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2707,9 +2799,9 @@ private void ensureSessionEntityTypesIsMutable() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2728,9 +2820,9 @@ public int getSessionEntityTypesCount() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2749,9 +2841,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityType getSessionEntityTypes(in *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2777,9 +2869,9 @@ public Builder setSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2802,9 +2894,9 @@ public Builder setSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2829,9 +2921,9 @@ public Builder addSessionEntityTypes(com.google.cloud.dialogflow.v2.SessionEntit *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2857,9 +2949,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2882,9 +2974,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2907,9 +2999,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2932,9 +3024,9 @@ public Builder addAllSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2956,9 +3048,9 @@ public Builder clearSessionEntityTypes() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2980,9 +3072,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -2998,9 +3090,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityType.Builder getSessionEntity *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -3020,9 +3112,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder getSessionEntit *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -3042,9 +3134,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityTypeOrBuilder getSessionEntit *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -3060,9 +3152,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityType.Builder addSessionEntity *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -3079,9 +3171,9 @@ public com.google.cloud.dialogflow.v2.SessionEntityType.Builder addSessionEntity *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; diff --git a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponseOrBuilder.java index 30d0d367e..7ad5d980f 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponseOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/WebhookResponseOrBuilder.java @@ -27,8 +27,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -40,8 +42,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -54,8 +58,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -65,8 +70,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -76,8 +82,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -87,8 +94,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -99,8 +107,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message fulfillment_messages = 2; @@ -111,7 +120,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -123,7 +135,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -136,10 +151,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -157,10 +172,10 @@ public interface WebhookResponseOrBuilder
    *
    *
    * 
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -178,10 +193,10 @@ public interface WebhookResponseOrBuilder
    *
    *
    * 
-   * Optional. This field can be used to pass custom data from your webhook to the API
-   * caller. Arbitrary JSON objects are supported.
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
    * When provided, Dialogflow uses this field to populate
-   * `QueryResult.webhook_payload` sent to the API caller.
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller.
    * This field is also used by the
    * [Google Assistant
    * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
@@ -198,8 +213,10 @@ public interface WebhookResponseOrBuilder
    *
    *
    * 
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -209,8 +226,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -220,8 +239,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -231,8 +252,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -243,8 +266,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2.Context output_contexts = 5; @@ -255,8 +280,7 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -270,8 +294,7 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -285,8 +308,7 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -301,9 +323,9 @@ public interface WebhookResponseOrBuilder *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -315,9 +337,9 @@ public interface WebhookResponseOrBuilder *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -329,9 +351,9 @@ public interface WebhookResponseOrBuilder *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -343,9 +365,9 @@ public interface WebhookResponseOrBuilder *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; @@ -358,9 +380,9 @@ public interface WebhookResponseOrBuilder *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2.SessionEntityType session_entity_types = 10; diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/agent.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/agent.proto index d88058f2a..23a3d44f0 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/agent.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/agent.proto @@ -328,8 +328,6 @@ message DeleteAgentRequest { ]; } -// ============================================================================ -// Requests and responses for custom methods. // The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents]. message SearchAgentsRequest { // Required. The project to list agents from. diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/context.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/context.proto index 5c85b3c2f..e647c4ff9 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/context.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/context.proto @@ -172,7 +172,7 @@ message Context { // - MapKey value: parameter name // - MapValue type: // - If parameter's entity type is a composite entity: map - // - Else: string + // - Else: string or number, depending on parameter value type // - MapValue value: // - If parameter's entity type is a composite entity: // map from composite entity property names to property values diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/environment.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/environment.proto new file mode 100644 index 000000000..8c3b4f170 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/environment.proto @@ -0,0 +1,126 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v2; + +import "google/api/annotations.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/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + 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"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/agent}/environments" + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When a environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 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; +} diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto index ba53833d3..47ab44b32 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/session.proto @@ -76,7 +76,6 @@ service Sessions { } } -// Requests and responses for custom methods. // The request to detect user's intent. message DetectIntentRequest { // Required. The name of the session this query is sent to. Format: @@ -244,6 +243,20 @@ message QueryResult { string action = 3; // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 4; // This field is set to: @@ -539,6 +552,20 @@ message EventInput { string name = 1 [(google.api.field_behavior) = REQUIRED]; // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language diff --git a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/webhook.proto b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/webhook.proto index 94a373c75..509649a74 100644 --- a/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/webhook.proto +++ b/proto-google-cloud-dialogflow-v2/src/main/proto/google/cloud/dialogflow/v2/webhook.proto @@ -68,21 +68,27 @@ message WebhookRequest { // [Protocol Buffers Language // Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This field can be used to pass custom data from your webhook to the API - // caller. Arbitrary JSON objects are supported. + // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. // When provided, Dialogflow uses this field to populate - // `QueryResult.webhook_payload` sent to the API caller. + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2.QueryResult.webhook_payload] sent to the integration or API caller. // This field is also used by the // [Google Assistant // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) @@ -91,21 +97,22 @@ message WebhookResponse { // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; // Optional. Additional session entity types to replace or extend developer // entity types with. The entity synonyms apply to all languages and persist - // for the session of this query. Setting the session entity types inside - // webhook overwrites the session entity types that have been set through - // `DetectIntentRequest.query_params.session_entity_types`. + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] management methods. repeated SessionEntityType session_entity_types = 10; } diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentProto.java index 812549e07..92706cf0f 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AgentProto.java @@ -92,108 +92,109 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "proto\022\037google.cloud.dialogflow.v2beta1\032\034" + "google/api/annotations.proto\032\037google/api" + "/field_behavior.proto\032\031google/api/resour" - + "ce.proto\0327google/cloud/dialogflow/v2beta" - + "1/validation_result.proto\032#google/longru" - + "nning/operations.proto\032\033google/protobuf/" - + "empty.proto\032 google/protobuf/field_mask." - + "proto\032\027google/api/client.proto\"\302\006\n\005Agent" - + "\022\016\n\006parent\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\035" - + "\n\025default_language_code\030\003 \001(\t\022 \n\030support" - + "ed_language_codes\030\004 \003(\t\022\021\n\ttime_zone\030\005 \001" - + "(\t\022\023\n\013description\030\006 \001(\t\022\022\n\navatar_uri\030\007 " - + "\001(\t\022\026\n\016enable_logging\030\010 \001(\010\022D\n\nmatch_mod" - + "e\030\t \001(\01620.google.cloud.dialogflow.v2beta" - + "1.Agent.MatchMode\022 \n\030classification_thre" - + "shold\030\n \001(\002\022F\n\013api_version\030\016 \001(\01621.googl" - + "e.cloud.dialogflow.v2beta1.Agent.ApiVers" - + "ion\0229\n\004tier\030\017 \001(\0162+.google.cloud.dialogf" - + "low.v2beta1.Agent.Tier\"V\n\tMatchMode\022\032\n\026M" - + "ATCH_MODE_UNSPECIFIED\020\000\022\025\n\021MATCH_MODE_HY" - + "BRID\020\001\022\026\n\022MATCH_MODE_ML_ONLY\020\002\"l\n\nApiVer" - + "sion\022\033\n\027API_VERSION_UNSPECIFIED\020\000\022\022\n\016API" - + "_VERSION_V1\020\001\022\022\n\016API_VERSION_V2\020\002\022\031\n\025API" - + "_VERSION_V2_BETA_1\020\003\"^\n\004Tier\022\024\n\020TIER_UNS" - + "PECIFIED\020\000\022\021\n\rTIER_STANDARD\020\001\022\023\n\017TIER_EN" - + "TERPRISE\020\002\022\030\n\024TIER_ENTERPRISE_PLUS\020\003:m\352A" - + "j\n\037dialogflow.googleapis.com/Agent\022\030proj" - + "ects/{project}/agent\022-projects/{project}" - + "/locations/{location}/agent\"!\n\017GetAgentR" - + "equest\022\016\n\006parent\030\001 \001(\t\"y\n\017SetAgentReques" - + "t\0225\n\005agent\030\001 \001(\0132&.google.cloud.dialogfl" - + "ow.v2beta1.Agent\022/\n\013update_mask\030\002 \001(\0132\032." - + "google.protobuf.FieldMask\"$\n\022DeleteAgent" - + "Request\022\016\n\006parent\030\001 \001(\t\"0\n\010SubAgent\022\017\n\007p" - + "roject\030\001 \001(\t\022\023\n\013environment\030\002 \001(\t\"L\n\023Sea" - + "rchAgentsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage" - + "_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"g\n\024Searc" - + "hAgentsResponse\0226\n\006agents\030\001 \003(\0132&.google" - + ".cloud.dialogflow.v2beta1.Agent\022\027\n\017next_" - + "page_token\030\002 \001(\t\"#\n\021TrainAgentRequest\022\016\n" - + "\006parent\030\001 \001(\t\"7\n\022ExportAgentRequest\022\016\n\006p" - + "arent\030\001 \001(\t\022\021\n\tagent_uri\030\002 \001(\t\"L\n\023Export" - + "AgentResponse\022\023\n\tagent_uri\030\001 \001(\tH\000\022\027\n\rag" - + "ent_content\030\002 \001(\014H\000B\007\n\005agent\"[\n\022ImportAg" - + "entRequest\022\016\n\006parent\030\001 \001(\t\022\023\n\tagent_uri\030" - + "\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(\014H\000B\007\n\005agen" - + "t\"\\\n\023RestoreAgentRequest\022\016\n\006parent\030\001 \001(\t" - + "\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003" - + " \001(\014H\000B\007\n\005agent\"M\n\032GetValidationResultRe" - + "quest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\032\n\rlanguage_c" - + "ode\030\003 \001(\tB\003\340A\0012\257\017\n\006Agents\022\302\001\n\010GetAgent\0220" - + ".google.cloud.dialogflow.v2beta1.GetAgen" - + "tRequest\032&.google.cloud.dialogflow.v2bet" - + "a1.Agent\"\\\202\323\344\223\002V\022\"/v2beta1/{parent=proje" - + "cts/*}/agentZ0\022./v2beta1/{parent=project" - + "s/*/locations/*}/agent\022\334\001\n\010SetAgent\0220.go" - + "ogle.cloud.dialogflow.v2beta1.SetAgentRe" - + "quest\032&.google.cloud.dialogflow.v2beta1." - + "Agent\"v\202\323\344\223\002p\"(/v2beta1/{agent.parent=pr" - + "ojects/*}/agent:\005agentZ=\"4/v2beta1/{agen" - + "t.parent=projects/*/locations/*}/agent:\005" - + "agent\022\270\001\n\013DeleteAgent\0223.google.cloud.dia" - + "logflow.v2beta1.DeleteAgentRequest\032\026.goo" - + "gle.protobuf.Empty\"\\\202\323\344\223\002V*\"/v2beta1/{pa" - + "rent=projects/*}/agentZ0*./v2beta1/{pare" - + "nt=projects/*/locations/*}/agent\022\256\001\n\014Sea" - + "rchAgents\0224.google.cloud.dialogflow.v2be" - + "ta1.SearchAgentsRequest\0325.google.cloud.d" - + "ialogflow.v2beta1.SearchAgentsResponse\"1" - + "\202\323\344\223\002+\022)/v2beta1/{parent=projects/*}/age" - + "nt:search\022\317\001\n\nTrainAgent\0222.google.cloud." - + "dialogflow.v2beta1.TrainAgentRequest\032\035.g" - + "oogle.longrunning.Operation\"n\202\323\344\223\002h\"(/v2" - + "beta1/{parent=projects/*}/agent:train:\001*" - + "Z9\"4/v2beta1/{parent=projects/*/location" - + "s/*}/agent:train:\001*\022\323\001\n\013ExportAgent\0223.go" - + "ogle.cloud.dialogflow.v2beta1.ExportAgen" - + "tRequest\032\035.google.longrunning.Operation\"" - + "p\202\323\344\223\002j\")/v2beta1/{parent=projects/*}/ag" - + "ent:export:\001*Z:\"5/v2beta1/{parent=projec" - + "ts/*/locations/*}/agent:export:\001*\022\323\001\n\013Im" - + "portAgent\0223.google.cloud.dialogflow.v2be" - + "ta1.ImportAgentRequest\032\035.google.longrunn" - + "ing.Operation\"p\202\323\344\223\002j\")/v2beta1/{parent=" - + "projects/*}/agent:import:\001*Z:\"5/v2beta1/" - + "{parent=projects/*/locations/*}/agent:im" - + "port:\001*\022\327\001\n\014RestoreAgent\0224.google.cloud." - + "dialogflow.v2beta1.RestoreAgentRequest\032\035" - + ".google.longrunning.Operation\"r\202\323\344\223\002l\"*/" - + "v2beta1/{parent=projects/*}/agent:restor" - + "e:\001*Z;\"6/v2beta1/{parent=projects/*/loca" - + "tions/*}/agent:restore:\001*\022\302\001\n\023GetValidat" - + "ionResult\022;.google.cloud.dialogflow.v2be" - + "ta1.GetValidationResultRequest\0321.google." - + "cloud.dialogflow.v2beta1.ValidationResul" - + "t\";\202\323\344\223\0025\0223/v2beta1/{parent=projects/*}/" - + "agent/validationResult\032x\312A\031dialogflow.go" - + "ogleapis.com\322AYhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/dialogflowB\250\001\n#com.google." - + "cloud.dialogflow.v2beta1B\nAgentProtoP\001ZI" - + "google.golang.org/genproto/googleapis/cl" - + "oud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002D" - + "F\252\002\037Google.Cloud.Dialogflow.V2beta1b\006pro" - + "to3" + + "ce.proto\0321google/cloud/dialogflow/v2beta" + + "1/environment.proto\0327google/cloud/dialog" + + "flow/v2beta1/validation_result.proto\032#go" + + "ogle/longrunning/operations.proto\032\033googl" + + "e/protobuf/empty.proto\032 google/protobuf/" + + "field_mask.proto\032\027google/api/client.prot" + + "o\"\302\006\n\005Agent\022\016\n\006parent\030\001 \001(\t\022\024\n\014display_n" + + "ame\030\002 \001(\t\022\035\n\025default_language_code\030\003 \001(\t" + + "\022 \n\030supported_language_codes\030\004 \003(\t\022\021\n\tti" + + "me_zone\030\005 \001(\t\022\023\n\013description\030\006 \001(\t\022\022\n\nav" + + "atar_uri\030\007 \001(\t\022\026\n\016enable_logging\030\010 \001(\010\022D" + + "\n\nmatch_mode\030\t \001(\01620.google.cloud.dialog" + + "flow.v2beta1.Agent.MatchMode\022 \n\030classifi" + + "cation_threshold\030\n \001(\002\022F\n\013api_version\030\016 " + + "\001(\01621.google.cloud.dialogflow.v2beta1.Ag" + + "ent.ApiVersion\0229\n\004tier\030\017 \001(\0162+.google.cl" + + "oud.dialogflow.v2beta1.Agent.Tier\"V\n\tMat" + + "chMode\022\032\n\026MATCH_MODE_UNSPECIFIED\020\000\022\025\n\021MA" + + "TCH_MODE_HYBRID\020\001\022\026\n\022MATCH_MODE_ML_ONLY\020" + + "\002\"l\n\nApiVersion\022\033\n\027API_VERSION_UNSPECIFI" + + "ED\020\000\022\022\n\016API_VERSION_V1\020\001\022\022\n\016API_VERSION_" + + "V2\020\002\022\031\n\025API_VERSION_V2_BETA_1\020\003\"^\n\004Tier\022" + + "\024\n\020TIER_UNSPECIFIED\020\000\022\021\n\rTIER_STANDARD\020\001" + + "\022\023\n\017TIER_ENTERPRISE\020\002\022\030\n\024TIER_ENTERPRISE" + + "_PLUS\020\003:m\352Aj\n\037dialogflow.googleapis.com/" + + "Agent\022\030projects/{project}/agent\022-project" + + "s/{project}/locations/{location}/agent\"!" + + "\n\017GetAgentRequest\022\016\n\006parent\030\001 \001(\t\"y\n\017Set" + + "AgentRequest\0225\n\005agent\030\001 \001(\0132&.google.clo" + + "ud.dialogflow.v2beta1.Agent\022/\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMask\"$\n\022" + + "DeleteAgentRequest\022\016\n\006parent\030\001 \001(\t\"0\n\010Su" + + "bAgent\022\017\n\007project\030\001 \001(\t\022\023\n\013environment\030\002" + + " \001(\t\"L\n\023SearchAgentsRequest\022\016\n\006parent\030\001 " + + "\001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + + "(\t\"g\n\024SearchAgentsResponse\0226\n\006agents\030\001 \003" + + "(\0132&.google.cloud.dialogflow.v2beta1.Age" + + "nt\022\027\n\017next_page_token\030\002 \001(\t\"#\n\021TrainAgen" + + "tRequest\022\016\n\006parent\030\001 \001(\t\"7\n\022ExportAgentR" + + "equest\022\016\n\006parent\030\001 \001(\t\022\021\n\tagent_uri\030\002 \001(" + + "\t\"L\n\023ExportAgentResponse\022\023\n\tagent_uri\030\001 " + + "\001(\tH\000\022\027\n\ragent_content\030\002 \001(\014H\000B\007\n\005agent\"" + + "[\n\022ImportAgentRequest\022\016\n\006parent\030\001 \001(\t\022\023\n" + + "\tagent_uri\030\002 \001(\tH\000\022\027\n\ragent_content\030\003 \001(" + + "\014H\000B\007\n\005agent\"\\\n\023RestoreAgentRequest\022\016\n\006p" + + "arent\030\001 \001(\t\022\023\n\tagent_uri\030\002 \001(\tH\000\022\027\n\ragen" + + "t_content\030\003 \001(\014H\000B\007\n\005agent\"M\n\032GetValidat" + + "ionResultRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\032\n" + + "\rlanguage_code\030\003 \001(\tB\003\340A\0012\257\017\n\006Agents\022\302\001\n" + + "\010GetAgent\0220.google.cloud.dialogflow.v2be" + + "ta1.GetAgentRequest\032&.google.cloud.dialo" + + "gflow.v2beta1.Agent\"\\\202\323\344\223\002V\022\"/v2beta1/{p" + + "arent=projects/*}/agentZ0\022./v2beta1/{par" + + "ent=projects/*/locations/*}/agent\022\334\001\n\010Se" + + "tAgent\0220.google.cloud.dialogflow.v2beta1" + + ".SetAgentRequest\032&.google.cloud.dialogfl" + + "ow.v2beta1.Agent\"v\202\323\344\223\002p\"(/v2beta1/{agen" + + "t.parent=projects/*}/agent:\005agentZ=\"4/v2" + + "beta1/{agent.parent=projects/*/locations" + + "/*}/agent:\005agent\022\270\001\n\013DeleteAgent\0223.googl" + + "e.cloud.dialogflow.v2beta1.DeleteAgentRe" + + "quest\032\026.google.protobuf.Empty\"\\\202\323\344\223\002V*\"/" + + "v2beta1/{parent=projects/*}/agentZ0*./v2" + + "beta1/{parent=projects/*/locations/*}/ag" + + "ent\022\256\001\n\014SearchAgents\0224.google.cloud.dial" + + "ogflow.v2beta1.SearchAgentsRequest\0325.goo" + + "gle.cloud.dialogflow.v2beta1.SearchAgent" + + "sResponse\"1\202\323\344\223\002+\022)/v2beta1/{parent=proj" + + "ects/*}/agent:search\022\317\001\n\nTrainAgent\0222.go" + + "ogle.cloud.dialogflow.v2beta1.TrainAgent" + + "Request\032\035.google.longrunning.Operation\"n" + + "\202\323\344\223\002h\"(/v2beta1/{parent=projects/*}/age" + + "nt:train:\001*Z9\"4/v2beta1/{parent=projects" + + "/*/locations/*}/agent:train:\001*\022\323\001\n\013Expor" + + "tAgent\0223.google.cloud.dialogflow.v2beta1" + + ".ExportAgentRequest\032\035.google.longrunning" + + ".Operation\"p\202\323\344\223\002j\")/v2beta1/{parent=pro" + + "jects/*}/agent:export:\001*Z:\"5/v2beta1/{pa" + + "rent=projects/*/locations/*}/agent:expor" + + "t:\001*\022\323\001\n\013ImportAgent\0223.google.cloud.dial" + + "ogflow.v2beta1.ImportAgentRequest\032\035.goog" + + "le.longrunning.Operation\"p\202\323\344\223\002j\")/v2bet" + + "a1/{parent=projects/*}/agent:import:\001*Z:" + + "\"5/v2beta1/{parent=projects/*/locations/" + + "*}/agent:import:\001*\022\327\001\n\014RestoreAgent\0224.go" + + "ogle.cloud.dialogflow.v2beta1.RestoreAge" + + "ntRequest\032\035.google.longrunning.Operation" + + "\"r\202\323\344\223\002l\"*/v2beta1/{parent=projects/*}/a" + + "gent:restore:\001*Z;\"6/v2beta1/{parent=proj" + + "ects/*/locations/*}/agent:restore:\001*\022\302\001\n" + + "\023GetValidationResult\022;.google.cloud.dial" + + "ogflow.v2beta1.GetValidationResultReques" + + "t\0321.google.cloud.dialogflow.v2beta1.Vali" + + "dationResult\";\202\323\344\223\0025\0223/v2beta1/{parent=p" + + "rojects/*}/agent/validationResult\032x\312A\031di" + + "alogflow.googleapis.com\322AYhttps://www.go" + + "ogleapis.com/auth/cloud-platform,https:/" + + "/www.googleapis.com/auth/dialogflowB\250\001\n#" + + "com.google.cloud.dialogflow.v2beta1B\nAge" + + "ntProtoP\001ZIgoogle.golang.org/genproto/go" + + "ogleapis/cloud/dialogflow/v2beta1;dialog" + + "flow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V" + + "2beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -202,6 +203,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.v2beta1.EnvironmentProto.getDescriptor(), com.google.cloud.dialogflow.v2beta1.ValidationResultProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), @@ -335,6 +337,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.v2beta1.EnvironmentProto.getDescriptor(); com.google.cloud.dialogflow.v2beta1.ValidationResultProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java index e39c52630..52f7283a5 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/AudioConfigProto.java @@ -71,51 +71,51 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\t\022/\n\014start_offset\030\001 \001(\0132\031.google.proto" + "buf.Duration\022-\n\nend_offset\030\002 \001(\0132\031.googl" + "e.protobuf.Duration\022\022\n\nconfidence\030\004 \001(\002\"" - + "\201\003\n\020InputAudioConfig\022F\n\016audio_encoding\030\001" + + "\376\002\n\020InputAudioConfig\022F\n\016audio_encoding\030\001" + " \001(\0162..google.cloud.dialogflow.v2beta1.A" + "udioEncoding\022\031\n\021sample_rate_hertz\030\002 \001(\005\022" + "\025\n\rlanguage_code\030\003 \001(\t\022\030\n\020enable_word_in" - + "fo\030\r \001(\010\022\033\n\014phrase_hints\030\004 \003(\tB\005\030\001\340A\001\022G\n" - + "\017speech_contexts\030\013 \003(\0132..google.cloud.di" - + "alogflow.v2beta1.SpeechContext\022\r\n\005model\030" - + "\007 \001(\t\022J\n\rmodel_variant\030\n \001(\01623.google.cl" - + "oud.dialogflow.v2beta1.SpeechModelVarian" - + "t\022\030\n\020single_utterance\030\010 \001(\010\"k\n\024VoiceSele" - + "ctionParams\022\014\n\004name\030\001 \001(\t\022E\n\013ssml_gender" - + "\030\002 \001(\01620.google.cloud.dialogflow.v2beta1" - + ".SsmlVoiceGender\"\270\001\n\026SynthesizeSpeechCon" - + "fig\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_pro" - + "file_id\030\005 \003(\t\022D\n\005voice\030\004 \001(\01325.google.cl" - + "oud.dialogflow.v2beta1.VoiceSelectionPar" - + "ams\"\334\001\n\021OutputAudioConfig\022Q\n\016audio_encod" - + "ing\030\001 \001(\01624.google.cloud.dialogflow.v2be" - + "ta1.OutputAudioEncodingB\003\340A\002\022\031\n\021sample_r" - + "ate_hertz\030\002 \001(\005\022Y\n\030synthesize_speech_con" - + "fig\030\003 \001(\01327.google.cloud.dialogflow.v2be" - + "ta1.SynthesizeSpeechConfig*\373\001\n\rAudioEnco" - + "ding\022\036\n\032AUDIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030" - + "AUDIO_ENCODING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCO" - + "DING_FLAC\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\022SpeechModelVariant\022$\n SPEECH_MODEL_V" - + "ARIANT_UNSPECIFIED\020\000\022\026\n\022USE_BEST_AVAILAB" - + "LE\020\001\022\020\n\014USE_STANDARD\020\002\022\020\n\014USE_ENHANCED\020\003" - + "*\215\001\n\017SsmlVoiceGender\022!\n\035SSML_VOICE_GENDE" - + "R_UNSPECIFIED\020\000\022\032\n\026SSML_VOICE_GENDER_MAL" - + "E\020\001\022\034\n\030SSML_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSM" - + "L_VOICE_GENDER_NEUTRAL\020\003*\244\001\n\023OutputAudio" - + "Encoding\022%\n!OUTPUT_AUDIO_ENCODING_UNSPEC" - + "IFIED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_LINEAR_" - + "16\020\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3\020\002\022\"\n\036O" - + "UTPUT_AUDIO_ENCODING_OGG_OPUS\020\003B\256\001\n#com." - + "google.cloud.dialogflow.v2beta1B\020AudioCo" - + "nfigProtoP\001ZIgoogle.golang.org/genproto/" - + "googleapis/cloud/dialogflow/v2beta1;dial" - + "ogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow" - + ".V2beta1b\006proto3" + + "fo\030\r \001(\010\022\030\n\014phrase_hints\030\004 \003(\tB\002\030\001\022G\n\017sp" + + "eech_contexts\030\013 \003(\0132..google.cloud.dialo" + + "gflow.v2beta1.SpeechContext\022\r\n\005model\030\007 \001" + + "(\t\022J\n\rmodel_variant\030\n \001(\01623.google.cloud" + + ".dialogflow.v2beta1.SpeechModelVariant\022\030" + + "\n\020single_utterance\030\010 \001(\010\"k\n\024VoiceSelecti" + + "onParams\022\014\n\004name\030\001 \001(\t\022E\n\013ssml_gender\030\002 " + + "\001(\01620.google.cloud.dialogflow.v2beta1.Ss" + + "mlVoiceGender\"\270\001\n\026SynthesizeSpeechConfig" + + "\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_profil" + + "e_id\030\005 \003(\t\022D\n\005voice\030\004 \001(\01325.google.cloud" + + ".dialogflow.v2beta1.VoiceSelectionParams" + + "\"\334\001\n\021OutputAudioConfig\022Q\n\016audio_encoding" + + "\030\001 \001(\01624.google.cloud.dialogflow.v2beta1" + + ".OutputAudioEncodingB\003\340A\002\022\031\n\021sample_rate" + + "_hertz\030\002 \001(\005\022Y\n\030synthesize_speech_config" + + "\030\003 \001(\01327.google.cloud.dialogflow.v2beta1" + + ".SynthesizeSpeechConfig*\373\001\n\rAudioEncodin" + + "g\022\036\n\032AUDIO_ENCODING_UNSPECIFIED\020\000\022\034\n\030AUD" + + "IO_ENCODING_LINEAR_16\020\001\022\027\n\023AUDIO_ENCODIN" + + "G_FLAC\020\002\022\030\n\024AUDIO_ENCODING_MULAW\020\003\022\026\n\022AU" + + "DIO_ENCODING_AMR\020\004\022\031\n\025AUDIO_ENCODING_AMR" + + "_WB\020\005\022\033\n\027AUDIO_ENCODING_OGG_OPUS\020\006\022)\n%AU" + + "DIO_ENCODING_SPEEX_WITH_HEADER_BYTE\020\007*v\n" + + "\022SpeechModelVariant\022$\n SPEECH_MODEL_VARI" + + "ANT_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\017SsmlVoiceGender\022!\n\035SSML_VOICE_GENDER_U" + + "NSPECIFIED\020\000\022\032\n\026SSML_VOICE_GENDER_MALE\020\001" + + "\022\034\n\030SSML_VOICE_GENDER_FEMALE\020\002\022\035\n\031SSML_V" + + "OICE_GENDER_NEUTRAL\020\003*\244\001\n\023OutputAudioEnc" + + "oding\022%\n!OUTPUT_AUDIO_ENCODING_UNSPECIFI" + + "ED\020\000\022#\n\037OUTPUT_AUDIO_ENCODING_LINEAR_16\020" + + "\001\022\035\n\031OUTPUT_AUDIO_ENCODING_MP3\020\002\022\"\n\036OUTP" + + "UT_AUDIO_ENCODING_OGG_OPUS\020\003B\256\001\n#com.goo" + + "gle.cloud.dialogflow.v2beta1B\020AudioConfi" + + "gProtoP\001ZIgoogle.golang.org/genproto/goo" + + "gleapis/cloud/dialogflow/v2beta1;dialogf" + + "low\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2" + + "beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequest.java index 2e0faf3da..69963f0be 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequest.java @@ -258,15 +258,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityType.EntityOrBuilder getEntitie * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -285,15 +284,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1180,15 +1178,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityType.Entity.Builder addEntities * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1207,15 +1204,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1234,15 +1230,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1260,15 +1255,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1282,15 +1276,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequestOrBuilder.java index 00f53c8b4..ec9428365 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchCreateEntitiesRequestOrBuilder.java @@ -106,15 +106,14 @@ public interface BatchCreateEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -123,15 +122,14 @@ public interface BatchCreateEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequest.java index da6b11d53..6adac6963 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequest.java @@ -258,15 +258,14 @@ public com.google.protobuf.ByteString getEntityValuesBytes(int index) { * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -285,15 +284,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -985,15 +983,14 @@ public Builder addEntityValuesBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1012,15 +1009,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1039,15 +1035,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1065,15 +1060,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1087,15 +1081,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequestOrBuilder.java index 90f04474c..1199107cb 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchDeleteEntitiesRequestOrBuilder.java @@ -113,15 +113,14 @@ public interface BatchDeleteEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -130,15 +129,14 @@ public interface BatchDeleteEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequest.java index b4161bb44..20fdc9764 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequest.java @@ -273,15 +273,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityType.EntityOrBuilder getEntitie * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -300,15 +299,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1266,15 +1264,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityType.Entity.Builder addEntities * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1293,15 +1290,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1320,15 +1316,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1346,15 +1341,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1368,15 +1362,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entities`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequestOrBuilder.java index 0ef4ac0ce..beaea989f 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntitiesRequestOrBuilder.java @@ -106,15 +106,14 @@ public interface BatchUpdateEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -123,15 +122,14 @@ public interface BatchUpdateEntitiesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entities`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.java index 125c502a9..fafe40502 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequest.java @@ -374,15 +374,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityTypeBatch getEntityTypeBatchInl * * *
-   * Optional. The language of entity synonyms defined in `entity_types`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -401,15 +400,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entity_types`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1380,15 +1378,14 @@ public Builder clearEntityTypeBatchInline() { * * *
-     * Optional. The language of entity synonyms defined in `entity_types`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1407,15 +1404,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_types`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1434,15 +1430,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entity_types`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1460,15 +1455,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entity_types`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1482,15 +1476,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_types`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequestOrBuilder.java index 8d7dc7e3b..79076a2a9 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateEntityTypesRequestOrBuilder.java @@ -120,15 +120,14 @@ public interface BatchUpdateEntityTypesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_types`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -137,15 +136,14 @@ public interface BatchUpdateEntityTypesRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_types`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequest.java index 3a5dab7ed..0fb26aebc 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequest.java @@ -377,15 +377,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentBatchOrBuilder getIntentBatchIn * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intents`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -404,15 +403,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intents`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1421,15 +1419,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentBatch.Builder getIntentBatchInl * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intents`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1448,15 +1445,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intents`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1475,15 +1471,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intents`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1501,15 +1496,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intents`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1523,15 +1517,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intents`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequestOrBuilder.java index 7b248289a..8f5d1b708 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/BatchUpdateIntentsRequestOrBuilder.java @@ -118,15 +118,14 @@ public interface BatchUpdateIntentsRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intents`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -135,15 +134,14 @@ public interface BatchUpdateIntentsRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intents`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 4; + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Context.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Context.java index fa6a8ac9d..f6832a764 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Context.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Context.java @@ -209,7 +209,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
    * Optional. The number of conversational query requests after which the
-   * context expires. If set to `0` (the default) the context expires
+   * context expires. The default is `0`. If set to `0`, the context expires
    * immediately. Contexts expire automatically after 20 minutes if there
    * are no matching queries.
    * 
@@ -229,9 +229,18 @@ public int getLifespanCount() { * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; @@ -246,9 +255,18 @@ public boolean hasParameters() { * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; @@ -263,9 +281,18 @@ public com.google.protobuf.Struct getParameters() { * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; @@ -805,7 +832,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * *
      * Optional. The number of conversational query requests after which the
-     * context expires. If set to `0` (the default) the context expires
+     * context expires. The default is `0`. If set to `0`, the context expires
      * immediately. Contexts expire automatically after 20 minutes if there
      * are no matching queries.
      * 
@@ -822,7 +849,7 @@ public int getLifespanCount() { * *
      * Optional. The number of conversational query requests after which the
-     * context expires. If set to `0` (the default) the context expires
+     * context expires. The default is `0`. If set to `0`, the context expires
      * immediately. Contexts expire automatically after 20 minutes if there
      * are no matching queries.
      * 
@@ -843,7 +870,7 @@ public Builder setLifespanCount(int value) { * *
      * Optional. The number of conversational query requests after which the
-     * context expires. If set to `0` (the default) the context expires
+     * context expires. The default is `0`. If set to `0`, the context expires
      * immediately. Contexts expire automatically after 20 minutes if there
      * are no matching queries.
      * 
@@ -870,9 +897,18 @@ public Builder clearLifespanCount() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -887,9 +923,18 @@ public boolean hasParameters() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -908,9 +953,18 @@ public com.google.protobuf.Struct getParameters() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -933,9 +987,18 @@ public Builder setParameters(com.google.protobuf.Struct value) { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -955,9 +1018,18 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -982,9 +1054,18 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -1005,9 +1086,18 @@ public Builder clearParameters() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -1022,9 +1112,18 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; @@ -1041,9 +1140,18 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * *
      * Optional. The collection of parameters associated with this context.
-     * Refer to [this
-     * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-     * for syntax.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 3; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextOrBuilder.java index a290e8a70..ddf5b9eb4 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ContextOrBuilder.java @@ -77,7 +77,7 @@ public interface ContextOrBuilder * *
    * Optional. The number of conversational query requests after which the
-   * context expires. If set to `0` (the default) the context expires
+   * context expires. The default is `0`. If set to `0`, the context expires
    * immediately. Contexts expire automatically after 20 minutes if there
    * are no matching queries.
    * 
@@ -93,9 +93,18 @@ public interface ContextOrBuilder * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; @@ -108,9 +117,18 @@ public interface ContextOrBuilder * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; @@ -123,9 +141,18 @@ public interface ContextOrBuilder * *
    * Optional. The collection of parameters associated with this context.
-   * Refer to [this
-   * doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
-   * for syntax.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 3; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequest.java index 5459d50ba..70c4c6f12 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequest.java @@ -235,15 +235,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityTypeOrBuilder getEntityTypeOrBu * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -262,15 +261,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -951,15 +949,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityTypeOrBuilder getEntityTypeOrBu * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -978,15 +975,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1005,15 +1001,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1031,15 +1026,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1053,15 +1047,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequestOrBuilder.java index b2eeab9ff..7c0dc0700 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateEntityTypeRequestOrBuilder.java @@ -89,15 +89,14 @@ public interface CreateEntityTypeRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -106,15 +105,14 @@ public interface CreateEntityTypeRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequest.java index 9fa486a66..54eba4e1e 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequest.java @@ -243,15 +243,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentOrBuilder getIntentOrBuilder() * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -270,15 +269,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1009,15 +1007,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentOrBuilder getIntentOrBuilder() * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -1036,15 +1033,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -1063,15 +1059,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -1089,15 +1084,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1111,15 +1105,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequestOrBuilder.java index c016cbe0c..7b147e7e6 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/CreateIntentRequestOrBuilder.java @@ -89,15 +89,14 @@ public interface CreateIntentRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -106,15 +105,14 @@ public interface CreateIntentRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 3; + * string language_code = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DetectIntentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DetectIntentRequest.java index 8d6d6f849..0e809da2d 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DetectIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DetectIntentRequest.java @@ -22,8 +22,6 @@ * * *
- * ============================================================================
- * Requests and responses for custom methods.
  * The request to detect user's intent.
  * 
* @@ -707,8 +705,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * ============================================================================
-   * Requests and responses for custom methods.
    * The request to detect user's intent.
    * 
* diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentProto.java index 0405a9fe5..b9acee555 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/DocumentProto.java @@ -108,7 +108,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "IED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020" + "\003\"q\n\025ReloadDocumentRequest\022\014\n\004name\030\001 \001(\t" + "\022@\n\ngcs_source\030\003 \001(\0132*.google.cloud.dial" - + "ogflow.v2beta1.GcsSourceH\000B\010\n\006source2\201\r\n" + + "ogflow.v2beta1.GcsSourceH\000B\010\n\006source2\262\016\n" + "\tDocuments\022\201\002\n\rListDocuments\0225.google.cl" + "oud.dialogflow.v2beta1.ListDocumentsRequ" + "est\0326.google.cloud.dialogflow.v2beta1.Li" @@ -121,41 +121,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gflow.v2beta1.Document\"\200\001\202\323\344\223\002z\0227/v2beta" + "1/{name=projects/*/knowledgeBases/*/docu" + "ments/*}Z?\022=/v2beta1/{name=projects/*/ag" - + "ent/knowledgeBases/*/documents/*}\022\377\001\n\016Cr" + + "ent/knowledgeBases/*/documents/*}\022\250\002\n\016Cr" + "eateDocument\0226.google.cloud.dialogflow.v" + "2beta1.CreateDocumentRequest\032\035.google.lo" - + "ngrunning.Operation\"\225\001\202\323\344\223\002\216\001\"7/v2beta1/" + + "ngrunning.Operation\"\276\001\202\323\344\223\002\216\001\"7/v2beta1/" + "{parent=projects/*/knowledgeBases/*}/doc" + "uments:\010documentZI\"=/v2beta1/{parent=pro" + "jects/*/agent/knowledgeBases/*}/document" - + "s:\010document\022\352\001\n\016DeleteDocument\0226.google." - + "cloud.dialogflow.v2beta1.DeleteDocumentR" - + "equest\032\035.google.longrunning.Operation\"\200\001" - + "\202\323\344\223\002z*7/v2beta1/{name=projects/*/knowle" - + "dgeBases/*/documents/*}Z?*=/v2beta1/{nam" - + "e=projects/*/agent/knowledgeBases/*/docu" - + "ments/*}\022\221\002\n\016UpdateDocument\0226.google.clo" - + "ud.dialogflow.v2beta1.UpdateDocumentRequ" - + "est\032\035.google.longrunning.Operation\"\247\001\202\323\344" - + "\223\002\240\0012@/v2beta1/{document.name=projects/*" - + "/knowledgeBases/*/documents/*}:\010document" - + "ZR2F/v2beta1/{document.name=projects/*/a" - + "gent/knowledgeBases/*/documents/*}:\010docu" - + "ment\022\377\001\n\016ReloadDocument\0226.google.cloud.d" - + "ialogflow.v2beta1.ReloadDocumentRequest\032" - + "\035.google.longrunning.Operation\"\225\001\202\323\344\223\002\216\001" - + "\">/v2beta1/{name=projects/*/knowledgeBas" - + "es/*/documents/*}:reload:\001*ZI\"D/v2beta1/" - + "{name=projects/*/agent/knowledgeBases/*/" - + "documents/*}:reload:\001*\032x\312A\031dialogflow.go" - + "ogleapis.com\322AYhttps://www.googleapis.co" - + "m/auth/cloud-platform,https://www.google" - + "apis.com/auth/dialogflowB\253\001\n#com.google." - + "cloud.dialogflow.v2beta1B\rDocumentProtoP" - + "\001ZIgoogle.golang.org/genproto/googleapis" - + "/cloud/dialogflow/v2beta1;dialogflow\370\001\001\242" - + "\002\002DF\252\002\037Google.Cloud.Dialogflow.V2beta1b\006" - + "proto3" + + "s:\010document\312A&\n\010Document\022\032KnowledgeOpera" + + "tionMetadata\022\240\002\n\016DeleteDocument\0226.google" + + ".cloud.dialogflow.v2beta1.DeleteDocument" + + "Request\032\035.google.longrunning.Operation\"\266" + + "\001\202\323\344\223\002z*7/v2beta1/{name=projects/*/knowl" + + "edgeBases/*/documents/*}Z?*=/v2beta1/{na" + + "me=projects/*/agent/knowledgeBases/*/doc" + + "uments/*}\312A3\n\025google.protobuf.Empty\022\032Kno" + + "wledgeOperationMetadata\022\272\002\n\016UpdateDocume" + + "nt\0226.google.cloud.dialogflow.v2beta1.Upd" + + "ateDocumentRequest\032\035.google.longrunning." + + "Operation\"\320\001\202\323\344\223\002\240\0012@/v2beta1/{document." + + "name=projects/*/knowledgeBases/*/documen" + + "ts/*}:\010documentZR2F/v2beta1/{document.na" + + "me=projects/*/agent/knowledgeBases/*/doc" + + "uments/*}:\010document\312A&\n\010Document\022\032Knowle" + + "dgeOperationMetadata\022\250\002\n\016ReloadDocument\022" + + "6.google.cloud.dialogflow.v2beta1.Reload" + + "DocumentRequest\032\035.google.longrunning.Ope" + + "ration\"\276\001\202\323\344\223\002\216\001\">/v2beta1/{name=project" + + "s/*/knowledgeBases/*/documents/*}:reload" + + ":\001*ZI\"D/v2beta1/{name=projects/*/agent/k" + + "nowledgeBases/*/documents/*}:reload:\001*\312A" + + "&\n\010Document\022\032KnowledgeOperationMetadata\032" + + "x\312A\031dialogflow.googleapis.com\322AYhttps://" + + "www.googleapis.com/auth/cloud-platform,h" + + "ttps://www.googleapis.com/auth/dialogflo" + + "wB\253\001\n#com.google.cloud.dialogflow.v2beta" + + "1B\rDocumentProtoP\001ZIgoogle.golang.org/ge" + + "nproto/googleapis/cloud/dialogflow/v2bet" + + "a1;dialogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dia" + + "logflow.V2beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -255,6 +259,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ClientProto.defaultHost); registry.add(com.google.api.AnnotationsProto.http); registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypeProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypeProto.java index 08998d303..780e26a35 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypeProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EntityTypeProto.java @@ -116,44 +116,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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\021AutoExpansionMode\022#\n\037AUTO_EX" + "PANSION_MODE_UNSPECIFIED\020\000\022\037\n\033AUTO_EXPAN" - + "SION_MODE_DEFAULT\020\001\"f\n\026ListEntityTypesRe" - + "quest\022\016\n\006parent\030\001 \001(\t\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\"u\n\027ListEntityTypesResponse\022A\n\014entity" - + "_types\030\001 \003(\0132+.google.cloud.dialogflow.v" - + "2beta1.EntityType\022\027\n\017next_page_token\030\002 \001" - + "(\t\";\n\024GetEntityTypeRequest\022\014\n\004name\030\001 \001(\t" - + "\022\025\n\rlanguage_code\030\002 \001(\t\"\202\001\n\027CreateEntity" - + "TypeRequest\022\016\n\006parent\030\001 \001(\t\022@\n\013entity_ty" - + "pe\030\002 \001(\0132+.google.cloud.dialogflow.v2bet" - + "a1.EntityType\022\025\n\rlanguage_code\030\003 \001(\t\"\243\001\n" - + "\027UpdateEntityTypeRequest\022@\n\013entity_type\030" - + "\001 \001(\0132+.google.cloud.dialogflow.v2beta1." - + "EntityType\022\025\n\rlanguage_code\030\002 \001(\t\022/\n\013upd" - + "ate_mask\030\003 \001(\0132\032.google.protobuf.FieldMa" - + "sk\"\'\n\027DeleteEntityTypeRequest\022\014\n\004name\030\001 " - + "\001(\t\"\203\002\n\035BatchUpdateEntityTypesRequest\022\016\n" - + "\006parent\030\001 \001(\t\022\037\n\025entity_type_batch_uri\030\002" - + " \001(\tH\000\022T\n\030entity_type_batch_inline\030\003 \001(\013" - + "20.google.cloud.dialogflow.v2beta1.Entit" - + "yTypeBatchH\000\022\025\n\rlanguage_code\030\004 \001(\t\022/\n\013u" - + "pdate_mask\030\005 \001(\0132\032.google.protobuf.Field" - + "MaskB\023\n\021entity_type_batch\"c\n\036BatchUpdate" - + "EntityTypesResponse\022A\n\014entity_types\030\001 \003(" - + "\0132+.google.cloud.dialogflow.v2beta1.Enti" - + "tyType\"J\n\035BatchDeleteEntityTypesRequest\022" - + "\016\n\006parent\030\001 \001(\t\022\031\n\021entity_type_names\030\002 \003" - + "(\t\"\211\001\n\032BatchCreateEntitiesRequest\022\016\n\006par" - + "ent\030\001 \001(\t\022D\n\010entities\030\002 \003(\01322.google.clo" - + "ud.dialogflow.v2beta1.EntityType.Entity\022" - + "\025\n\rlanguage_code\030\003 \001(\t\"\272\001\n\032BatchUpdateEn" - + "titiesRequest\022\016\n\006parent\030\001 \001(\t\022D\n\010entitie" - + "s\030\002 \003(\01322.google.cloud.dialogflow.v2beta" - + "1.EntityType.Entity\022\025\n\rlanguage_code\030\003 \001" - + "(\t\022/\n\013update_mask\030\004 \001(\0132\032.google.protobu" - + "f.FieldMask\"Z\n\032BatchDeleteEntitiesReques" - + "t\022\016\n\006parent\030\001 \001(\t\022\025\n\rentity_values\030\002 \003(\t" - + "\022\025\n\rlanguage_code\030\003 \001(\t\"T\n\017EntityTypeBat" + + "SION_MODE_DEFAULT\020\001\"k\n\026ListEntityTypesRe" + + "quest\022\016\n\006parent\030\001 \001(\t\022\032\n\rlanguage_code\030\002" + + " \001(\tB\003\340A\001\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" + + "en\030\004 \001(\t\"u\n\027ListEntityTypesResponse\022A\n\014e" + + "ntity_types\030\001 \003(\0132+.google.cloud.dialogf" + + "low.v2beta1.EntityType\022\027\n\017next_page_toke" + + "n\030\002 \001(\t\"@\n\024GetEntityTypeRequest\022\014\n\004name\030" + + "\001 \001(\t\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\001\"\207\001\n\027Cr" + + "eateEntityTypeRequest\022\016\n\006parent\030\001 \001(\t\022@\n" + + "\013entity_type\030\002 \001(\0132+.google.cloud.dialog" + + "flow.v2beta1.EntityType\022\032\n\rlanguage_code" + + "\030\003 \001(\tB\003\340A\001\"\250\001\n\027UpdateEntityTypeRequest\022" + + "@\n\013entity_type\030\001 \001(\0132+.google.cloud.dial" + + "ogflow.v2beta1.EntityType\022\032\n\rlanguage_co" + + "de\030\002 \001(\tB\003\340A\001\022/\n\013update_mask\030\003 \001(\0132\032.goo" + + "gle.protobuf.FieldMask\"\'\n\027DeleteEntityTy" + + "peRequest\022\014\n\004name\030\001 \001(\t\"\210\002\n\035BatchUpdateE" + + "ntityTypesRequest\022\016\n\006parent\030\001 \001(\t\022\037\n\025ent" + + "ity_type_batch_uri\030\002 \001(\tH\000\022T\n\030entity_typ" + + "e_batch_inline\030\003 \001(\01320.google.cloud.dial" + + "ogflow.v2beta1.EntityTypeBatchH\000\022\032\n\rlang" + + "uage_code\030\004 \001(\tB\003\340A\001\022/\n\013update_mask\030\005 \001(" + + "\0132\032.google.protobuf.FieldMaskB\023\n\021entity_" + + "type_batch\"c\n\036BatchUpdateEntityTypesResp" + + "onse\022A\n\014entity_types\030\001 \003(\0132+.google.clou" + + "d.dialogflow.v2beta1.EntityType\"J\n\035Batch" + + "DeleteEntityTypesRequest\022\016\n\006parent\030\001 \001(\t" + + "\022\031\n\021entity_type_names\030\002 \003(\t\"\216\001\n\032BatchCre" + + "ateEntitiesRequest\022\016\n\006parent\030\001 \001(\t\022D\n\010en" + + "tities\030\002 \003(\01322.google.cloud.dialogflow.v" + + "2beta1.EntityType.Entity\022\032\n\rlanguage_cod" + + "e\030\003 \001(\tB\003\340A\001\"\277\001\n\032BatchUpdateEntitiesRequ" + + "est\022\016\n\006parent\030\001 \001(\t\022D\n\010entities\030\002 \003(\01322." + + "google.cloud.dialogflow.v2beta1.EntityTy" + + "pe.Entity\022\032\n\rlanguage_code\030\003 \001(\tB\003\340A\001\022/\n" + + "\013update_mask\030\004 \001(\0132\032.google.protobuf.Fie" + + "ldMask\"_\n\032BatchDeleteEntitiesRequest\022\016\n\006" + + "parent\030\001 \001(\t\022\025\n\rentity_values\030\002 \003(\t\022\032\n\rl" + + "anguage_code\030\003 \001(\tB\003\340A\001\"T\n\017EntityTypeBat" + "ch\022A\n\014entity_types\030\001 \003(\0132+.google.cloud." + "dialogflow.v2beta1.EntityType2\201\026\n\013Entity" + "Types\022\372\001\n\017ListEntityTypes\0227.google.cloud" @@ -379,6 +380,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { 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.oauthScopes); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Environment.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Environment.java new file mode 100644 index 000000000..1c4902a03 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Environment.java @@ -0,0 +1,1682 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * Represents an agent environment.
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + description_ = ""; + agentVersion_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Environment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + agentVersion_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.Environment.class, + com.google.cloud.dialogflow.v2beta1.Environment.Builder.class); + } + + /** + * + * + *
+   * Represents an environment state. When a environment is pointed to a new
+   * agent version, the environment is temporarily set to the `LOADING` state.
+   * During that time, the environment keeps on serving the previous version of
+   * the agent. After the new agent version is done loading, the environment is
+   * set back to the `RUNNING` state.
+   * 
+ * + * Protobuf enum {@code google.cloud.dialogflow.v2beta1.Environment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not specified. This value is not used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Stopped.
+     * 
+ * + * STOPPED = 1; + */ + STOPPED(1), + /** + * + * + *
+     * Loading.
+     * 
+ * + * LOADING = 2; + */ + LOADING(2), + /** + * + * + *
+     * Running.
+     * 
+ * + * RUNNING = 3; + */ + RUNNING(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not specified. This value is not used.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Stopped.
+     * 
+ * + * STOPPED = 1; + */ + public static final int STOPPED_VALUE = 1; + /** + * + * + *
+     * Loading.
+     * 
+ * + * LOADING = 2; + */ + public static final int LOADING_VALUE = 2; + /** + * + * + *
+     * Running.
+     * 
+ * + * RUNNING = 3; + */ + public static final int RUNNING_VALUE = 3; + + 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 State 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 State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return STOPPED; + case 2: + return LOADING; + case 3: + return RUNNING; + 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 State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + 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.v2beta1.Environment.getDescriptor().getEnumTypes().get(0); + } + + private static final State[] VALUES = values(); + + public static State 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 State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2beta1.Environment.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + 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; + } + } + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + 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; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * 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) { + 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 developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * 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 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 AGENT_VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object agentVersion_; + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agentVersion. + */ + public java.lang.String getAgentVersion() { + java.lang.Object ref = agentVersion_; + 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(); + agentVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agentVersion. + */ + public com.google.protobuf.ByteString getAgentVersionBytes() { + java.lang.Object ref = agentVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + public com.google.cloud.dialogflow.v2beta1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.v2beta1.Environment.State result = + com.google.cloud.dialogflow.v2beta1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.v2beta1.Environment.State.UNRECOGNIZED + : result; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getAgentVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentVersion_); + } + if (state_ + != com.google.cloud.dialogflow.v2beta1.Environment.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, state_); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getAgentVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentVersion_); + } + if (state_ + != com.google.cloud.dialogflow.v2beta1.Environment.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + size += unknownFields.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.v2beta1.Environment)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.Environment other = + (com.google.cloud.dialogflow.v2beta1.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getAgentVersion().equals(other.getAgentVersion())) return false; + if (state_ != other.state_) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + AGENT_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAgentVersion().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.Environment parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment 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.v2beta1.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment 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.v2beta1.Environment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment 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.v2beta1.Environment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment 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.v2beta1.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment 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.v2beta1.Environment 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 an agent environment.
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.Environment) + com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_Environment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.Environment.class, + com.google.cloud.dialogflow.v2beta1.Environment.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.Environment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + agentVersion_ = ""; + + state_ = 0; + + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_Environment_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.Environment getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.Environment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.Environment build() { + com.google.cloud.dialogflow.v2beta1.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.Environment buildPartial() { + com.google.cloud.dialogflow.v2beta1.Environment result = + new com.google.cloud.dialogflow.v2beta1.Environment(this); + result.name_ = name_; + result.description_ = description_; + result.agentVersion_ = agentVersion_; + result.state_ = state_; + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + 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.v2beta1.Environment) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.Environment other) { + if (other == com.google.cloud.dialogflow.v2beta1.Environment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getAgentVersion().isEmpty()) { + agentVersion_ = other.agentVersion_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2beta1.Environment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.dialogflow.v2beta1.Environment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The unique identifier of this agent environment.
+     * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+     * For Environment ID, "-" is reserved for 'draft' environment.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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 developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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 developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The developer-provided description for this environment.
+     * The maximum length is 500 characters. If exceeded, the request is rejected.
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object agentVersion_ = ""; + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agentVersion. + */ + public java.lang.String getAgentVersion() { + java.lang.Object ref = agentVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agentVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agentVersion. + */ + public com.google.protobuf.ByteString getAgentVersionBytes() { + java.lang.Object ref = agentVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + agentVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The agentVersion to set. + * @return This builder for chaining. + */ + public Builder setAgentVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agentVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAgentVersion() { + + agentVersion_ = getDefaultInstance().getAgentVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The agent version loaded into this environment.
+     * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+     * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for agentVersion to set. + * @return This builder for chaining. + */ + public Builder setAgentVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agentVersion_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + public com.google.cloud.dialogflow.v2beta1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.dialogflow.v2beta1.Environment.State result = + com.google.cloud.dialogflow.v2beta1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.dialogflow.v2beta1.Environment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.dialogflow.v2beta1.Environment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+     * set by create and update methods.
+     * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + 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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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. The last update time of this environment. This field is read-only, i.e., it
+     * cannot be set by create and update methods.
+     * 
+ * + * + * .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.v2beta1.Environment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.Environment) + private static final com.google.cloud.dialogflow.v2beta1.Environment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.Environment(); + } + + public static com.google.cloud.dialogflow.v2beta1.Environment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Environment(input, extensionRegistry); + } + }; + + 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.v2beta1.Environment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentOrBuilder.java new file mode 100644 index 000000000..9268a33ec --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentOrBuilder.java @@ -0,0 +1,184 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The unique identifier of this agent environment.
+   * Format: `projects/<Project ID>/agent/environments/<Environment ID>`.
+   * For Environment ID, "-" is reserved for 'draft' environment.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. The developer-provided description for this environment.
+   * The maximum length is 500 characters. If exceeded, the request is rejected.
+   * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The agentVersion. + */ + java.lang.String getAgentVersion(); + /** + * + * + *
+   * Optional. The agent version loaded into this environment.
+   * Format: `projects/<Project ID>/agent/versions/<Version ID>`.
+   * 
+ * + * + * string agent_version = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for agentVersion. + */ + com.google.protobuf.ByteString getAgentVersionBytes(); + + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The state of this environment. This field is read-only, i.e., it cannot be
+   * set by create and update methods.
+   * 
+ * + * + * .google.cloud.dialogflow.v2beta1.Environment.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.dialogflow.v2beta1.Environment.State getState(); + + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The last update time of this environment. This field is read-only, i.e., it
+   * cannot be set by create and update methods.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentProto.java new file mode 100644 index 000000000..1a27b117a --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EnvironmentProto.java @@ -0,0 +1,151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +public final class EnvironmentProto { + private EnvironmentProto() {} + + 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_v2beta1_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_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/v2beta1/enviro" + + "nment.proto\022\037google.cloud.dialogflow.v2b" + + "eta1\032\034google/api/annotations.proto\032\037goog" + + "le/api/field_behavior.proto\032\031google/api/" + + "resource.proto\0322google/cloud/dialogflow/" + + "v2beta1/audio_config.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\032\037google/protobuf/timestamp.pro" + + "to\032\027google/api/client.proto\"\242\003\n\013Environm" + + "ent\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\002 " + + "\001(\tB\003\340A\001\022@\n\ragent_version\030\003 \001(\tB)\340A\001\372A#\n" + + "!dialogflow.googleapis.com/Version\022F\n\005st" + + "ate\030\004 \001(\01622.google.cloud.dialogflow.v2be" + + "ta1.Environment.StateB\003\340A\003\0224\n\013update_tim" + + "e\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\"E\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007STOP" + + "PED\020\001\022\013\n\007LOADING\020\002\022\013\n\007RUNNING\020\003:_\352A\\\n%di" + + "alogflow.googleapis.com/Environment\0223pro" + + "jects/{project}/agent/environments/{envi" + + "ronment}\"\211\001\n\027ListEnvironmentsRequest\022=\n\006" + + "parent\030\001 \001(\tB-\340A\002\372A\'\022%dialogflow.googlea" + + "pis.com/Environment\022\026\n\tpage_size\030\002 \001(\005B\003" + + "\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"w\n\030ListEnvi" + + "ronmentsResponse\022B\n\014environments\030\001 \003(\0132," + + ".google.cloud.dialogflow.v2beta1.Environ" + + "ment\022\027\n\017next_page_token\030\002 \001(\t2\212\003\n\014Enviro" + + "nments\022\377\001\n\020ListEnvironments\0228.google.clo" + + "ud.dialogflow.v2beta1.ListEnvironmentsRe" + + "quest\0329.google.cloud.dialogflow.v2beta1." + + "ListEnvironmentsResponse\"v\202\323\344\223\002p\022//v2bet" + + "a1/{parent=projects/*/agent}/environment" + + "sZ=\022;/v2beta1/{parent=projects/*/locatio" + + "ns/*/agent}/environments\032x\312A\031dialogflow." + + "googleapis.com\322AYhttps://www.googleapis." + + "com/auth/cloud-platform,https://www.goog" + + "leapis.com/auth/dialogflowB\256\001\n#com.googl" + + "e.cloud.dialogflow.v2beta1B\020EnvironmentP" + + "rotoP\001ZIgoogle.golang.org/genproto/googl" + + "eapis/cloud/dialogflow/v2beta1;dialogflo" + + "w\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogflow.V2be" + + "ta1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dialogflow.v2beta1.AudioConfigProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + }); + internal_static_google_cloud_dialogflow_v2beta1_Environment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dialogflow_v2beta1_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_Environment_descriptor, + new java.lang.String[] { + "Name", "Description", "AgentVersion", "State", "UpdateTime", + }); + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor, + new java.lang.String[] { + "Environments", "NextPageToken", + }); + 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.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.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dialogflow.v2beta1.AudioConfigProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInput.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInput.java index f148c2f54..2f16bb943 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInput.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInput.java @@ -192,6 +192,18 @@ public com.google.protobuf.ByteString getNameBytes() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -206,6 +218,18 @@ public boolean hasParameters() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -220,6 +244,18 @@ public com.google.protobuf.Struct getParameters() { * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -762,6 +798,18 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -776,6 +824,18 @@ public boolean hasParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -794,6 +854,18 @@ public com.google.protobuf.Struct getParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -816,6 +888,18 @@ public Builder setParameters(com.google.protobuf.Struct value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -835,6 +919,18 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -859,6 +955,18 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -879,6 +987,18 @@ public Builder clearParameters() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -893,6 +1013,18 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; @@ -909,6 +1041,18 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * *
      * The collection of parameters associated with the event.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 2; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInputOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInputOrBuilder.java index dc4e68ee6..59c3acfbb 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInputOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/EventInputOrBuilder.java @@ -53,6 +53,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -65,6 +77,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; @@ -77,6 +101,18 @@ public interface EventInputOrBuilder * *
    * The collection of parameters associated with the event.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 2; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequest.java index 4836bbfa8..81c4e1ece 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequest.java @@ -174,15 +174,14 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. The language to retrieve entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -201,15 +200,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language to retrieve entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -676,15 +674,14 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The language to retrieve entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -703,15 +700,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language to retrieve entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -730,15 +726,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language to retrieve entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -756,15 +751,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language to retrieve entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -778,15 +772,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language to retrieve entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequestOrBuilder.java index 89cb07e88..8c774fec7 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetEntityTypeRequestOrBuilder.java @@ -54,15 +54,14 @@ public interface GetEntityTypeRequestOrBuilder * * *
-   * Optional. The language to retrieve entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -71,15 +70,14 @@ public interface GetEntityTypeRequestOrBuilder * * *
-   * Optional. The language to retrieve entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequest.java index c8f39205e..0bf37c819 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequest.java @@ -182,15 +182,14 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Optional. The language to retrieve training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -209,15 +208,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language to retrieve training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -734,15 +732,14 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The language to retrieve training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -761,15 +758,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language to retrieve training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -788,15 +784,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language to retrieve training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -814,15 +809,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language to retrieve training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -836,15 +830,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language to retrieve training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequestOrBuilder.java index ad64fffb9..491e98404 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/GetIntentRequestOrBuilder.java @@ -54,15 +54,14 @@ public interface GetIntentRequestOrBuilder * * *
-   * Optional. The language to retrieve training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -71,15 +70,14 @@ public interface GetIntentRequestOrBuilder * * *
-   * Optional. The language to retrieve training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java index b08500004..c79283586 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfig.java @@ -298,7 +298,7 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-   * Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
+   * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
    * [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
    * words, e.g. start and end time offsets. If false or unspecified, Speech
    * doesn't return any word-level information.
@@ -318,7 +318,7 @@ public boolean getEnableWordInfo() {
    *
    *
    * 
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -328,9 +328,7 @@ public boolean getEnableWordInfo() {
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return A list containing the phraseHints. */ @@ -342,7 +340,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() { * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -352,9 +350,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() {
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return The count of phraseHints. */ @@ -366,7 +362,7 @@ public int getPhraseHintsCount() { * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -376,9 +372,7 @@ public int getPhraseHintsCount() {
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the element to return. * @return The phraseHints at the given index. @@ -391,7 +385,7 @@ public java.lang.String getPhraseHints(int index) { * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -401,9 +395,7 @@ public java.lang.String getPhraseHints(int index) {
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. @@ -419,7 +411,7 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) { * * *
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -434,7 +426,7 @@ public java.util.List getSpee
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -450,7 +442,7 @@ public java.util.List getSpee
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -465,7 +457,7 @@ public int getSpeechContextsCount() {
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -480,7 +472,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext getSpeechContexts(int i
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -499,7 +491,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContextOrBuilder getSpeechConte
    *
    *
    * 
-   * Optional. Which Speech model to select for the given request. Select the
+   * 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 we auto-select a model based on the parameters
    * in the InputAudioConfig.
@@ -531,7 +523,7 @@ public java.lang.String getModel() {
    *
    *
    * 
-   * Optional. Which Speech model to select for the given request. Select the
+   * 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 we auto-select a model based on the parameters
    * in the InputAudioConfig.
@@ -566,7 +558,7 @@ public com.google.protobuf.ByteString getModelBytes() {
    *
    *
    * 
-   * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+   * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
    * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -580,7 +572,7 @@ public int getModelVariantValue() { * * *
-   * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+   * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
    * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -602,7 +594,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechModelVariant getModelVariant() * * *
-   * Optional. If `false` (default), recognition does not cease until the
+   * If `false` (default), recognition does not cease until the
    * client closes the stream.
    * If `true`, the recognizer will detect a single spoken utterance in input
    * audio. Recognition ceases when it detects the audio's voice has
@@ -1414,7 +1406,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
+     * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
      * [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
      * words, e.g. start and end time offsets. If false or unspecified, Speech
      * doesn't return any word-level information.
@@ -1431,7 +1423,7 @@ public boolean getEnableWordInfo() {
      *
      *
      * 
-     * Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
+     * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
      * [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
      * words, e.g. start and end time offsets. If false or unspecified, Speech
      * doesn't return any word-level information.
@@ -1452,7 +1444,7 @@ public Builder setEnableWordInfo(boolean value) {
      *
      *
      * 
-     * Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
+     * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
      * [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
      * words, e.g. start and end time offsets. If false or unspecified, Speech
      * doesn't return any word-level information.
@@ -1482,7 +1474,7 @@ private void ensurePhraseHintsIsMutable() {
      *
      *
      * 
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1492,9 +1484,7 @@ private void ensurePhraseHintsIsMutable() {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return A list containing the phraseHints. */ @@ -1506,7 +1496,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1516,9 +1506,7 @@ public com.google.protobuf.ProtocolStringList getPhraseHintsList() {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return The count of phraseHints. */ @@ -1530,7 +1518,7 @@ public int getPhraseHintsCount() { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1540,9 +1528,7 @@ public int getPhraseHintsCount() {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the element to return. * @return The phraseHints at the given index. @@ -1555,7 +1541,7 @@ public java.lang.String getPhraseHints(int index) { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1565,9 +1551,7 @@ public java.lang.String getPhraseHints(int index) {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. @@ -1580,7 +1564,7 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1590,9 +1574,7 @@ public com.google.protobuf.ByteString getPhraseHintsBytes(int index) {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index to set the value at. * @param value The phraseHints to set. @@ -1612,7 +1594,7 @@ public Builder setPhraseHints(int index, java.lang.String value) { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1622,9 +1604,7 @@ public Builder setPhraseHints(int index, java.lang.String value) {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param value The phraseHints to add. * @return This builder for chaining. @@ -1643,7 +1623,7 @@ public Builder addPhraseHints(java.lang.String value) { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1653,9 +1633,7 @@ public Builder addPhraseHints(java.lang.String value) {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param values The phraseHints to add. * @return This builder for chaining. @@ -1671,7 +1649,7 @@ public Builder addAllPhraseHints(java.lang.Iterable values) { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1681,9 +1659,7 @@ public Builder addAllPhraseHints(java.lang.Iterable values) {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return This builder for chaining. */ @@ -1698,7 +1674,7 @@ public Builder clearPhraseHints() { * * *
-     * Optional. A list of strings containing words and phrases that the speech
+     * A list of strings containing words and phrases that the speech
      * recognizer should recognize with higher likelihood.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -1708,9 +1684,7 @@ public Builder clearPhraseHints() {
      * treat the [phrase_hints]() as a single additional [SpeechContext]().
      * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param value The bytes of the phraseHints to add. * @return This builder for chaining. @@ -1749,7 +1723,7 @@ private void ensureSpeechContextsIsMutable() { * * *
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1769,7 +1743,7 @@ private void ensureSpeechContextsIsMutable() {
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1788,7 +1762,7 @@ public int getSpeechContextsCount() {
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1807,7 +1781,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext getSpeechContexts(int i
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1833,7 +1807,7 @@ public Builder setSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1856,7 +1830,7 @@ public Builder setSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1881,7 +1855,7 @@ public Builder addSpeechContexts(com.google.cloud.dialogflow.v2beta1.SpeechConte
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1907,7 +1881,7 @@ public Builder addSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1930,7 +1904,7 @@ public Builder addSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1953,7 +1927,7 @@ public Builder addSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1976,7 +1950,7 @@ public Builder addAllSpeechContexts(
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -1998,7 +1972,7 @@ public Builder clearSpeechContexts() {
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2020,7 +1994,7 @@ public Builder removeSpeechContexts(int index) {
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2036,7 +2010,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext.Builder getSpeechContex
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2056,7 +2030,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContextOrBuilder getSpeechConte
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2076,7 +2050,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContextOrBuilder getSpeechConte
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2092,7 +2066,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext.Builder addSpeechContex
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2110,7 +2084,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext.Builder addSpeechContex
      *
      *
      * 
-     * Optional. Context information to assist speech recognition.
+     * Context information to assist speech recognition.
      * See [the Cloud Speech
      * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
      * for more details.
@@ -2148,7 +2122,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechContext.Builder addSpeechContex
      *
      *
      * 
-     * Optional. Which Speech model to select for the given request. Select the
+     * 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 we auto-select a model based on the parameters
      * in the InputAudioConfig.
@@ -2180,7 +2154,7 @@ public java.lang.String getModel() {
      *
      *
      * 
-     * Optional. Which Speech model to select for the given request. Select the
+     * 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 we auto-select a model based on the parameters
      * in the InputAudioConfig.
@@ -2212,7 +2186,7 @@ public com.google.protobuf.ByteString getModelBytes() {
      *
      *
      * 
-     * Optional. Which Speech model to select for the given request. Select the
+     * 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 we auto-select a model based on the parameters
      * in the InputAudioConfig.
@@ -2243,7 +2217,7 @@ public Builder setModel(java.lang.String value) {
      *
      *
      * 
-     * Optional. Which Speech model to select for the given request. Select the
+     * 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 we auto-select a model based on the parameters
      * in the InputAudioConfig.
@@ -2270,7 +2244,7 @@ public Builder clearModel() {
      *
      *
      * 
-     * Optional. Which Speech model to select for the given request. Select the
+     * 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 we auto-select a model based on the parameters
      * in the InputAudioConfig.
@@ -2304,7 +2278,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) {
      *
      *
      * 
-     * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+     * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
      * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -2318,7 +2292,7 @@ public int getModelVariantValue() { * * *
-     * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+     * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
      * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -2335,7 +2309,7 @@ public Builder setModelVariantValue(int value) { * * *
-     * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+     * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
      * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -2354,7 +2328,7 @@ public com.google.cloud.dialogflow.v2beta1.SpeechModelVariant getModelVariant() * * *
-     * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+     * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
      * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -2375,7 +2349,7 @@ public Builder setModelVariant(com.google.cloud.dialogflow.v2beta1.SpeechModelVa * * *
-     * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+     * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
      * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -2394,7 +2368,7 @@ public Builder clearModelVariant() { * * *
-     * Optional. If `false` (default), recognition does not cease until the
+     * If `false` (default), recognition does not cease until the
      * client closes the stream.
      * If `true`, the recognizer will detect a single spoken utterance in input
      * audio. Recognition ceases when it detects the audio's voice has
@@ -2417,7 +2391,7 @@ public boolean getSingleUtterance() {
      *
      *
      * 
-     * Optional. If `false` (default), recognition does not cease until the
+     * If `false` (default), recognition does not cease until the
      * client closes the stream.
      * If `true`, the recognizer will detect a single spoken utterance in input
      * audio. Recognition ceases when it detects the audio's voice has
@@ -2444,7 +2418,7 @@ public Builder setSingleUtterance(boolean value) {
      *
      *
      * 
-     * Optional. If `false` (default), recognition does not cease until the
+     * If `false` (default), recognition does not cease until the
      * client closes the stream.
      * If `true`, the recognizer will detect a single spoken utterance in input
      * audio. Recognition ceases when it detects the audio's voice has
diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java
index 224bc1a73..ee838e3c3 100644
--- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java
+++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/InputAudioConfigOrBuilder.java
@@ -102,7 +102,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
+   * If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in
    * [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech
    * words, e.g. start and end time offsets. If false or unspecified, Speech
    * doesn't return any word-level information.
@@ -118,7 +118,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -128,9 +128,7 @@ public interface InputAudioConfigOrBuilder
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return A list containing the phraseHints. */ @@ -140,7 +138,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -150,9 +148,7 @@ public interface InputAudioConfigOrBuilder
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @return The count of phraseHints. */ @@ -162,7 +158,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -172,9 +168,7 @@ public interface InputAudioConfigOrBuilder
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the element to return. * @return The phraseHints at the given index. @@ -185,7 +179,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. A list of strings containing words and phrases that the speech
+   * A list of strings containing words and phrases that the speech
    * recognizer should recognize with higher likelihood.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
@@ -195,9 +189,7 @@ public interface InputAudioConfigOrBuilder
    * treat the [phrase_hints]() as a single additional [SpeechContext]().
    * 
* - * - * repeated string phrase_hints = 4 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * + * repeated string phrase_hints = 4 [deprecated = true]; * * @param index The index of the value to return. * @return The bytes of the phraseHints at the given index. @@ -209,7 +201,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -222,7 +214,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -235,7 +227,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -248,7 +240,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -262,7 +254,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Context information to assist speech recognition.
+   * Context information to assist speech recognition.
    * See [the Cloud Speech
    * documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
    * for more details.
@@ -276,7 +268,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Which Speech model to select for the given request. Select the
+   * 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 we auto-select a model based on the parameters
    * in the InputAudioConfig.
@@ -298,7 +290,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Which Speech model to select for the given request. Select the
+   * 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 we auto-select a model based on the parameters
    * in the InputAudioConfig.
@@ -321,7 +313,7 @@ public interface InputAudioConfigOrBuilder
    *
    *
    * 
-   * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+   * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
    * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -333,7 +325,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
+   * Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.
    * 
* * .google.cloud.dialogflow.v2beta1.SpeechModelVariant model_variant = 10; @@ -346,7 +338,7 @@ public interface InputAudioConfigOrBuilder * * *
-   * Optional. If `false` (default), recognition does not cease until the
+   * If `false` (default), recognition does not cease until the
    * client closes the stream.
    * If `true`, the recognizer will detect a single spoken utterance in input
    * audio. Recognition ceases when it detects the audio's voice has
diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Intent.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Intent.java
index 8013d665c..fe5466e39 100644
--- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Intent.java
+++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/Intent.java
@@ -6011,9 +6011,7 @@ public interface MessageOrBuilder
      *
      *
      * 
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -6025,9 +6023,7 @@ public interface MessageOrBuilder * * *
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -6039,9 +6035,7 @@ public interface MessageOrBuilder * * *
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -7288,67 +7282,9 @@ public enum Platform implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Actions on Google.
-       * When using Actions on Google, you can choose one of the specific
-       * Intent.Message types that mention support for Actions on Google,
-       * or you can use the advanced Intent.Message.payload field.
-       * The payload field provides access to AoG features not available in the
-       * specific message types.
-       * If using the Intent.Message.payload field, it should have a structure
-       * similar to the JSON message shown here. For more information, see
-       * [Actions on Google Webhook
-       * Format](https://developers.google.com/actions/dialogflow/webhook)
-       * <pre>{
-       *   "expectUserResponse": true,
-       *   "isSsml": false,
-       *   "noInputPrompts": [],
-       *   "richResponse": {
-       *     "items": [
-       *       {
-       *         "simpleResponse": {
-       *           "displayText": "hi",
-       *           "textToSpeech": "hello"
-       *         }
-       *       }
-       *     ],
-       *     "suggestions": [
-       *       {
-       *         "title": "Say this"
-       *       },
-       *       {
-       *         "title": "or this"
-       *       }
-       *     ]
-       *   },
-       *   "systemIntent": {
-       *     "data": {
-       *       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-       *       "listSelect": {
-       *         "items": [
-       *           {
-       *             "optionInfo": {
-       *               "key": "key1",
-       *               "synonyms": [
-       *                 "key one"
-       *               ]
-       *             },
-       *             "title": "must not be empty, but unique"
-       *           },
-       *           {
-       *             "optionInfo": {
-       *               "key": "key2",
-       *               "synonyms": [
-       *                 "key two"
-       *               ]
-       *             },
-       *             "title": "must not be empty, but unique"
-       *           }
-       *         ]
-       *       }
-       *     },
-       *     "intent": "actions.intent.OPTION"
-       *   }
-       * }</pre>
+       * Google Assistant
+       * See [Dialogflow webhook
+       * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
        * 
* * ACTIONS_ON_GOOGLE = 8; @@ -7461,67 +7397,9 @@ public enum Platform implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Actions on Google.
-       * When using Actions on Google, you can choose one of the specific
-       * Intent.Message types that mention support for Actions on Google,
-       * or you can use the advanced Intent.Message.payload field.
-       * The payload field provides access to AoG features not available in the
-       * specific message types.
-       * If using the Intent.Message.payload field, it should have a structure
-       * similar to the JSON message shown here. For more information, see
-       * [Actions on Google Webhook
-       * Format](https://developers.google.com/actions/dialogflow/webhook)
-       * <pre>{
-       *   "expectUserResponse": true,
-       *   "isSsml": false,
-       *   "noInputPrompts": [],
-       *   "richResponse": {
-       *     "items": [
-       *       {
-       *         "simpleResponse": {
-       *           "displayText": "hi",
-       *           "textToSpeech": "hello"
-       *         }
-       *       }
-       *     ],
-       *     "suggestions": [
-       *       {
-       *         "title": "Say this"
-       *       },
-       *       {
-       *         "title": "or this"
-       *       }
-       *     ]
-       *   },
-       *   "systemIntent": {
-       *     "data": {
-       *       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-       *       "listSelect": {
-       *         "items": [
-       *           {
-       *             "optionInfo": {
-       *               "key": "key1",
-       *               "synonyms": [
-       *                 "key one"
-       *               ]
-       *             },
-       *             "title": "must not be empty, but unique"
-       *           },
-       *           {
-       *             "optionInfo": {
-       *               "key": "key2",
-       *               "synonyms": [
-       *                 "key two"
-       *               ]
-       *             },
-       *             "title": "must not be empty, but unique"
-       *           }
-       *         ]
-       *       }
-       *     },
-       *     "intent": "actions.intent.OPTION"
-       *   }
-       * }</pre>
+       * Google Assistant
+       * See [Dialogflow webhook
+       * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
        * 
* * ACTIONS_ON_GOOGLE = 8; @@ -35350,18 +35228,18 @@ public interface RbmMediaOrBuilder *
        * Rich Business Messaging (RBM) Media displayed in Cards
        * The following media-types are currently supported:
-       * ## Image Types
-       *  image/jpeg
-       *  image/jpg'
-       *  image/gif
-       *  image/png
-       * ## Video Types
-       *  video/h263
-       *  video/m4v
-       *  video/mp4
-       *  video/mpeg
-       *  video/mpeg4
-       *  video/webm
+       * Image Types
+       * * image/jpeg
+       * * image/jpg'
+       * * image/gif
+       * * image/png
+       * Video Types
+       * * video/h263
+       * * video/m4v
+       * * video/mp4
+       * * video/mpeg
+       * * video/mpeg4
+       * * video/webm
        * 
* * Protobuf type {@code @@ -36012,18 +35890,18 @@ protected Builder newBuilderForType( *
          * Rich Business Messaging (RBM) Media displayed in Cards
          * The following media-types are currently supported:
-         * ## Image Types
-         *  image/jpeg
-         *  image/jpg'
-         *  image/gif
-         *  image/png
-         * ## Video Types
-         *  video/h263
-         *  video/m4v
-         *  video/mp4
-         *  video/mpeg
-         *  video/mpeg4
-         *  video/webm
+         * Image Types
+         * * image/jpeg
+         * * image/jpg'
+         * * image/gif
+         * * image/png
+         * Video Types
+         * * video/h263
+         * * video/m4v
+         * * video/mp4
+         * * video/mpeg
+         * * video/mpeg4
+         * * video/webm
          * 
* * Protobuf type {@code @@ -58869,9 +58747,7 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.CardOrBuilder getCardO * * *
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -58885,9 +58761,7 @@ public boolean hasPayload() { * * *
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -58904,9 +58778,7 @@ public com.google.protobuf.Struct getPayload() { * * *
-     * Returns a response containing a custom, platform-specific payload.
-     * See the Intent.Message.Platform type for a description of the
-     * structure that may be required for your platform.
+     * A custom platform-specific response.
      * 
* * .google.protobuf.Struct payload = 5; @@ -61551,9 +61423,7 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.CardOrBuilder getCardO * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61567,9 +61437,7 @@ public boolean hasPayload() { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61593,9 +61461,7 @@ public com.google.protobuf.Struct getPayload() { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61617,9 +61483,7 @@ public Builder setPayload(com.google.protobuf.Struct value) { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61638,9 +61502,7 @@ public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61669,9 +61531,7 @@ public Builder mergePayload(com.google.protobuf.Struct value) { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61696,9 +61556,7 @@ public Builder clearPayload() { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61710,9 +61568,7 @@ public com.google.protobuf.Struct.Builder getPayloadBuilder() { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -61731,9 +61587,7 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { * * *
-       * Returns a response containing a custom, platform-specific payload.
-       * See the Intent.Message.Platform type for a description of the
-       * structure that may be required for your platform.
+       * A custom platform-specific response.
        * 
* * .google.protobuf.Struct payload = 5; @@ -66549,6 +66403,7 @@ public com.google.protobuf.ByteString getInputContextNamesBytes(int index) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -66565,6 +66420,7 @@ public com.google.protobuf.ProtocolStringList getEventsList() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -66581,6 +66437,7 @@ public int getEventsCount() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -66598,6 +66455,7 @@ public java.lang.String getEvents(int index) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -68999,6 +68857,7 @@ private void ensureEventsIsMutable() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69015,6 +68874,7 @@ public com.google.protobuf.ProtocolStringList getEventsList() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69031,6 +68891,7 @@ public int getEventsCount() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69048,6 +68909,7 @@ public java.lang.String getEvents(int index) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69065,6 +68927,7 @@ public com.google.protobuf.ByteString getEventsBytes(int index) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69089,6 +68952,7 @@ public Builder setEvents(int index, java.lang.String value) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69112,6 +68976,7 @@ public Builder addEvents(java.lang.String value) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69132,6 +68997,7 @@ public Builder addAllEvents(java.lang.Iterable values) { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -69151,6 +69017,7 @@ public Builder clearEvents() { * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentOrBuilder.java index 6289ba6ea..980fed5fb 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentOrBuilder.java @@ -257,6 +257,7 @@ public interface IntentOrBuilder * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -271,6 +272,7 @@ public interface IntentOrBuilder * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -285,6 +287,7 @@ public interface IntentOrBuilder * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; @@ -300,6 +303,7 @@ public interface IntentOrBuilder * Optional. The collection of event names that trigger the intent. * If the collection of input contexts is not empty, all of the contexts must * be present in the active user session for an event to trigger this intent. + * Event names are limited to 150 characters. *
* * repeated string events = 8; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentProto.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentProto.java index 49927ca02..a36a45642 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentProto.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/IntentProto.java @@ -525,93 +525,94 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "gflow.googleapis.com/Intent\022)projects/{p" + "roject}/agent/intents/{intent}\022>projects" + "/{project}/locations/{location}/agent/in" - + "tents/{intent}\"\244\001\n\022ListIntentsRequest\022\016\n" - + "\006parent\030\001 \001(\t\022\025\n\rlanguage_code\030\002 \001(\t\022@\n\013" - + "intent_view\030\003 \001(\0162+.google.cloud.dialogf" - + "low.v2beta1.IntentView\022\021\n\tpage_size\030\004 \001(" - + "\005\022\022\n\npage_token\030\005 \001(\t\"h\n\023ListIntentsResp" - + "onse\0228\n\007intents\030\001 \003(\0132\'.google.cloud.dia" - + "logflow.v2beta1.Intent\022\027\n\017next_page_toke" - + "n\030\002 \001(\t\"y\n\020GetIntentRequest\022\014\n\004name\030\001 \001(" - + "\t\022\025\n\rlanguage_code\030\002 \001(\t\022@\n\013intent_view\030" - + "\003 \001(\0162+.google.cloud.dialogflow.v2beta1." - + "IntentView\"\267\001\n\023CreateIntentRequest\022\016\n\006pa" - + "rent\030\001 \001(\t\0227\n\006intent\030\002 \001(\0132\'.google.clou" - + "d.dialogflow.v2beta1.Intent\022\025\n\rlanguage_" - + "code\030\003 \001(\t\022@\n\013intent_view\030\004 \001(\0162+.google" - + ".cloud.dialogflow.v2beta1.IntentView\"\330\001\n" - + "\023UpdateIntentRequest\0227\n\006intent\030\001 \001(\0132\'.g" - + "oogle.cloud.dialogflow.v2beta1.Intent\022\025\n" - + "\rlanguage_code\030\002 \001(\t\022/\n\013update_mask\030\003 \001(" - + "\0132\032.google.protobuf.FieldMask\022@\n\013intent_" - + "view\030\004 \001(\0162+.google.cloud.dialogflow.v2b" - + "eta1.IntentView\"#\n\023DeleteIntentRequest\022\014" - + "\n\004name\030\001 \001(\t\"\256\002\n\031BatchUpdateIntentsReque" - + "st\022\016\n\006parent\030\001 \001(\t\022\032\n\020intent_batch_uri\030\002" - + " \001(\tH\000\022K\n\023intent_batch_inline\030\003 \001(\0132,.go" - + "ogle.cloud.dialogflow.v2beta1.IntentBatc" - + "hH\000\022\025\n\rlanguage_code\030\004 \001(\t\022/\n\013update_mas" - + "k\030\005 \001(\0132\032.google.protobuf.FieldMask\022@\n\013i" - + "ntent_view\030\006 \001(\0162+.google.cloud.dialogfl" - + "ow.v2beta1.IntentViewB\016\n\014intent_batch\"V\n" - + "\032BatchUpdateIntentsResponse\0228\n\007intents\030\001" - + " \003(\0132\'.google.cloud.dialogflow.v2beta1.I" - + "ntent\"e\n\031BatchDeleteIntentsRequest\022\016\n\006pa" - + "rent\030\001 \001(\t\0228\n\007intents\030\002 \003(\0132\'.google.clo" - + "ud.dialogflow.v2beta1.Intent\"G\n\013IntentBa" - + "tch\0228\n\007intents\030\001 \003(\0132\'.google.cloud.dial" - + "ogflow.v2beta1.Intent*?\n\nIntentView\022\033\n\027I" - + "NTENT_VIEW_UNSPECIFIED\020\000\022\024\n\020INTENT_VIEW_" - + "FULL\020\0012\375\r\n\007Intents\022\346\001\n\013ListIntents\0223.goo" - + "gle.cloud.dialogflow.v2beta1.ListIntents" - + "Request\0324.google.cloud.dialogflow.v2beta" - + "1.ListIntentsResponse\"l\202\323\344\223\002f\022*/v2beta1/" - + "{parent=projects/*/agent}/intentsZ8\0226/v2" - + "beta1/{parent=projects/*/locations/*/age" - + "nt}/intents\022\325\001\n\tGetIntent\0221.google.cloud" - + ".dialogflow.v2beta1.GetIntentRequest\032\'.g" - + "oogle.cloud.dialogflow.v2beta1.Intent\"l\202" - + "\323\344\223\002f\022*/v2beta1/{name=projects/*/agent/i" - + "ntents/*}Z8\0226/v2beta1/{name=projects/*/l" - + "ocations/*/agent/intents/*}\022\353\001\n\014CreateIn" - + "tent\0224.google.cloud.dialogflow.v2beta1.C" - + "reateIntentRequest\032\'.google.cloud.dialog" - + "flow.v2beta1.Intent\"|\202\323\344\223\002v\"*/v2beta1/{p" - + "arent=projects/*/agent}/intents:\006intentZ" - + "@\"6/v2beta1/{parent=projects/*/locations" - + "/*/agent}/intents:\006intent\022\373\001\n\014UpdateInte" - + "nt\0224.google.cloud.dialogflow.v2beta1.Upd" - + "ateIntentRequest\032\'.google.cloud.dialogfl" - + "ow.v2beta1.Intent\"\213\001\202\323\344\223\002\204\00121/v2beta1/{i" - + "ntent.name=projects/*/agent/intents/*}:\006" - + "intentZG2=/v2beta1/{intent.name=projects" - + "/*/locations/*/agent/intents/*}:\006intent\022" - + "\312\001\n\014DeleteIntent\0224.google.cloud.dialogfl" - + "ow.v2beta1.DeleteIntentRequest\032\026.google." - + "protobuf.Empty\"l\202\323\344\223\002f**/v2beta1/{name=p" - + "rojects/*/agent/intents/*}Z8*6/v2beta1/{" - + "name=projects/*/locations/*/agent/intent" - + "s/*}\022\375\001\n\022BatchUpdateIntents\022:.google.clo" - + "ud.dialogflow.v2beta1.BatchUpdateIntents" - + "Request\032\035.google.longrunning.Operation\"\213" - + "\001\202\323\344\223\002\204\001\"6/v2beta1/{parent=projects/*/ag" - + "ent}/intents:batchUpdate:\001*ZG\"B/v2beta1/" - + "{parent=projects/*/locations/*/agent}/in" - + "tents:batchUpdate:\001*\022\375\001\n\022BatchDeleteInte" - + "nts\022:.google.cloud.dialogflow.v2beta1.Ba" - + "tchDeleteIntentsRequest\032\035.google.longrun" - + "ning.Operation\"\213\001\202\323\344\223\002\204\001\"6/v2beta1/{pare" - + "nt=projects/*/agent}/intents:batchDelete" - + ":\001*ZG\"B/v2beta1/{parent=projects/*/locat" - + "ions/*/agent}/intents:batchDelete:\001*\032x\312A" - + "\031dialogflow.googleapis.com\322AYhttps://www" - + ".googleapis.com/auth/cloud-platform,http" - + "s://www.googleapis.com/auth/dialogflowB\251" - + "\001\n#com.google.cloud.dialogflow.v2beta1B\013" - + "IntentProtoP\001ZIgoogle.golang.org/genprot" - + "o/googleapis/cloud/dialogflow/v2beta1;di" - + "alogflow\370\001\001\242\002\002DF\252\002\037Google.Cloud.Dialogfl" - + "ow.V2beta1b\006proto3" + + "tents/{intent}\"\251\001\n\022ListIntentsRequest\022\016\n" + + "\006parent\030\001 \001(\t\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A" + + "\001\022@\n\013intent_view\030\003 \001(\0162+.google.cloud.di" + + "alogflow.v2beta1.IntentView\022\021\n\tpage_size" + + "\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"h\n\023ListIntent" + + "sResponse\0228\n\007intents\030\001 \003(\0132\'.google.clou" + + "d.dialogflow.v2beta1.Intent\022\027\n\017next_page" + + "_token\030\002 \001(\t\"~\n\020GetIntentRequest\022\014\n\004name" + + "\030\001 \001(\t\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\001\022@\n\013in" + + "tent_view\030\003 \001(\0162+.google.cloud.dialogflo" + + "w.v2beta1.IntentView\"\274\001\n\023CreateIntentReq" + + "uest\022\016\n\006parent\030\001 \001(\t\0227\n\006intent\030\002 \001(\0132\'.g" + + "oogle.cloud.dialogflow.v2beta1.Intent\022\032\n" + + "\rlanguage_code\030\003 \001(\tB\003\340A\001\022@\n\013intent_view" + + "\030\004 \001(\0162+.google.cloud.dialogflow.v2beta1" + + ".IntentView\"\335\001\n\023UpdateIntentRequest\0227\n\006i" + + "ntent\030\001 \001(\0132\'.google.cloud.dialogflow.v2" + + "beta1.Intent\022\032\n\rlanguage_code\030\002 \001(\tB\003\340A\001" + + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." + + "FieldMask\022@\n\013intent_view\030\004 \001(\0162+.google." + + "cloud.dialogflow.v2beta1.IntentView\"#\n\023D" + + "eleteIntentRequest\022\014\n\004name\030\001 \001(\t\"\263\002\n\031Bat" + + "chUpdateIntentsRequest\022\016\n\006parent\030\001 \001(\t\022\032" + + "\n\020intent_batch_uri\030\002 \001(\tH\000\022K\n\023intent_bat" + + "ch_inline\030\003 \001(\0132,.google.cloud.dialogflo" + + "w.v2beta1.IntentBatchH\000\022\032\n\rlanguage_code" + + "\030\004 \001(\tB\003\340A\001\022/\n\013update_mask\030\005 \001(\0132\032.googl" + + "e.protobuf.FieldMask\022@\n\013intent_view\030\006 \001(" + + "\0162+.google.cloud.dialogflow.v2beta1.Inte" + + "ntViewB\016\n\014intent_batch\"V\n\032BatchUpdateInt" + + "entsResponse\0228\n\007intents\030\001 \003(\0132\'.google.c" + + "loud.dialogflow.v2beta1.Intent\"e\n\031BatchD" + + "eleteIntentsRequest\022\016\n\006parent\030\001 \001(\t\0228\n\007i" + + "ntents\030\002 \003(\0132\'.google.cloud.dialogflow.v" + + "2beta1.Intent\"G\n\013IntentBatch\0228\n\007intents\030" + + "\001 \003(\0132\'.google.cloud.dialogflow.v2beta1." + + "Intent*?\n\nIntentView\022\033\n\027INTENT_VIEW_UNSP" + + "ECIFIED\020\000\022\024\n\020INTENT_VIEW_FULL\020\0012\375\r\n\007Inte" + + "nts\022\346\001\n\013ListIntents\0223.google.cloud.dialo" + + "gflow.v2beta1.ListIntentsRequest\0324.googl" + + "e.cloud.dialogflow.v2beta1.ListIntentsRe" + + "sponse\"l\202\323\344\223\002f\022*/v2beta1/{parent=project" + + "s/*/agent}/intentsZ8\0226/v2beta1/{parent=p" + + "rojects/*/locations/*/agent}/intents\022\325\001\n" + + "\tGetIntent\0221.google.cloud.dialogflow.v2b" + + "eta1.GetIntentRequest\032\'.google.cloud.dia" + + "logflow.v2beta1.Intent\"l\202\323\344\223\002f\022*/v2beta1" + + "/{name=projects/*/agent/intents/*}Z8\0226/v" + + "2beta1/{name=projects/*/locations/*/agen" + + "t/intents/*}\022\353\001\n\014CreateIntent\0224.google.c" + + "loud.dialogflow.v2beta1.CreateIntentRequ" + + "est\032\'.google.cloud.dialogflow.v2beta1.In" + + "tent\"|\202\323\344\223\002v\"*/v2beta1/{parent=projects/" + + "*/agent}/intents:\006intentZ@\"6/v2beta1/{pa" + + "rent=projects/*/locations/*/agent}/inten" + + "ts:\006intent\022\373\001\n\014UpdateIntent\0224.google.clo" + + "ud.dialogflow.v2beta1.UpdateIntentReques" + + "t\032\'.google.cloud.dialogflow.v2beta1.Inte" + + "nt\"\213\001\202\323\344\223\002\204\00121/v2beta1/{intent.name=proj" + + "ects/*/agent/intents/*}:\006intentZG2=/v2be" + + "ta1/{intent.name=projects/*/locations/*/" + + "agent/intents/*}:\006intent\022\312\001\n\014DeleteInten" + + "t\0224.google.cloud.dialogflow.v2beta1.Dele" + + "teIntentRequest\032\026.google.protobuf.Empty\"" + + "l\202\323\344\223\002f**/v2beta1/{name=projects/*/agent" + + "/intents/*}Z8*6/v2beta1/{name=projects/*" + + "/locations/*/agent/intents/*}\022\375\001\n\022BatchU" + + "pdateIntents\022:.google.cloud.dialogflow.v" + + "2beta1.BatchUpdateIntentsRequest\032\035.googl" + + "e.longrunning.Operation\"\213\001\202\323\344\223\002\204\001\"6/v2be" + + "ta1/{parent=projects/*/agent}/intents:ba" + + "tchUpdate:\001*ZG\"B/v2beta1/{parent=project" + + "s/*/locations/*/agent}/intents:batchUpda" + + "te:\001*\022\375\001\n\022BatchDeleteIntents\022:.google.cl" + + "oud.dialogflow.v2beta1.BatchDeleteIntent" + + "sRequest\032\035.google.longrunning.Operation\"" + + "\213\001\202\323\344\223\002\204\001\"6/v2beta1/{parent=projects/*/a" + + "gent}/intents:batchDelete:\001*ZG\"B/v2beta1" + + "/{parent=projects/*/locations/*/agent}/i" + + "ntents:batchDelete:\001*\032x\312A\031dialogflow.goo" + + "gleapis.com\322AYhttps://www.googleapis.com" + + "/auth/cloud-platform,https://www.googlea" + + "pis.com/auth/dialogflowB\251\001\n#com.google.c" + + "loud.dialogflow.v2beta1B\013IntentProtoP\001ZI" + + "google.golang.org/genproto/googleapis/cl" + + "oud/dialogflow/v2beta1;dialogflow\370\001\001\242\002\002D" + + "F\252\002\037Google.Cloud.Dialogflow.V2beta1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequest.java index 3a4c882e8..89c349de7 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequest.java @@ -187,15 +187,14 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The language to list entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -214,15 +213,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language to list entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -785,15 +783,14 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The language to list entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -812,15 +809,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language to list entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -839,15 +835,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language to list entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -865,15 +860,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language to list entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -887,15 +881,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language to list entity synonyms for. If not specified,
-     * the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequestOrBuilder.java index e284f5da1..659b0d622 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEntityTypesRequestOrBuilder.java @@ -54,15 +54,14 @@ public interface ListEntityTypesRequestOrBuilder * * *
-   * Optional. The language to list entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -71,15 +70,14 @@ public interface ListEntityTypesRequestOrBuilder * * *
-   * Optional. The language to list entity synonyms for. If not specified,
-   * the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequest.java new file mode 100644 index 000000000..ad0fb1b7f --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequest.java @@ -0,0 +1,925 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} + */ +public final class ListEnvironmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) + ListEnvironmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsRequest.newBuilder() to construct. + private ListEnvironmentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + 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(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.class, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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) { + 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 all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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 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_; + /** + * + * + *
+   * 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. + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + 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. + */ + 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. + */ + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.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.v2beta1.ListEnvironmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest other = + (com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest 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.v2beta1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest 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.v2beta1.ListEnvironmentsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest 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.v2beta1.ListEnvironmentsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest 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.v2beta1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest 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.v2beta1.ListEnvironmentsRequest 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.class, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest build() { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest buildPartial() { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest result = + new com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.v2beta1.ListEnvironmentsRequest) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest other) { + if (other == com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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 all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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 all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The agent to list all environments from.
+     * Format: `projects/<Project ID>/agent`.
+     * 
+ * + * + * 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; + 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. + */ + 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; + 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() { + + 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; + 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(); + 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; + 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.v2beta1.ListEnvironmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) + private static final com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest(); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsRequest(input, extensionRegistry); + } + }; + + 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.v2beta1.ListEnvironmentsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequestOrBuilder.java new file mode 100644 index 000000000..566fde6f7 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsRequestOrBuilder.java @@ -0,0 +1,95 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface ListEnvironmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.ListEnvironmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The agent to list all environments from.
+   * Format: `projects/<Project ID>/agent`.
+   * 
+ * + * + * 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/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponse.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponse.java new file mode 100644 index 000000000..99ece6e3c --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponse.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +/** + * + * + *
+ * The response message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
+ * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} + */ +public final class ListEnvironmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + ListEnvironmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsResponse.newBuilder() to construct. + private ListEnvironmentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsResponse() { + environments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + environments_.add( + input.readMessage( + com.google.cloud.dialogflow.v2beta1.Environment.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.class, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.Builder.class); + } + + public static final int ENVIRONMENTS_FIELD_NUMBER = 1; + private java.util.List environments_; + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public java.util.List getEnvironmentsList() { + return environments_; + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public java.util.List + getEnvironmentsOrBuilderList() { + return environments_; + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public int getEnvironmentsCount() { + return environments_.size(); + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.Environment getEnvironments(int index) { + return environments_.get(index); + } + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder getEnvironmentsOrBuilder( + int index) { + return environments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + 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. + */ + 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. + */ + 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 < environments_.size(); i++) { + output.writeMessage(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < environments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environments_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.v2beta1.ListEnvironmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse other = + (com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) obj; + + if (!getEnvironmentsList().equals(other.getEnvironmentsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getEnvironmentsCount() > 0) { + hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse 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.v2beta1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse 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.v2beta1.ListEnvironmentsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse 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.v2beta1.ListEnvironmentsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse 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.v2beta1.ListEnvironmentsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse 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.v2beta1.ListEnvironmentsResponse 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments].
+   * 
+ * + * Protobuf type {@code google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.class, + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.Builder.class); + } + + // Construct using com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvironmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + environmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dialogflow.v2beta1.EnvironmentProto + .internal_static_google_cloud_dialogflow_v2beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + getDefaultInstanceForType() { + return com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse build() { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse buildPartial() { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse result = + new com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse(this); + int from_bitField0_ = bitField0_; + if (environmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.environments_ = environments_; + } else { + result.environments_ = environmentsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + 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.v2beta1.ListEnvironmentsResponse) { + return mergeFrom((com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse other) { + if (other + == com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse.getDefaultInstance()) + return this; + if (environmentsBuilder_ == null) { + if (!other.environments_.isEmpty()) { + if (environments_.isEmpty()) { + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnvironmentsIsMutable(); + environments_.addAll(other.environments_); + } + onChanged(); + } + } else { + if (!other.environments_.isEmpty()) { + if (environmentsBuilder_.isEmpty()) { + environmentsBuilder_.dispose(); + environmentsBuilder_ = null; + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + environmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvironmentsFieldBuilder() + : null; + } else { + environmentsBuilder_.addAllMessages(other.environments_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List environments_ = + java.util.Collections.emptyList(); + + private void ensureEnvironmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList(environments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Environment, + com.google.cloud.dialogflow.v2beta1.Environment.Builder, + com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder> + environmentsBuilder_; + + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public java.util.List getEnvironmentsList() { + if (environmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(environments_); + } else { + return environmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public int getEnvironmentsCount() { + if (environmentsBuilder_ == null) { + return environments_.size(); + } else { + return environmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.Environment getEnvironments(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder setEnvironments( + int index, com.google.cloud.dialogflow.v2beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.set(index, value); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder setEnvironments( + int index, com.google.cloud.dialogflow.v2beta1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder addEnvironments(com.google.cloud.dialogflow.v2beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(value); + onChanged(); + } else { + environmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder addEnvironments( + int index, com.google.cloud.dialogflow.v2beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(index, value); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder addEnvironments( + com.google.cloud.dialogflow.v2beta1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder addEnvironments( + int index, com.google.cloud.dialogflow.v2beta1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder addAllEnvironments( + java.lang.Iterable values) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, environments_); + onChanged(); + } else { + environmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder clearEnvironments() { + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + environmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public Builder removeEnvironments(int index) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.remove(index); + onChanged(); + } else { + environmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.Environment.Builder getEnvironmentsBuilder( + int index) { + return getEnvironmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder getEnvironmentsOrBuilder( + int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public java.util.List + getEnvironmentsOrBuilderList() { + if (environmentsBuilder_ != null) { + return environmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environments_); + } + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.Environment.Builder addEnvironmentsBuilder() { + return getEnvironmentsFieldBuilder() + .addBuilder(com.google.cloud.dialogflow.v2beta1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public com.google.cloud.dialogflow.v2beta1.Environment.Builder addEnvironmentsBuilder( + int index) { + return getEnvironmentsFieldBuilder() + .addBuilder(index, com.google.cloud.dialogflow.v2beta1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of agent environments. There will be a maximum number of items
+     * returned based on the page_size field in the request.
+     * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + public java.util.List + getEnvironmentsBuilderList() { + return getEnvironmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Environment, + com.google.cloud.dialogflow.v2beta1.Environment.Builder, + com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder> + getEnvironmentsFieldBuilder() { + if (environmentsBuilder_ == null) { + environmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dialogflow.v2beta1.Environment, + com.google.cloud.dialogflow.v2beta1.Environment.Builder, + com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder>( + environments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + environments_ = null; + } + return environmentsBuilder_; + } + + 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; + 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(); + 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; + 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.v2beta1.ListEnvironmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + private static final com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse(); + } + + public static com.google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsResponse(input, extensionRegistry); + } + }; + + 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.v2beta1.ListEnvironmentsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponseOrBuilder.java new file mode 100644 index 000000000..794ba231e --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListEnvironmentsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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/v2beta1/environment.proto + +package com.google.cloud.dialogflow.v2beta1; + +public interface ListEnvironmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2beta1.ListEnvironmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + java.util.List getEnvironmentsList(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + com.google.cloud.dialogflow.v2beta1.Environment getEnvironments(int index); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + int getEnvironmentsCount(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + java.util.List + getEnvironmentsOrBuilderList(); + /** + * + * + *
+   * The list of agent environments. There will be a maximum number of items
+   * returned based on the page_size field in the request.
+   * 
+ * + * repeated .google.cloud.dialogflow.v2beta1.Environment environments = 1; + */ + com.google.cloud.dialogflow.v2beta1.EnvironmentOrBuilder getEnvironmentsOrBuilder(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/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequest.java index ceebdf8cf..f00377676 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequest.java @@ -195,15 +195,14 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Optional. The language to list training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -222,15 +221,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language to list training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -844,15 +842,14 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The language to list training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -871,15 +868,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language to list training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -898,15 +894,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language to list training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -924,15 +919,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language to list training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -946,15 +940,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language to list training phrases, parameters and rich
-     * messages for. If not specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequestOrBuilder.java index 0444e9e5f..b58df3e86 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ListIntentsRequestOrBuilder.java @@ -54,15 +54,14 @@ public interface ListIntentsRequestOrBuilder * * *
-   * Optional. The language to list training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -71,15 +70,14 @@ public interface ListIntentsRequestOrBuilder * * *
-   * Optional. The language to list training phrases, parameters and rich
-   * messages for. If not specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequest.java index 7ff42e004..c9a1cb114 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequest.java @@ -241,7 +241,8 @@ public com.google.protobuf.ByteString getVersionBytes() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -266,7 +267,8 @@ public boolean hasPayload() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -291,7 +293,8 @@ public com.google.protobuf.Struct getPayload() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -911,7 +914,8 @@ public Builder setVersionBytes(com.google.protobuf.ByteString value) { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -936,7 +940,8 @@ public boolean hasPayload() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -965,7 +970,8 @@ public com.google.protobuf.Struct getPayload() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -998,7 +1004,8 @@ public Builder setPayload(com.google.protobuf.Struct value) { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -1028,7 +1035,8 @@ public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -1063,7 +1071,8 @@ public Builder mergePayload(com.google.protobuf.Struct value) { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -1094,7 +1103,8 @@ public Builder clearPayload() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -1119,7 +1129,8 @@ public com.google.protobuf.Struct.Builder getPayloadBuilder() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -1146,7 +1157,8 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequestOrBuilder.java index b66aeada2..2cb66f82c 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/OriginalDetectIntentRequestOrBuilder.java @@ -84,7 +84,8 @@ public interface OriginalDetectIntentRequestOrBuilder * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -107,7 +108,8 @@ public interface OriginalDetectIntentRequestOrBuilder * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" @@ -130,7 +132,8 @@ public interface OriginalDetectIntentRequestOrBuilder * Optional. This field is set to the value of the `QueryParameters.payload` * field passed in the request. Some integrations that query a Dialogflow * agent may provide additional information in the payload. - * In particular for the Telephony Gateway this field has the form: + * In particular, for the Dialogflow Phone Gateway integration, this field has + * the form: * <pre>{ * "telephony": { * "caller_id": "+18558363987" diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java index 5e46c4e11..d6deb7b9b 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParameters.java @@ -524,8 +524,11 @@ public com.google.cloud.dialogflow.v2beta1.SessionEntityType getSessionEntityTyp * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; @@ -539,8 +542,11 @@ public boolean hasPayload() { * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; @@ -554,8 +560,11 @@ public com.google.protobuf.Struct getPayload() { * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; @@ -2708,8 +2717,11 @@ public Builder removeSessionEntityTypes(int index) { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2723,8 +2735,11 @@ public boolean hasPayload() { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2742,8 +2757,11 @@ public com.google.protobuf.Struct getPayload() { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2765,8 +2783,11 @@ public Builder setPayload(com.google.protobuf.Struct value) { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2785,8 +2806,11 @@ public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2810,8 +2834,11 @@ public Builder mergePayload(com.google.protobuf.Struct value) { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2831,8 +2858,11 @@ public Builder clearPayload() { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2846,8 +2876,11 @@ public com.google.protobuf.Struct.Builder getPayloadBuilder() { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; @@ -2863,8 +2896,11 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { * * *
-     * This field can be used to pass custom data into the webhook
-     * associated with the agent. Arbitrary JSON objects are supported.
+     * This field can be used to pass custom data to your webhook.
+     * Arbitrary JSON objects are supported.
+     * If supplied, the value is used to populate the
+     * `WebhookRequest.original_detect_intent_request.payload`
+     * field sent to your webhook.
      * 
* * .google.protobuf.Struct payload = 6; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java index 218ef554b..813b01c28 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryParametersOrBuilder.java @@ -232,8 +232,11 @@ com.google.cloud.dialogflow.v2beta1.SessionEntityTypeOrBuilder getSessionEntityT * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; @@ -245,8 +248,11 @@ com.google.cloud.dialogflow.v2beta1.SessionEntityTypeOrBuilder getSessionEntityT * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; @@ -258,8 +264,11 @@ com.google.cloud.dialogflow.v2beta1.SessionEntityTypeOrBuilder getSessionEntityT * * *
-   * This field can be used to pass custom data into the webhook
-   * associated with the agent. Arbitrary JSON objects are supported.
+   * This field can be used to pass custom data to your webhook.
+   * Arbitrary JSON objects are supported.
+   * If supplied, the value is used to populate the
+   * `WebhookRequest.original_detect_intent_request.payload`
+   * field sent to your webhook.
    * 
* * .google.protobuf.Struct payload = 6; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResult.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResult.java index 1d961acef..6be756aab 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResult.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResult.java @@ -479,6 +479,18 @@ public com.google.protobuf.ByteString getActionBytes() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -493,6 +505,18 @@ public boolean hasParameters() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -507,6 +531,18 @@ public com.google.protobuf.Struct getParameters() { * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -2228,6 +2264,18 @@ public Builder setActionBytes(com.google.protobuf.ByteString value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2242,6 +2290,18 @@ public boolean hasParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2260,6 +2320,18 @@ public com.google.protobuf.Struct getParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2282,6 +2354,18 @@ public Builder setParameters(com.google.protobuf.Struct value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2301,6 +2385,18 @@ public Builder setParameters(com.google.protobuf.Struct.Builder builderForValue) * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2325,6 +2421,18 @@ public Builder mergeParameters(com.google.protobuf.Struct value) { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2345,6 +2453,18 @@ public Builder clearParameters() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2359,6 +2479,18 @@ public com.google.protobuf.Struct.Builder getParametersBuilder() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; @@ -2375,6 +2507,18 @@ public com.google.protobuf.StructOrBuilder getParametersOrBuilder() { * *
      * The collection of extracted parameters.
+     * Depending on your protocol or client library language, this is a
+     * map, associative array, symbol table, dictionary, or JSON object
+     * composed of a collection of (MapKey, MapValue) pairs:
+     * -   MapKey type: string
+     * -   MapKey value: parameter name
+     * -   MapValue type:
+     *     -   If parameter's entity type is a composite entity: map
+     *     -   Else: string or number, depending on parameter value type
+     * -   MapValue value:
+     *     -   If parameter's entity type is a composite entity:
+     *         map from composite entity property names to property values
+     *     -   Else: parameter value
      * 
* * .google.protobuf.Struct parameters = 4; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResultOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResultOrBuilder.java index e917b4ff4..42f5e8d4a 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResultOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/QueryResultOrBuilder.java @@ -143,6 +143,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -155,6 +167,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; @@ -167,6 +191,18 @@ public interface QueryResultOrBuilder * *
    * The collection of extracted parameters.
+   * Depending on your protocol or client library language, this is a
+   * map, associative array, symbol table, dictionary, or JSON object
+   * composed of a collection of (MapKey, MapValue) pairs:
+   * -   MapKey type: string
+   * -   MapKey value: parameter name
+   * -   MapValue type:
+   *     -   If parameter's entity type is a composite entity: map
+   *     -   Else: string or number, depending on parameter value type
+   * -   MapValue value:
+   *     -   If parameter's entity type is a composite entity:
+   *         map from composite entity property names to property values
+   *     -   Else: parameter value
    * 
* * .google.protobuf.Struct parameters = 4; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequest.java index 2f416ac50..a07d165e6 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequest.java @@ -227,7 +227,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -241,7 +242,8 @@ public boolean hasGcsSource() { * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -258,7 +260,8 @@ public com.google.cloud.dialogflow.v2beta1.GcsSource getGcsSource() { * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -773,7 +776,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -787,7 +791,8 @@ public boolean hasGcsSource() { * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -811,7 +816,8 @@ public com.google.cloud.dialogflow.v2beta1.GcsSource getGcsSource() { * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -833,7 +839,8 @@ public Builder setGcsSource(com.google.cloud.dialogflow.v2beta1.GcsSource value) * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -853,7 +860,8 @@ public Builder setGcsSource( * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -884,7 +892,8 @@ public Builder mergeGcsSource(com.google.cloud.dialogflow.v2beta1.GcsSource valu * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -909,7 +918,8 @@ public Builder clearGcsSource() { * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -921,7 +931,8 @@ public com.google.cloud.dialogflow.v2beta1.GcsSource.Builder getGcsSourceBuilder * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -940,7 +951,8 @@ public com.google.cloud.dialogflow.v2beta1.GcsSourceOrBuilder getGcsSourceOrBuil * * *
-     * The path of gcs source file for reloading document content.
+     * Optional. The path for a Cloud Storage source file for reloading document content.
+     * If not provided, the Document's existing source will be reloaded.
      * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequestOrBuilder.java index c8c2784d3..3078254ae 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/ReloadDocumentRequestOrBuilder.java @@ -56,7 +56,8 @@ public interface ReloadDocumentRequestOrBuilder * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -68,7 +69,8 @@ public interface ReloadDocumentRequestOrBuilder * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; @@ -80,7 +82,8 @@ public interface ReloadDocumentRequestOrBuilder * * *
-   * The path of gcs source file for reloading document content.
+   * Optional. The path for a Cloud Storage source file for reloading document content.
+   * If not provided, the Document's existing source will be reloaded.
    * 
* * .google.cloud.dialogflow.v2beta1.GcsSource gcs_source = 3; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequest.java index 740428e28..252238a5a 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequest.java @@ -193,15 +193,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityTypeOrBuilder getEntityTypeOrBu * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -220,15 +219,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -853,15 +851,14 @@ public com.google.cloud.dialogflow.v2beta1.EntityTypeOrBuilder getEntityTypeOrBu * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -880,15 +877,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -907,15 +903,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -933,15 +928,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -955,15 +949,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of entity synonyms defined in `entity_type`. If not
-     * specified, the agent's default language is used.
-     * [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequestOrBuilder.java index 01993d0ef..392f535c3 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateEntityTypeRequestOrBuilder.java @@ -62,15 +62,14 @@ public interface UpdateEntityTypeRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -79,15 +78,14 @@ public interface UpdateEntityTypeRequestOrBuilder * * *
-   * Optional. The language of entity synonyms defined in `entity_type`. If not
-   * specified, the agent's default language is used.
-   * [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequest.java index 7ab72d9da..2e93ca0ed 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequest.java @@ -201,15 +201,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentOrBuilder getIntentOrBuilder() * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -228,15 +227,14 @@ public java.lang.String getLanguageCode() { * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -911,15 +909,14 @@ public com.google.cloud.dialogflow.v2beta1.IntentOrBuilder getIntentOrBuilder() * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -938,15 +935,14 @@ public java.lang.String getLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ @@ -965,15 +961,14 @@ public com.google.protobuf.ByteString getLanguageCodeBytes() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The languageCode to set. * @return This builder for chaining. @@ -991,15 +986,14 @@ public Builder setLanguageCode(java.lang.String value) { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1013,15 +1007,14 @@ public Builder clearLanguageCode() { * * *
-     * Optional. The language of training phrases, parameters and rich messages
-     * defined in `intent`. If not specified, the agent's default language is
-     * used. [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.
+     * Optional. The language used to access language-specific data.
+     * If not specified, the agent's default language is used.
+     * For more information, see
+     * [Multilingual intent and entity
+     * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
      * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for languageCode to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequestOrBuilder.java index ea5200973..ee1bdfd56 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateIntentRequestOrBuilder.java @@ -62,15 +62,14 @@ public interface UpdateIntentRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The languageCode. */ @@ -79,15 +78,14 @@ public interface UpdateIntentRequestOrBuilder * * *
-   * Optional. The language of training phrases, parameters and rich messages
-   * defined in `intent`. If not specified, the agent's default language is
-   * used. [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.
+   * Optional. The language used to access language-specific data.
+   * If not specified, the agent's default language is used.
+   * For more information, see
+   * [Multilingual intent and entity
+   * data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity).
    * 
* - * string language_code = 2; + * string language_code = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for languageCode. */ diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequest.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequest.java index 9a883166d..023fefe7e 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequest.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequest.java @@ -141,12 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -160,12 +155,7 @@ public boolean hasSessionEntityType() { * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -181,12 +171,7 @@ public com.google.cloud.dialogflow.v2beta1.SessionEntityType getSessionEntityTyp * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -616,12 +601,7 @@ public Builder mergeFrom( * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -635,12 +615,7 @@ public boolean hasSessionEntityType() { * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -660,12 +635,7 @@ public com.google.cloud.dialogflow.v2beta1.SessionEntityType getSessionEntityTyp * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -688,12 +658,7 @@ public Builder setSessionEntityType( * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -713,12 +678,7 @@ public Builder setSessionEntityType( * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -745,12 +705,7 @@ public Builder mergeSessionEntityType( * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -770,12 +725,7 @@ public Builder clearSessionEntityType() { * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -790,12 +740,7 @@ public Builder clearSessionEntityType() { * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -814,12 +759,7 @@ public Builder clearSessionEntityType() { * * *
-     * Required. The entity type to update. Format:
-     * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-     * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-     * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-     * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-     * environment. If `User ID` is not specified, we assume default '-' user.
+     * Required. The session entity type to update.
      * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequestOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequestOrBuilder.java index 9d9c7a1b9..254a117ac 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequestOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/UpdateSessionEntityTypeRequestOrBuilder.java @@ -27,12 +27,7 @@ public interface UpdateSessionEntityTypeRequestOrBuilder * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -44,12 +39,7 @@ public interface UpdateSessionEntityTypeRequestOrBuilder * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; @@ -61,12 +51,7 @@ public interface UpdateSessionEntityTypeRequestOrBuilder * * *
-   * Required. The entity type to update. Format:
-   * `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
-   * Display Name>` or `projects/<Project ID>/agent/environments/<Environment
-   * ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
-   * Name>`. If `Environment ID` is not specified, we assume default 'draft'
-   * environment. If `User ID` is not specified, we assume default '-' user.
+   * Required. The session entity type to update.
    * 
* * .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_type = 1; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponse.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponse.java index fd8fbe6a7..24f226b22 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponse.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponse.java @@ -222,8 +222,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -245,8 +247,10 @@ public java.lang.String getFulfillmentText() { * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -271,8 +275,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -285,8 +290,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -299,8 +305,9 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -312,8 +319,9 @@ public int getFulfillmentMessagesCount() { * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -325,8 +333,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message getFulfillmentMessages * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -342,7 +351,10 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message getFulfillmentMessages * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -364,7 +376,10 @@ public java.lang.String getSource() { * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -389,28 +404,16 @@ public com.google.protobuf.ByteString getSourceBytes() { * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -424,28 +427,16 @@ public boolean hasPayload() { * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -459,28 +450,16 @@ public com.google.protobuf.Struct getPayload() { * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -495,8 +474,10 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -508,8 +489,10 @@ public java.util.List getOutputCont * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -522,8 +505,10 @@ public java.util.List getOutputCont * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -535,8 +520,10 @@ public int getOutputContextsCount() { * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -548,8 +535,10 @@ public com.google.cloud.dialogflow.v2beta1.Context getOutputContexts(int index) * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -565,8 +554,7 @@ public com.google.cloud.dialogflow.v2beta1.ContextOrBuilder getOutputContextsOrB * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -582,8 +570,7 @@ public boolean hasFollowupEventInput() { * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -601,8 +588,7 @@ public com.google.cloud.dialogflow.v2beta1.EventInput getFollowupEventInput() { * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -640,9 +626,9 @@ public boolean getEndInteraction() { *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -658,9 +644,9 @@ public boolean getEndInteraction() { *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -676,9 +662,9 @@ public boolean getEndInteraction() { *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -693,9 +679,9 @@ public int getSessionEntityTypesCount() { *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -710,9 +696,9 @@ public com.google.cloud.dialogflow.v2beta1.SessionEntityType getSessionEntityTyp *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -1311,8 +1297,10 @@ public Builder mergeFrom( * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1334,8 +1322,10 @@ public java.lang.String getFulfillmentText() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1357,8 +1347,10 @@ public com.google.protobuf.ByteString getFulfillmentTextBytes() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1379,8 +1371,10 @@ public Builder setFulfillmentText(java.lang.String value) { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1397,8 +1391,10 @@ public Builder clearFulfillmentText() { * * *
-     * Optional. The text to be shown on the screen. This value is passed directly
-     * to `QueryResult.fulfillment_text`.
+     * Optional. The text response message intended for the end-user.
+     * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
      * 
* * string fulfillment_text = 1; @@ -1439,8 +1435,9 @@ private void ensureFulfillmentMessagesIsMutable() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1458,8 +1455,9 @@ private void ensureFulfillmentMessagesIsMutable() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1476,8 +1474,9 @@ public int getFulfillmentMessagesCount() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1494,8 +1493,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message getFulfillmentMessages * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1519,8 +1519,9 @@ public Builder setFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1541,8 +1542,9 @@ public Builder setFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1566,8 +1568,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1591,8 +1594,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1613,8 +1617,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1635,8 +1640,9 @@ public Builder addFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1657,8 +1663,9 @@ public Builder addAllFulfillmentMessages( * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1678,8 +1685,9 @@ public Builder clearFulfillmentMessages() { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1699,8 +1707,9 @@ public Builder removeFulfillmentMessages(int index) { * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1714,8 +1723,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder getFulfillment * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1733,8 +1743,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder getFulfillment * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1752,8 +1763,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder getFulfillment * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1768,8 +1780,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder getFulfillment * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1785,8 +1798,9 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder addFulfillment * * *
-     * Optional. The collection of rich messages to present to the user. This
-     * value is passed directly to `QueryResult.fulfillment_messages`.
+     * Optional. The rich response messages intended for the end-user.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -1822,7 +1836,10 @@ public com.google.cloud.dialogflow.v2beta1.Intent.Message.Builder addFulfillment * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1844,7 +1861,10 @@ public java.lang.String getSource() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1866,7 +1886,10 @@ public com.google.protobuf.ByteString getSourceBytes() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1887,7 +1910,10 @@ public Builder setSource(java.lang.String value) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1904,7 +1930,10 @@ public Builder clearSource() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_source`.
+     * Optional. A custom field used to identify the webhook source.
+     * Arbitrary strings are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
      * 
* * string source = 3; @@ -1933,28 +1962,16 @@ public Builder setSourceBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -1968,28 +1985,16 @@ public boolean hasPayload() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2007,28 +2012,16 @@ public com.google.protobuf.Struct getPayload() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2050,28 +2043,16 @@ public Builder setPayload(com.google.protobuf.Struct value) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2090,28 +2071,16 @@ public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2135,28 +2104,16 @@ public Builder mergePayload(com.google.protobuf.Struct value) { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2176,28 +2133,16 @@ public Builder clearPayload() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2211,28 +2156,16 @@ public com.google.protobuf.Struct.Builder getPayloadBuilder() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2248,28 +2181,16 @@ public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() { * * *
-     * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-     * See the related `fulfillment_messages[i].payload field`, which may be used
-     * as an alternative to this field.
-     * This field can be used for Actions on Google responses.
-     * It should have a structure similar to the JSON message shown here. For more
-     * information, see
-     * [Actions on Google Webhook
-     * Format](https://developers.google.com/actions/dialogflow/webhook)
-     * <pre>{
-     *   "google": {
-     *     "expectUserResponse": true,
-     *     "richResponse": {
-     *       "items": [
-     *         {
-     *           "simpleResponse": {
-     *             "textToSpeech": "this is a simple response"
-     *           }
-     *         }
-     *       ]
-     *     }
-     *   }
-     * }</pre>
+     * Optional. This field can be used to pass custom data from your webhook to the
+     * integration or API caller. Arbitrary JSON objects are supported.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+     * This field is also used by the
+     * [Google Assistant
+     * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+     * for rich response messages.
+     * See the format definition at [Google Assistant Dialogflow webhook
+     * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
      * 
* * .google.protobuf.Struct payload = 4; @@ -2312,8 +2233,10 @@ private void ensureOutputContextsIsMutable() { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2329,8 +2252,10 @@ public java.util.List getOutputCont * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2346,8 +2271,10 @@ public int getOutputContextsCount() { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2363,8 +2290,10 @@ public com.google.cloud.dialogflow.v2beta1.Context getOutputContexts(int index) * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2386,8 +2315,10 @@ public Builder setOutputContexts(int index, com.google.cloud.dialogflow.v2beta1. * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2407,8 +2338,10 @@ public Builder setOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2430,8 +2363,10 @@ public Builder addOutputContexts(com.google.cloud.dialogflow.v2beta1.Context val * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2453,8 +2388,10 @@ public Builder addOutputContexts(int index, com.google.cloud.dialogflow.v2beta1. * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2474,8 +2411,10 @@ public Builder addOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2495,8 +2434,10 @@ public Builder addOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2516,8 +2457,10 @@ public Builder addAllOutputContexts( * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2536,8 +2479,10 @@ public Builder clearOutputContexts() { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2556,8 +2501,10 @@ public Builder removeOutputContexts(int index) { * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2569,8 +2516,10 @@ public com.google.cloud.dialogflow.v2beta1.Context.Builder getOutputContextsBuil * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2587,8 +2536,10 @@ public com.google.cloud.dialogflow.v2beta1.ContextOrBuilder getOutputContextsOrB * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2605,8 +2556,10 @@ public com.google.cloud.dialogflow.v2beta1.ContextOrBuilder getOutputContextsOrB * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2619,8 +2572,10 @@ public com.google.cloud.dialogflow.v2beta1.Context.Builder addOutputContextsBuil * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2633,8 +2588,10 @@ public com.google.cloud.dialogflow.v2beta1.Context.Builder addOutputContextsBuil * * *
-     * Optional. The collection of output contexts. This value is passed directly
-     * to `QueryResult.output_contexts`.
+     * Optional. The collection of output contexts that will overwrite currently
+     * active contexts for the session and reset their lifespans.
+     * When provided, Dialogflow uses this field to populate
+     * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -2674,8 +2631,7 @@ public com.google.cloud.dialogflow.v2beta1.Context.Builder addOutputContextsBuil * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2691,8 +2647,7 @@ public boolean hasFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2714,8 +2669,7 @@ public com.google.cloud.dialogflow.v2beta1.EventInput getFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2739,8 +2693,7 @@ public Builder setFollowupEventInput(com.google.cloud.dialogflow.v2beta1.EventIn * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2762,8 +2715,7 @@ public Builder setFollowupEventInput( * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2791,8 +2743,7 @@ public Builder mergeFollowupEventInput(com.google.cloud.dialogflow.v2beta1.Event * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2814,8 +2765,7 @@ public Builder clearFollowupEventInput() { * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2831,8 +2781,7 @@ public com.google.cloud.dialogflow.v2beta1.EventInput.Builder getFollowupEventIn * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2853,8 +2802,7 @@ public com.google.cloud.dialogflow.v2beta1.EventInput.Builder getFollowupEventIn * * *
-     * Optional. Makes the platform immediately invoke another `DetectIntent` call
-     * internally with the specified event as input.
+     * Optional. Invokes the supplied events.
      * When this field is set, Dialogflow ignores the `fulfillment_text`,
      * `fulfillment_messages`, and `payload` fields.
      * 
@@ -2959,9 +2907,9 @@ private void ensureSessionEntityTypesIsMutable() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -2981,9 +2929,9 @@ private void ensureSessionEntityTypesIsMutable() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3002,9 +2950,9 @@ public int getSessionEntityTypesCount() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3023,9 +2971,9 @@ public com.google.cloud.dialogflow.v2beta1.SessionEntityType getSessionEntityTyp *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3051,9 +2999,9 @@ public Builder setSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3076,9 +3024,9 @@ public Builder setSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3104,9 +3052,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3132,9 +3080,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3157,9 +3105,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3182,9 +3130,9 @@ public Builder addSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3208,9 +3156,9 @@ public Builder addAllSessionEntityTypes( *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3232,9 +3180,9 @@ public Builder clearSessionEntityTypes() { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3256,9 +3204,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3274,9 +3222,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3296,9 +3244,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3318,9 +3266,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3337,9 +3285,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -3357,9 +3305,9 @@ public Builder removeSessionEntityTypes(int index) { *
      * Optional. Additional session entity types to replace or extend developer
      * entity types with. The entity synonyms apply to all languages and persist
-     * for the session of this query. Setting the session entity types inside
-     * webhook overwrites the session entity types that have been set through
-     * `DetectIntentRequest.query_params.session_entity_types`.
+     * for the session. Setting this data from a webhook overwrites
+     * the session entity types that have been set using `detectIntent`,
+     * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
      * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponseOrBuilder.java b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponseOrBuilder.java index 9af9caf6b..4fbccd00f 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponseOrBuilder.java +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/java/com/google/cloud/dialogflow/v2beta1/WebhookResponseOrBuilder.java @@ -27,8 +27,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -40,8 +42,10 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The text to be shown on the screen. This value is passed directly
-   * to `QueryResult.fulfillment_text`.
+   * Optional. The text response message intended for the end-user.
+   * It is recommended to use `fulfillment_messages.text.text[0]` instead.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller.
    * 
* * string fulfillment_text = 1; @@ -54,8 +58,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -65,8 +70,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -76,8 +82,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -87,8 +94,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -99,8 +107,9 @@ public interface WebhookResponseOrBuilder * * *
-   * Optional. The collection of rich messages to present to the user. This
-   * value is passed directly to `QueryResult.fulfillment_messages`.
+   * Optional. The rich response messages intended for the end-user.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Intent.Message fulfillment_messages = 2; @@ -112,7 +121,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -124,7 +136,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_source`.
+   * Optional. A custom field used to identify the webhook source.
+   * Arbitrary strings are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller.
    * 
* * string source = 3; @@ -137,28 +152,16 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -170,28 +173,16 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -203,28 +194,16 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. This value is passed directly to `QueryResult.webhook_payload`.
-   * See the related `fulfillment_messages[i].payload field`, which may be used
-   * as an alternative to this field.
-   * This field can be used for Actions on Google responses.
-   * It should have a structure similar to the JSON message shown here. For more
-   * information, see
-   * [Actions on Google Webhook
-   * Format](https://developers.google.com/actions/dialogflow/webhook)
-   * <pre>{
-   *   "google": {
-   *     "expectUserResponse": true,
-   *     "richResponse": {
-   *       "items": [
-   *         {
-   *           "simpleResponse": {
-   *             "textToSpeech": "this is a simple response"
-   *           }
-   *         }
-   *       ]
-   *     }
-   *   }
-   * }</pre>
+   * Optional. This field can be used to pass custom data from your webhook to the
+   * integration or API caller. Arbitrary JSON objects are supported.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller.
+   * This field is also used by the
+   * [Google Assistant
+   * integration](https://cloud.google.com/dialogflow/docs/integrations/aog)
+   * for rich response messages.
+   * See the format definition at [Google Assistant Dialogflow webhook
+   * format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
    * 
* * .google.protobuf.Struct payload = 4; @@ -235,8 +214,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -246,8 +227,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -257,8 +240,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -268,8 +253,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -280,8 +267,10 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. The collection of output contexts. This value is passed directly
-   * to `QueryResult.output_contexts`.
+   * Optional. The collection of output contexts that will overwrite currently
+   * active contexts for the session and reset their lifespans.
+   * When provided, Dialogflow uses this field to populate
+   * [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.Context output_contexts = 5; @@ -292,8 +281,7 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -307,8 +295,7 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -322,8 +309,7 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag * * *
-   * Optional. Makes the platform immediately invoke another `DetectIntent` call
-   * internally with the specified event as input.
+   * Optional. Invokes the supplied events.
    * When this field is set, Dialogflow ignores the `fulfillment_text`,
    * `fulfillment_messages`, and `payload` fields.
    * 
@@ -353,9 +339,9 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -368,9 +354,9 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -383,9 +369,9 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -398,9 +384,9 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; @@ -414,9 +400,9 @@ com.google.cloud.dialogflow.v2beta1.Intent.MessageOrBuilder getFulfillmentMessag *
    * Optional. Additional session entity types to replace or extend developer
    * entity types with. The entity synonyms apply to all languages and persist
-   * for the session of this query. Setting the session entity types inside
-   * webhook overwrites the session entity types that have been set through
-   * `DetectIntentRequest.query_params.session_entity_types`.
+   * for the session. Setting this data from a webhook overwrites
+   * the session entity types that have been set using `detectIntent`,
+   * `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods.
    * 
* * repeated .google.cloud.dialogflow.v2beta1.SessionEntityType session_entity_types = 10; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/agent.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/agent.proto index 57628f2b8..7bfedab4f 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/agent.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/agent.proto @@ -19,6 +19,7 @@ package google.cloud.dialogflow.v2beta1; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/environment.proto"; import "google/cloud/dialogflow/v2beta1/validation_result.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto index af3112ba5..15ac78d21 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/audio_config.proto @@ -194,13 +194,13 @@ message InputAudioConfig { // the same session do not necessarily need to specify the same language. string language_code = 3; - // Optional. If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in + // If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in // [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech // words, e.g. start and end time offsets. If false or unspecified, Speech // doesn't return any word-level information. bool enable_word_info = 13; - // Optional. A list of strings containing words and phrases that the speech + // A list of strings containing words and phrases that the speech // recognizer should recognize with higher likelihood. // // See [the Cloud Speech @@ -210,19 +210,16 @@ message InputAudioConfig { // This field is deprecated. Please use [speech_contexts]() instead. If you // specify both [phrase_hints]() and [speech_contexts](), Dialogflow will // treat the [phrase_hints]() as a single additional [SpeechContext](). - repeated string phrase_hints = 4 [ - deprecated = true, - (google.api.field_behavior) = OPTIONAL - ]; + repeated string phrase_hints = 4 [deprecated = true]; - // Optional. Context information to assist speech recognition. + // Context information to assist speech recognition. // // See [the Cloud Speech // documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints) // for more details. repeated SpeechContext speech_contexts = 11; - // Optional. Which Speech model to select for the given request. Select the + // 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 we auto-select a model based on the parameters // in the InputAudioConfig. @@ -235,10 +232,10 @@ message InputAudioConfig { // for more details. string model = 7; - // Optional. Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. + // Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use. SpeechModelVariant model_variant = 10; - // Optional. If `false` (default), recognition does not cease until the + // If `false` (default), recognition does not cease until the // client closes the stream. // If `true`, the recognizer will detect a single spoken utterance in input // audio. Recognition ceases when it detects the audio's voice has diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/context.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/context.proto index 78b8e1340..fb1c3cee3 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/context.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/context.proto @@ -183,15 +183,26 @@ message Context { string name = 1; // Optional. The number of conversational query requests after which the - // context expires. If set to `0` (the default) the context expires + // context expires. The default is `0`. If set to `0`, the context expires // immediately. Contexts expire automatically after 20 minutes if there // are no matching queries. int32 lifespan_count = 2; // Optional. The collection of parameters associated with this context. - // Refer to [this - // doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters) - // for syntax. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 3; } diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/document.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/document.proto index 1e6659111..02b6e4e81 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/document.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/document.proto @@ -71,9 +71,6 @@ service Documents { // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc CreateDocument(CreateDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{parent=projects/*/knowledgeBases/*}/documents" @@ -83,15 +80,16 @@ service Documents { body: "document" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } // Deletes the specified document. // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc DeleteDocument(DeleteDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}" @@ -99,15 +97,16 @@ service Documents { delete: "/v2beta1/{name=projects/*/agent/knowledgeBases/*/documents/*}" } }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "KnowledgeOperationMetadata" + }; } // Updates the specified document. // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc UpdateDocument(UpdateDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2beta1/{document.name=projects/*/knowledgeBases/*/documents/*}" @@ -117,6 +116,10 @@ service Documents { body: "document" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } // Reloads the specified document from its specified source, content_uri or @@ -126,9 +129,6 @@ service Documents { // // Note: The `projects.agent.knowledgeBases.documents` resource is deprecated; // only use `projects.knowledgeBases.documents`. - // - // Operation rpc ReloadDocument(ReloadDocumentRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2beta1/{name=projects/*/knowledgeBases/*/documents/*}:reload" @@ -138,6 +138,10 @@ service Documents { body: "*" } }; + option (google.longrunning.operation_info) = { + response_type: "Document" + metadata_type: "KnowledgeOperationMetadata" + }; } } @@ -299,7 +303,8 @@ message ReloadDocumentRequest { // Optional. If provided, the service will load the contents from the source // and update document in the knowledge base. oneof source { - // The path of gcs source file for reloading document content. + // Optional. The path for a Cloud Storage source file for reloading document content. + // If not provided, the Document's existing source will be reloaded. GcsSource gcs_source = 3; } } diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/entity_type.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/entity_type.proto index a7e7fb280..0f0932d2d 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/entity_type.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/entity_type.proto @@ -283,13 +283,12 @@ message ListEntityTypesRequest { // Format: `projects//agent`. string parent = 1; - // Optional. The language to list entity synonyms for. If not specified, - // the agent's default language is used. - // [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The maximum number of items to return in a single page. By // default 100 and at most 1000. @@ -316,13 +315,12 @@ message GetEntityTypeRequest { // Format: `projects//agent/entityTypes/`. string name = 1; - // Optional. The language to retrieve entity synonyms for. If not specified, - // the agent's default language is used. - // [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.CreateEntityType]. @@ -334,13 +332,12 @@ message CreateEntityTypeRequest { // Required. The entity type to create. EntityType entity_type = 2; - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [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 = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.UpdateEntityType]. @@ -348,13 +345,12 @@ message UpdateEntityTypeRequest { // Required. The entity type to update. EntityType entity_type = 1; - // Optional. The language of entity synonyms defined in `entity_type`. If not - // specified, the agent's default language is used. - // [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 3; @@ -390,13 +386,12 @@ message BatchUpdateEntityTypesRequest { EntityTypeBatch entity_type_batch_inline = 3; } - // Optional. The language of entity synonyms defined in `entity_types`. If not - // specified, the agent's default language is used. - // [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 = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 5; @@ -428,13 +423,12 @@ message BatchCreateEntitiesRequest { // Required. The entities to create. repeated EntityType.Entity entities = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [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 = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntities]. @@ -446,13 +440,12 @@ message BatchUpdateEntitiesRequest { // Required. The entities to update or create. repeated EntityType.Entity entities = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [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 = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 4; @@ -469,13 +462,12 @@ message BatchDeleteEntitiesRequest { // `projects/`. repeated string entity_values = 2; - // Optional. The language of entity synonyms defined in `entities`. If not - // specified, the agent's default language is used. - // [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 = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; } // This message is a wrapper around a collection of entity types. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/environment.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/environment.proto new file mode 100644 index 000000000..386c014d6 --- /dev/null +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/environment.proto @@ -0,0 +1,135 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dialogflow/v2beta1/audio_config.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/client.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow"; +option java_multiple_files = true; +option java_outer_classname = "EnvironmentProto"; +option java_package = "com.google.cloud.dialogflow.v2beta1"; +option objc_class_prefix = "DF"; + +// Manages agent environments. +service Environments { + 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"; + + // Returns the list of all non-draft environments of the specified agent. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/agent}/environments" + additional_bindings { + get: "/v2beta1/{parent=projects/*/locations/*/agent}/environments" + } + }; + } +} + +// Represents an agent environment. +message Environment { + option (google.api.resource) = { + type: "dialogflow.googleapis.com/Environment" + pattern: "projects/{project}/agent/environments/{environment}" + }; + + // Represents an environment state. When a environment is pointed to a new + // agent version, the environment is temporarily set to the `LOADING` state. + // During that time, the environment keeps on serving the previous version of + // the agent. After the new agent version is done loading, the environment is + // set back to the `RUNNING` state. + enum State { + // Not specified. This value is not used. + STATE_UNSPECIFIED = 0; + + // Stopped. + STOPPED = 1; + + // Loading. + LOADING = 2; + + // Running. + RUNNING = 3; + } + + // Output only. The unique identifier of this agent environment. + // Format: `projects//agent/environments/`. + // For Environment ID, "-" is reserved for 'draft' environment. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The developer-provided description for this environment. + // The maximum length is 500 characters. If exceeded, the request is rejected. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The agent version loaded into this environment. + // Format: `projects//agent/versions/`. + string agent_version = 3 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Version" + } + ]; + + // Output only. The state of this environment. This field is read-only, i.e., it cannot be + // set by create and update methods. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update time of this environment. This field is read-only, i.e., it + // cannot be set by create and update methods. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsRequest { + // Required. The agent to list all environments from. + // Format: `projects//agent`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dialogflow.googleapis.com/Environment" + } + ]; + + // 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 [Environments.ListEnvironments][google.cloud.dialogflow.v2beta1.Environments.ListEnvironments]. +message ListEnvironmentsResponse { + // The list of agent environments. There will be a maximum number of items + // returned based on the page_size field in the request. + repeated Environment environments = 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; +} diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/intent.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/intent.proto index fa0a0bc04..1b1687262 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/intent.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/intent.proto @@ -609,21 +609,21 @@ message Intent { // Rich Business Messaging (RBM) Media displayed in Cards // The following media-types are currently supported: // - // ## Image Types + // Image Types // - // image/jpeg - // image/jpg' - // image/gif - // image/png + // * image/jpeg + // * image/jpg' + // * image/gif + // * image/png // - // ## Video Types + // Video Types // - // video/h263 - // video/m4v - // video/mp4 - // video/mpeg - // video/mpeg4 - // video/webm + // * video/h263 + // * video/m4v + // * video/mp4 + // * video/mpeg + // * video/mpeg4 + // * video/webm message RbmMedia { // Media height enum Height { @@ -963,67 +963,9 @@ message Intent { // Viber. VIBER = 7; - // Actions on Google. - // When using Actions on Google, you can choose one of the specific - // Intent.Message types that mention support for Actions on Google, - // or you can use the advanced Intent.Message.payload field. - // The payload field provides access to AoG features not available in the - // specific message types. - // If using the Intent.Message.payload field, it should have a structure - // similar to the JSON message shown here. For more information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-      //   "expectUserResponse": true,
-      //   "isSsml": false,
-      //   "noInputPrompts": [],
-      //   "richResponse": {
-      //     "items": [
-      //       {
-      //         "simpleResponse": {
-      //           "displayText": "hi",
-      //           "textToSpeech": "hello"
-      //         }
-      //       }
-      //     ],
-      //     "suggestions": [
-      //       {
-      //         "title": "Say this"
-      //       },
-      //       {
-      //         "title": "or this"
-      //       }
-      //     ]
-      //   },
-      //   "systemIntent": {
-      //     "data": {
-      //       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
-      //       "listSelect": {
-      //         "items": [
-      //           {
-      //             "optionInfo": {
-      //               "key": "key1",
-      //               "synonyms": [
-      //                 "key one"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           },
-      //           {
-      //             "optionInfo": {
-      //               "key": "key2",
-      //               "synonyms": [
-      //                 "key two"
-      //               ]
-      //             },
-      //             "title": "must not be empty, but unique"
-      //           }
-      //         ]
-      //       }
-      //     },
-      //     "intent": "actions.intent.OPTION"
-      //   }
-      // }
+ // Google Assistant + // See [Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) ACTIONS_ON_GOOGLE = 8; // Telephony Gateway. @@ -1047,9 +989,7 @@ message Intent { // Displays a card. Card card = 4; - // Returns a response containing a custom, platform-specific payload. - // See the Intent.Message.Platform type for a description of the - // structure that may be required for your platform. + // A custom platform-specific response. google.protobuf.Struct payload = 5; // Returns a voice or text-only response for Actions on Google. @@ -1186,6 +1126,7 @@ message Intent { // Optional. The collection of event names that trigger the intent. // If the collection of input contexts is not empty, all of the contexts must // be present in the active user session for an event to trigger this intent. + // Event names are limited to 150 characters. repeated string events = 8; // Optional. The collection of examples that the agent is @@ -1246,13 +1187,12 @@ message ListIntentsRequest { // Format: `projects//agent`. string parent = 1; - // Optional. The language to list training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 3; @@ -1282,13 +1222,12 @@ message GetIntentRequest { // Format: `projects//agent/intents/`. string name = 1; - // Optional. The language to retrieve training phrases, parameters and rich - // messages for. If not specified, the agent's default language is used. - // [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 3; @@ -1303,13 +1242,12 @@ message CreateIntentRequest { // Required. The intent to create. Intent intent = 2; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [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 = 3; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The resource view to apply to the returned intent. IntentView intent_view = 4; @@ -1320,13 +1258,12 @@ message UpdateIntentRequest { // Required. The intent to update. Intent intent = 1; - // Optional. The language of training phrases, parameters and rich messages - // defined in `intent`. If not specified, the agent's default language is - // used. [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 = 2; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 3; @@ -1366,13 +1303,12 @@ message BatchUpdateIntentsRequest { IntentBatch intent_batch_inline = 3; } - // Optional. The language of training phrases, parameters and rich messages - // defined in `intents`. If not specified, the agent's default language is - // used. [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 = 4; + // Optional. The language used to access language-specific data. + // If not specified, the agent's default language is used. + // For more information, see + // [Multilingual intent and entity + // data](https://cloud.google.com/dialogflow/docs/agents-multilingual#intent-entity). + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. The mask to control which fields get updated. google.protobuf.FieldMask update_mask = 5; diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto index 8531b45a2..ae25c967d 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session.proto @@ -84,8 +84,6 @@ service Sessions { } } -// ============================================================================ -// Requests and responses for custom methods. // The request to detect user's intent. message DetectIntentRequest { // Required. The name of the session this query is sent to. Format: @@ -192,8 +190,11 @@ message QueryParameters { // for the session of this query. repeated SessionEntityType session_entity_types = 5; - // This field can be used to pass custom data into the webhook - // associated with the agent. Arbitrary JSON objects are supported. + // This field can be used to pass custom data to your webhook. + // Arbitrary JSON objects are supported. + // If supplied, the value is used to populate the + // `WebhookRequest.original_detect_intent_request.payload` + // field sent to your webhook. google.protobuf.Struct payload = 6; // KnowledgeBases to get alternative results from. If not set, the @@ -280,6 +281,20 @@ message QueryResult { string action = 3; // The collection of extracted parameters. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 4; // This field is set to: @@ -658,6 +673,20 @@ message EventInput { string name = 1; // The collection of parameters associated with the event. + // + // Depending on your protocol or client library language, this is a + // map, associative array, symbol table, dictionary, or JSON object + // composed of a collection of (MapKey, MapValue) pairs: + // + // - MapKey type: string + // - MapKey value: parameter name + // - MapValue type: + // - If parameter's entity type is a composite entity: map + // - Else: string or number, depending on parameter value type + // - MapValue value: + // - If parameter's entity type is a composite entity: + // map from composite entity property names to property values + // - Else: parameter value google.protobuf.Struct parameters = 2; // Required. The language of this query. See [Language diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session_entity_type.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session_entity_type.proto index affcd8a37..90b8849a6 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session_entity_type.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/session_entity_type.proto @@ -271,12 +271,7 @@ message CreateSessionEntityTypeRequest { // The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType]. message UpdateSessionEntityTypeRequest { - // Required. The entity type to update. Format: - // `projects//agent/sessions//entityTypes/` or `projects//agent/environments//users//sessions//entityTypes/`. If `Environment ID` is not specified, we assume default 'draft' - // environment. If `User ID` is not specified, we assume default '-' user. + // Required. The session entity type to update. SessionEntityType session_entity_type = 1; // Optional. The mask to control which fields get updated. diff --git a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/webhook.proto b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/webhook.proto index 84c735469..9e5d2a4c4 100644 --- a/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/webhook.proto +++ b/proto-google-cloud-dialogflow-v2beta1/src/main/proto/google/cloud/dialogflow/v2beta1/webhook.proto @@ -71,48 +71,42 @@ message WebhookRequest { // [Protocol Buffers Language // Guide](https://developers.google.com/protocol-buffers/docs/proto3#json). message WebhookResponse { - // Optional. The text to be shown on the screen. This value is passed directly - // to `QueryResult.fulfillment_text`. + // Optional. The text response message intended for the end-user. + // It is recommended to use `fulfillment_messages.text.text[0]` instead. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_text][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_text] sent to the integration or API caller. string fulfillment_text = 1; - // Optional. The collection of rich messages to present to the user. This - // value is passed directly to `QueryResult.fulfillment_messages`. + // Optional. The rich response messages intended for the end-user. + // When provided, Dialogflow uses this field to populate + // [QueryResult.fulfillment_messages][google.cloud.dialogflow.v2beta1.QueryResult.fulfillment_messages] sent to the integration or API caller. repeated Intent.Message fulfillment_messages = 2; - // Optional. This value is passed directly to `QueryResult.webhook_source`. + // Optional. A custom field used to identify the webhook source. + // Arbitrary strings are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_source][google.cloud.dialogflow.v2beta1.QueryResult.webhook_source] sent to the integration or API caller. string source = 3; - // Optional. This value is passed directly to `QueryResult.webhook_payload`. - // See the related `fulfillment_messages[i].payload field`, which may be used - // as an alternative to this field. - // - // This field can be used for Actions on Google responses. - // It should have a structure similar to the JSON message shown here. For more - // information, see - // [Actions on Google Webhook - // Format](https://developers.google.com/actions/dialogflow/webhook) - //
{
-  //   "google": {
-  //     "expectUserResponse": true,
-  //     "richResponse": {
-  //       "items": [
-  //         {
-  //           "simpleResponse": {
-  //             "textToSpeech": "this is a simple response"
-  //           }
-  //         }
-  //       ]
-  //     }
-  //   }
-  // }
+ // Optional. This field can be used to pass custom data from your webhook to the + // integration or API caller. Arbitrary JSON objects are supported. + // When provided, Dialogflow uses this field to populate + // [QueryResult.webhook_payload][google.cloud.dialogflow.v2beta1.QueryResult.webhook_payload] sent to the integration or API caller. + // This field is also used by the + // [Google Assistant + // integration](https://cloud.google.com/dialogflow/docs/integrations/aog) + // for rich response messages. + // See the format definition at [Google Assistant Dialogflow webhook + // format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json) google.protobuf.Struct payload = 4; - // Optional. The collection of output contexts. This value is passed directly - // to `QueryResult.output_contexts`. + // Optional. The collection of output contexts that will overwrite currently + // active contexts for the session and reset their lifespans. + // When provided, Dialogflow uses this field to populate + // [QueryResult.output_contexts][google.cloud.dialogflow.v2beta1.QueryResult.output_contexts] sent to the integration or API caller. repeated Context output_contexts = 5; - // Optional. Makes the platform immediately invoke another `DetectIntent` call - // internally with the specified event as input. + // Optional. Invokes the supplied events. // When this field is set, Dialogflow ignores the `fulfillment_text`, // `fulfillment_messages`, and `payload` fields. EventInput followup_event_input = 6; @@ -124,9 +118,9 @@ message WebhookResponse { // Optional. Additional session entity types to replace or extend developer // entity types with. The entity synonyms apply to all languages and persist - // for the session of this query. Setting the session entity types inside - // webhook overwrites the session entity types that have been set through - // `DetectIntentRequest.query_params.session_entity_types`. + // for the session. Setting this data from a webhook overwrites + // the session entity types that have been set using `detectIntent`, + // `streamingDetectIntent` or [SessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityType] management methods. repeated SessionEntityType session_entity_types = 10; } @@ -145,7 +139,8 @@ message OriginalDetectIntentRequest { // field passed in the request. Some integrations that query a Dialogflow // agent may provide additional information in the payload. // - // In particular for the Telephony Gateway this field has the form: + // In particular, for the Dialogflow Phone Gateway integration, this field has + // the form: //
{
   //  "telephony": {
   //    "caller_id": "+18558363987"
diff --git a/synth.metadata b/synth.metadata
index 4a195a3a5..b1e4fd9e9 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,23 +4,23 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-dialogflow.git",
-        "sha": "fe90a7ee41cb6f62856ff5b85187405a32b4638d"
+        "sha": "26a4fc41fd364fa0031317367ca34577ba24ee8d"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3d52f3c126fbfc31f067a7f54737b7f0dfbce163",
-        "internalRef": "304635286"
+        "sha": "28e76243c23cc282efbb288cb558c174e3e5e9ee",
+        "internalRef": "308294748"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "3d52f3c126fbfc31f067a7f54737b7f0dfbce163",
-        "internalRef": "304635286"
+        "sha": "28e76243c23cc282efbb288cb558c174e3e5e9ee",
+        "internalRef": "308294748"
       }
     },
     {