Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Commit 4d65ea6

Browse files
docs: updated some method comments and added an explicit note that DetectIntentRequest's text input is limited by 256 characters (#954)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 463362184 Source-Link: googleapis/googleapis@1805fc2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c47083a7b829c85e3423250f7cf431f07238ad04 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQ3MDgzYTdiODI5Yzg1ZTM0MjMyNTBmN2NmNDMxZjA3MjM4YWQwNCJ9 docs: added an explicit note that DetectIntentRequest's text input is limited by 256 characters PiperOrigin-RevId: 463252698 Source-Link: googleapis/googleapis@eeacaab Source-Link: https://github.com/googleapis/googleapis-gen/commit/da3bfa08ba77d14ba66e6eeee5ad159ef365df0f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGEzYmZhMDhiYTc3ZDE0YmE2NmU2ZWVlZTVhZDE1OWVmMzY1ZGYwZiJ9 chore(bazel): update protobuf to v3.21.3 chore(bazel): update gax-java to 2.18.4 PiperOrigin-RevId: 463115700 Source-Link: googleapis/googleapis@52130a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a4d9d9bb3afb20b0f5fa4f5d9f6740b1d0eb19a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmE0ZDlkOWJiM2FmYjIwYjBmNWZhNGY1ZDlmNjc0MGIxZDBlYjE5YSJ9 feat: provide new parameter cx_current_page, the unique identifier of the CX page to override the `current_page` in the session. Add filter field to ListAnswerRecordsRequest. And add AudioInput to analysis requests docs: add more meaningful comments PiperOrigin-RevId: 459325028 Source-Link: googleapis/googleapis@a076084 Source-Link: https://github.com/googleapis/googleapis-gen/commit/278f4fdb4a4ef5ff68da3f40f30367ca3e1717bf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjc4ZjRmZGI0YTRlZjVmZjY4ZGEzZjQwZjMwMzY3Y2EzZTE3MTdiZiJ9 feat: deprecated the filter field and add resource_definition docs: add more meaningful comments PiperOrigin-RevId: 458520697 Source-Link: googleapis/googleapis@2bf9d8d Source-Link: https://github.com/googleapis/googleapis-gen/commit/ce2a70aadab1593d6daf8609e5fdd0cf0c644bbc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2UyYTcwYWFkYWIxNTkzZDZkYWY4NjA5ZTVmZGQwY2YwYzY0NGJiYyJ9
1 parent 695aea7 commit 4d65ea6

File tree

480 files changed

+36989
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+36989
-644
lines changed

google-cloud-dialogflow/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
<groupId>com.google.api.grpc</groupId>
4242
<artifactId>proto-google-common-protos</artifactId>
4343
</dependency>
44-
44+
<dependency>
45+
<groupId>com.google.api.grpc</groupId>
46+
<artifactId>grpc-google-common-protos</artifactId>
47+
</dependency>
4548
<dependency>
4649
<groupId>com.google.api.grpc</groupId>
4750
<artifactId>proto-google-cloud-dialogflow-v2</artifactId>

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsClient.java

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
import com.google.api.gax.rpc.UnaryCallable;
3131
import com.google.cloud.dialogflow.v2.stub.AgentsStub;
3232
import com.google.cloud.dialogflow.v2.stub.AgentsStubSettings;
33+
import com.google.cloud.location.GetLocationRequest;
34+
import com.google.cloud.location.ListLocationsRequest;
35+
import com.google.cloud.location.ListLocationsResponse;
36+
import com.google.cloud.location.Location;
3337
import com.google.common.util.concurrent.MoreExecutors;
3438
import com.google.longrunning.Operation;
3539
import com.google.protobuf.Empty;
@@ -1469,6 +1473,145 @@ public final ValidationResult getValidationResult(GetValidationResultRequest req
14691473
return stub.getValidationResultCallable();
14701474
}
14711475

