@BetaApi(
      "The surface for long-running operations is not stable yet and may change in the future.")
  public final OperationFuture<Empty, Struct> restoreAgentAsync(RestoreAgentRequest request) {
    return restoreAgentOperationCallable().futureCall(request);
  }
@ BetaApi ( "The surface for long-running operations is not stable yet and may change in the future." ) public final OperationFuture < Empty , Struct > restoreAgentAsync ( RestoreAgentRequest request ) { return restoreAgentOperationCallable ( ) . futureCall ( request ) ; }
Restores the specified agent from a ZIP file.

<p>Replaces the current agent version with a new one. All the intents and entity types in the
older version are deleted.

<p>Operation &lt;response: [google.protobuf.Empty][google.protobuf.Empty]&gt;

<p>Sample code:

<pre><code>
try (AgentsClient agentsClient = AgentsClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
RestoreAgentRequest request = RestoreAgentRequest.newBuilder()
.setParent(parent.toString())
.build();
agentsClient.restoreAgentAsync(request).get();
}
</code></pre>

@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