8000 Regenerate dialogflow client by yoshi-automation · Pull Request #5675 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
* <pre>
* <code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* Agent response = agentsClient.getAgent(parent);
* Agent agent = Agent.newBuilder().build();
* Agent response = agentsClient.setAgent(agent);
* }
* </code>
* </pre>
Expand Down Expand Up @@ -193,6 +193,167 @@ public final OperationsClient getOperationsClient() {
return operationsClient;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates/updates the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* Agent agent = Agent.newBuilder().build();
* Agent response = agentsClient.setAgent(agent);
* }
* </code></pre>
*
* @param agent Required. The agent to update.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Agent setAgent(Agent agent) {

SetAgentRequest request = SetAgentRequest.newBuilder().setAgent(agent).build();
return setAgent(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates/updates the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* Agent agent = Agent.newBuilder().build();
* SetAgentRequest request = SetAgentRequest.newBuilder()
* .setAgent(agent)
* .build();
* Agent response = agentsClient.setAgent(request);
* }
* </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
*/
public final Agent setAgent(SetAgentRequest request) {
return setAgentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates/updates the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* Agent agent = Agent.newBuilder().build();
* SetAgentRequest request = SetAgentRequest.newBuilder()
* .setAgent(agent)
* .build();
* ApiFuture&lt;Agent&gt; future = agentsClient.setAgentCallable().futureCall(request);
* // Do something
* Agent response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<SetAgentRequest, Agent> setAgentCallable() {
return stub.setAgentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* agentsClient.deleteAgent(parent);
* }
* </code></pre>
*
* @param parent Required. The project that the agent to delete is associated with. Format:
* `projects/&lt;Project ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAgent(ProjectName parent) {

DeleteAgentRequest request =
DeleteAgentRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
deleteAgent(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* agentsClient.deleteAgent(parent.toString());
* }
* </code></pre>
*
* @param parent Required. The project that the agent to delete is associated with. Format:
* `projects/&lt;Project ID&gt;`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAgent(String parent) {

DeleteAgentRequest request = DeleteAgentRequest.newBuilder().setParent(parent).build();
deleteAgent(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* DeleteAgentRequest request = DeleteAgentRequest.newBuilder()
* .setParent(parent.toString())
* .build();
* agentsClient.deleteAgent(request);
* }
* </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
*/
public final void deleteAgent(DeleteAgentRequest request) {
deleteAgentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* DeleteAgentRequest request = DeleteAgentRequest.newBuilder()
* .setParent(parent.toString())
* .build();
* ApiFuture&lt;Void&gt; future = agentsClient.deleteAgentCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
return stub.deleteAgentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves the specified agent.
Expand Down Expand Up @@ -884,84 +1045,6 @@ public final UnaryCallable<RestoreAgentRequest, Operation> restoreAgentCallable(
return stub.restoreAgentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates/updates the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* SetAgentRequest request = SetAgentRequest.newBuilder().build();
* Agent response = agentsClient.setAgent(request);
* }
* </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
*/
public final Agent setAgent(SetAgentRequest request) {
return setAgentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates/updates the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* SetAgentRequest request = SetAgentRequest.newBuilder().build();
* ApiFuture&lt;Agent&gt; future = agentsClient.setAgentCallable().futureCall(request);
* // Do something
* Agent response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<SetAgentRequest, Agent> setAgentCallable() {
return stub.setAgentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* DeleteAgentRequest request = DeleteAgentRequest.newBuilder().build();
* agentsClient.deleteAgent(request);
* }
* </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
*/
public final void deleteAgent(DeleteAgentRequest request) {
deleteAgentCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes the specified agent.
*
* <p>Sample code:
*
* <pre><code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* DeleteAgentRequest request = DeleteAgentRequest.newBuilder().build();
* ApiFuture&lt;Void&gt; future = agentsClient.deleteAgentCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
return stub.deleteAgentCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
10BC0
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
*
* <p>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 getAgent to 30 seconds:
* example, to set the total timeout of setAgent to 30 seconds:
*
* <pre>
* <code>
* AgentsSettings.Builder agentsSettingsBuilder =
* AgentsSettings.newBuilder();
* agentsSettingsBuilder.getAgentSettings().getRetrySettings().toBuilder()
* agentsSettingsBuilder.setAgentSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* AgentsSettings agentsSettings = agentsSettingsBuilder.build();
* </code>
Expand All @@ -66,6 +66,16 @@
@Generated("by gapic-generator")
@BetaApi
public class AgentsSettings extends ClientSettings<AgentsSettings> {
/** Returns the object with the settings used for calls to setAgent. */
public UnaryCallSettings<SetAgentRequest, Agent> setAgentSettings() {
return ((AgentsStubSettings) getStubSettings()).setAgentSettings();
}

/** Returns the object with the settings used for calls to deleteAgent. */
public UnaryCallSettings<DeleteAgentRequest, Empty> deleteAgentSettings() {
return ((AgentsStubSettings) getStubSettings()).deleteAgentSettings();
}

/** Returns the object with the settings used for calls to getAgent. */
public UnaryCallSettings<GetAgentRequest, Agent> getAgentSettings() {
return ((AgentsStubSettings) getStubSettings()).getAgentSettings();
Expand Down Expand Up @@ -126,16 +136,6 @@ public OperationCallSettings<RestoreAgentRequest, Empty, Struct> restoreAgentOpe
return ((AgentsStubSettings) getStubSettings()).restoreAgentOperationSettings();
}

/** Returns the object with the settings used for calls to setAgent. */
public UnaryCallSettings<SetAgentRequest, Agent> setAgentSettings() {
return ((AgentsStubSettings) getStubSettings()).setAgentSettings();
}

/** Returns the object with the settings used for calls to deleteAgent. */
public UnaryCallSettings<DeleteAgentRequest, Empty> deleteAgentSettings() {
return ((AgentsStubSettings) getStubSettings()).deleteAgentSettings();
}

public static final AgentsSettings create(AgentsStubSettings stub) throws IOException {
return new AgentsSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -232,6 +232,16 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to setAgent. */
public UnaryCallSettings.Builder<SetAgentRequest, Agent> setAgentSettings() {
return getStubSettingsBuilder().setAgentSettings();
}

/** Returns the builder for the settings used for calls to deleteAgent. */
public UnaryCallSettings.Builder<DeleteAgentRequest, Empty> deleteAgentSettings() {
return getStubSettingsBuilder().deleteAgentSettings();
}

/** Returns the builder for the settings used for calls to getAgent. */
public UnaryCallSettings.Builder<GetAgentRequest, Agent> getAgentSettings() {
return getStubSettingsBuilder().getAgentSettings();
Expand Down Expand Up @@ -296,16 +306,6 @@ public UnaryCallSettings.Builder<RestoreAgentRequest, Operation> restoreAgentSet
return getStubSettingsBuilder().restoreAgentOperationSettings();
}

/** Returns the builder for the settings used for calls to setAgent. */
public UnaryCallSettings.Builder<SetAgentRequest, Agent> setAgentSettings() {
return getStubSettingsBuilder().setAgentSettings();
}

/** Returns the builder for the settings used for calls to deleteAgent. */
public UnaryCallSettings.Builder<DeleteAgentRequest, Empty> deleteAgentSettings() {
return getStubSettingsBuilder().deleteAgentSettings();
}

@Override
public AgentsSettings build() throws IOException {
return new AgentsSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
* <pre>
* <code>
* try (AgentsClient agentsClient = AgentsClient.create()) {
* ProjectName parent = ProjectName.of("[PROJECT]");
* Agent response = agentsClient.getAgent(parent);
* Agent agent = Agent.newBuilder().build();
* Agent response = agentsClient.setAgent(agent);
* }
* </code>
* </pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ public OperationsStub getOperationsStub() {
throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
}

public UnaryCallable<SetAgentRequest, Agent> setAgentCallable() {
throw new UnsupportedOperationException("Not implemented: setAgentCallable()");
}

public UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
throw new UnsupportedOperationException("Not implemented: deleteAgentCallable()");
}

public UnaryCallable<GetAgentRequest, Agent> getAgentCallable() {
throw new UnsupportedOperationException("Not implemented: getAgentCallable()");
}
Expand Down Expand Up @@ -102,14 +110,6 @@ public UnaryCallable<RestoreAgentRequest, Operation> restoreAgentCallable() {
throw new UnsupportedOperationException("Not implemented: restoreAgentCallable()");
}

public UnaryCallable<SetAgentRequest, Agent> setAgentCallable() {
throw new UnsupportedOperationException("Not implemented: setAgentCallable()");
}

public UnaryCallable<DeleteAgentRequest, Empty> deleteAgentCallable() {
throw new UnsupportedOperationException("Not implemented: deleteAgentCallable()");
}

@Override
public abstract void close();
}
Loading
0