1476+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1477+
/**
1478+
* Lists information about the supported locations for this service.
1479+
*
1480+
* <p>Sample code:
1481+
*
1482+
* <pre>{@code
1483+
* // This snippet has been automatically generated for illustrative purposes only.
1484+
* // It may require modifications to work in your environment.
1485+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1486+
* ListLocationsRequest request =
1487+
* ListLocationsRequest.newBuilder()
1488+
* .setName("name3373707")
1489+
* .setFilter("filter-1274492040")
1490+
* .setPageSize(883849137)
1491+
* .setPageToken("pageToken873572522")
1492+
* .build();
1493+
* for (Location element : agentsClient.listLocations(request).iterateAll()) {
1494+
* // doThingsWith(element);
1495+
* }
1496+
* }
1497+
* }</pre>
1498+
*
1499+
* @param request The request object containing all of the parameters for the API call.
1500+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1501+
*/
1502+
public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
1503+
return listLocationsPagedCallable().call(request);
1504+
}
1505+
1506+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1507+
/**
1508+
* Lists information about the supported locations for this service.
1509+
*
1510+
* <p>Sample code:
1511+
*
1512+
* <pre>{@code
1513+
* // This snippet has been automatically generated for illustrative purposes only.
1514+
* // It may require modifications to work in your environment.
1515+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1516+
* ListLocationsRequest request =
1517+
* ListLocationsRequest.newBuilder()
1518+
* .setName("name3373707")
1519+
* .setFilter("filter-1274492040")
1520+
* .setPageSize(883849137)
1521+
* .setPageToken("pageToken873572522")
1522+
* .build();
1523+
* ApiFuture<Location> future = agentsClient.listLocationsPagedCallable().futureCall(request);
1524+
* // Do something.
1525+
* for (Location element : future.get().iterateAll()) {
1526+
* // doThingsWith(element);
1527+
* }
1528+
* }
1529+
* }</pre>
1530+
*/
1531+
public final UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
1532+
listLocationsPagedCallable() {
1533+
return stub.listLocationsPagedCallable();
1534+
}
1535+
1536+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1537+
/**
1538+
* Lists information about the supported locations for this service.
1539+
*
1540+
* <p>Sample code:
1541+
*
1542+
* <pre>{@code
1543+
* // This snippet has been automatically generated for illustrative purposes only.
1544+
* // It may require modifications to work in your environment.
1545+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1546+
* ListLocationsRequest request =
1547+
* ListLocationsRequest.newBuilder()
1548+
* .setName("name3373707")
1549+
* .setFilter("filter-1274492040")
1550+
* .setPageSize(883849137)
1551+
* .setPageToken("pageToken873572522")
1552+
* .build();
1553+
* while (true) {
1554+
* ListLocationsResponse response = agentsClient.listLocationsCallable().call(request);
1555+
* for (Location element : response.getLocationsList()) {
1556+
* // doThingsWith(element);
1557+
* }
1558+
* String nextPageToken = response.getNextPageToken();
1559+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
1560+
* request = request.toBuilder().setPageToken(nextPageToken).build();
1561+
* } else {
1562+
* break;
1563+
* }
1564+
* }
1565+
* }
1566+
* }</pre>
1567+
*/
1568+
public final UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
1569+
return stub.listLocationsCallable();
1570+
}
1571+
1572+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1573+
/**
1574+
* Gets information about a location.
1575+
*
1576+
* <p>Sample code:
1577+
*
1578+
* <pre>{@code
1579+
* // This snippet has been automatically generated for illustrative purposes only.
1580+
* // It may require modifications to work in your environment.
1581+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1582+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
1583+
* Location response = agentsClient.getLocation(request);
1584+
* }
1585+
* }</pre>
1586+
*
1587+
* @param request The request object containing all of the parameters for the API call.
1588+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1589+
*/
1590+
public final Location getLocation(GetLocationRequest request) {
1591+
return getLocationCallable().call(request);
1592+
}
1593+
1594+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1595+
/**
1596+
* Gets information about a location.
1597+
*
1598+
* <p>Sample code:
1599+
*
1600+
* <pre>{@code
1601+
* // This snippet has been automatically generated for illustrative purposes only.
1602+
* // It may require modifications to work in your environment.
1603+
* try (AgentsClient agentsClient = AgentsClient.create()) {
1604+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
1605+
* ApiFuture<Location> future = agentsClient.getLocationCallable().futureCall(request);
1606+
* // Do something.
1607+
* Location response = future.get();
1608+
* }
1609+
* }</pre>
1610+
*/
1611+
public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
1612+
return stub.getLocationCallable();
1613+
}
1614+
14721615
@Override
14731616
public final void close() {
14741617
stub.close();
@@ -1573,4 +1716,80 @@ protected SearchAgentsFixedSizeCollection createCollection(
15731716
return new SearchAgentsFixedSizeCollection(pages, collectionSize);
15741717
}
15751718
}
1719+
1720+
public static class ListLocationsPagedResponse
1721+
extends AbstractPagedListResponse<
1722+
ListLocationsRequest,
1723+
ListLocationsResponse,
1724+
Location,
1725+
ListLocationsPage,
1726+
ListLocationsFixedSizeCollection> {
1727+
1728+
public static ApiFuture<ListLocationsPagedResponse> createAsync(
1729+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
1730+
ApiFuture<ListLocationsResponse> futureResponse) {
1731+
ApiFuture<ListLocationsPage> futurePage =
1732+
ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
1733+
return ApiFutures.transform(
1734+
futurePage,
1735+
input -> new ListLocationsPagedResponse(input),
1736+
MoreExecutors.directExecutor());
1737+
}
1738+
1739+
private ListLocationsPagedResponse(ListLocationsPage page) {
1740+
super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
1741+
}
1742+
}
1743+
1744+
public static class ListLocationsPage
1745+
extends AbstractPage<
1746+
ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
1747+
1748+
private ListLocationsPage(
1749+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
1750+
ListLocationsResponse response) {
1751+
super(context, response);
1752+
}
1753+
1754+
private static ListLocationsPage createEmptyPage() {
1755+
return new ListLocationsPage(null, null);
1756+
}
1757+
1758+
@Override
1759+
protected ListLocationsPage createPage(
1760+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
1761+
ListLocationsResponse response) {
1762+
return new ListLocationsPage(context, response);
1763+
}
1764+
1765+
@Override
1766+
public ApiFuture<ListLocationsPage> createPageAsync(
1767+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
1768+
ApiFuture<ListLocationsResponse> futureResponse) {
1769+
return super.createPageAsync(context, futureResponse);
1770+
}
1771+
}
1772+
1773+
public static class ListLocationsFixedSizeCollection
1774+
extends AbstractFixedSizeCollection<
1775+
ListLocationsRequest,
1776+
ListLocationsResponse,
1777+
Location,
1778+
ListLocationsPage,
1779+
ListLocationsFixedSizeCollection> {
1780+
1781+
private ListLocationsFixedSizeCollection(List<ListLocationsPage> pages, int collectionSize) {
1782+
super(pages, collectionSize);
1783+
}
1784+
1785+
private static ListLocationsFixedSizeCollection createEmptyCollection() {
1786+
return new ListLocationsFixedSizeCollection(null, 0);
1787+
}
1788+
1789+
@Override
1790+
protected ListLocationsFixedSizeCollection createCollection(
1791+
List<ListLocationsPage> pages, int collectionSize) {
1792+
return new ListLocationsFixedSizeCollection(pages, collectionSize);
1793+
}
1794+
}
15761795
}

google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/AgentsSettings.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.dialogflow.v2;
1818

19+
import static com.google.cloud.dialogflow.v2.AgentsClient.ListLocationsPagedResponse;
1920
import static com.google.cloud.dialogflow.v2.AgentsClient.SearchAgentsPagedResponse;
2021

2122
import com.google.api.core.ApiFunction;
@@ -32,6 +33,10 @@
3233
import com.google.api.gax.rpc.TransportChannelProvider;
3334
import com.google.api.gax.rpc.UnaryCallSettings;
3435
import com.google.cloud.dialogflow.v2.stub.AgentsStubSettings;
36+
import com.google.cloud.location.GetLocationRequest;
37+
import com.google.cloud.location.ListLocationsRequest;
38+
import com.google.cloud.location.ListLocationsResponse;
39+
import com.google.cloud.location.Location;
3540
import com.google.longrunning.Operation;
3641
import com.google.protobuf.Empty;
3742
import com.google.protobuf.Struct;
@@ -143,6 +148,17 @@ public OperationCallSettings<RestoreAgentRequest, Empty, Struct> restoreAgentOpe
143148
return ((AgentsStubSettings) getStubSettings()).getValidationResultSettings();
144149
}
145150

151+
/** Returns the object with the settings used for calls to listLocations. */
152+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
153+
listLocationsSettings() {
154+
return ((AgentsStubSettings) getStubSettings()).listLocationsSettings();
155+
}
156+
157+
/** Returns the object with the settings used for calls to getLocation. */
158+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
159+
return ((AgentsStubSettings) getStubSettings()).getLocationSettings();
160+
}
161+
146162
public static final AgentsSettings create(AgentsStubSettings stub) throws IOException {
147163
return new AgentsSettings.Builder(stub.toBuilder()).build();
148164
}
@@ -329,6 +345,18 @@ public UnaryCallSettings.Builder<RestoreAgentRequest, Operation> restoreAgentSet
329345
return getStubSettingsBuilder().getValidationResultSettings();
330346
}
331347

348+
/** Returns the builder for the settings used for calls to listLocations. */
349+
public PagedCallSettings.Builder<
350+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
351+
listLocationsSettings() {
352+
return getStubSettingsBuilder().listLocationsSettings();
353+
}
354+
355+
/** Returns the builder for the settings used for calls to getLocation. */
356+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
357+
return getStubSettingsBuilder().getLocationSettings();
358+
}
359+
332360
@Override
333361
public AgentsSettings build() throws IOException {
334362
return new AgentsSettings(this);

0 commit comments

Comments
 (0)