diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java index 586fe4c27..ab9a269bb 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/AgentsClient.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -190,6 +191,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java index 105db52f7..3945b5b35 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClient.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -194,6 +195,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java index 08b90af84..68eaeac95 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/FlowsClient.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -191,6 +192,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java index 048ed239f..5ec416f05 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/TestCasesClient.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -191,6 +192,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java index 9eb3f6026..64c731363 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/VersionsClient.java @@ -18,6 +18,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.httpjson.longrunning.OperationsClient; import com.google.api.gax.longrunning.OperationFuture; @@ -192,6 +193,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java index 41de16028..3a008abde 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClient.java @@ -192,6 +192,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java index 9fedca522..9e896e14b 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClient.java @@ -196,6 +196,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java index 1444d9e7f..37a2a40cd 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClient.java @@ -193,6 +193,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java index ca24c8458..89ed4b8eb 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClient.java @@ -194,6 +194,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java index c04e2f524..1655177fa 100644 --- a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java +++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClient.java @@ -194,6 +194,7 @@ public final com.google.longrunning.OperationsClient getOperationsClient() { * Returns the OperationsClient that can be used to query the status of a long-running operation * returned by another API method call. */ + @BetaApi public final OperationsClient getHttpJsonOperationsClient() { return httpJsonOperationsClient; } diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java index 121136ab6..1bdc165b3 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/AgentsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java index 8e1b4ed63..cf3cf015d 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClientTest.java index 97d3073f2..a4a4dffdf 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/DeploymentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java index cc4114b91..0aaca4257 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EntityTypesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java index 024abdcbd..95cb2dddb 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/EnvironmentsClientTest.java @@ -33,7 +33,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java index 3920d5efe..2f6e84df0 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ExperimentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java index eb93ac787..c5794539c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/FlowsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java index 5dca9f259..c07b0f955 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/IntentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocations.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocations.java similarity index 97% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocations.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocations.java index 8ce43edf9..e39f6974e 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocations.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocations.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3; import com.google.api.core.BetaApi; import com.google.api.gax.grpc.testing.MockGrpcService; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocationsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocationsImpl.java similarity index 93% rename from google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocationsImpl.java rename to google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocationsImpl.java index d6b51f13d..6e0d0cd42 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/location/MockLocationsImpl.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockLocationsImpl.java @@ -14,9 +14,13 @@ * limitations under the License. */ -package com.google.cloud.location; +package com.google.cloud.dialogflow.cx.v3; import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; import com.google.cloud.location.LocationsGrpc.LocationsImplBase; import com.google.protobuf.AbstractMessage; import io.grpc.stub.StreamObserver; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java index a4aedcd4b..086b573bc 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/PagesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java index 59204d69d..8606f8234 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SecuritySettingsServiceClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClientTest.java index 01e9cf7c6..f9fd57d80 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionEntityTypesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java index 58e706ce4..7f01fc5b5 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/SessionsClientTest.java @@ -33,7 +33,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java index e0f660a2a..04eb765d6 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TestCasesClientTest.java @@ -32,7 +32,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java index 8cb1ea37d..ed82925d8 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/TransitionRouteGroupsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/VersionsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/VersionsClientTest.java index 90414b42a..b053aa53f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/VersionsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/VersionsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/WebhooksClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/WebhooksClientTest.java index f6e078d45..1278a6820 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/WebhooksClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/WebhooksClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java index a196b30df..3544f576f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/AgentsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java index e12bb06b8..4b1b8944d 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java index 3b6d28de2..edb45aa9c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/DeploymentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java index d9644e4cd..c0219269c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EntityTypesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java index 0eaf2ae97..8aafbdc8f 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/EnvironmentsClientTest.java @@ -33,7 +33,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java index 3bd537672..2a1b2920c 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/ExperimentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java index 98afa01b7..dbf3c6ee0 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/FlowsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java index 4e0355664..2c3aad5cf 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/IntentsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocations.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocations.java new file mode 100644 index 000000000..5a78e58bc --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocations.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocations implements MockGrpcService { + private final MockLocationsImpl serviceImpl; + + public MockLocations() { + serviceImpl = new MockLocationsImpl(); + } + + @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-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocationsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocationsImpl.java new file mode 100644 index 000000000..7a05a514b --- /dev/null +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/MockLocationsImpl.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dialogflow.cx.v3beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.cloud.location.LocationsGrpc.LocationsImplBase; +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; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockLocationsImpl extends LocationsImplBase { + private List requests; + private Queue responses; + + public MockLocationsImpl() { + 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 listLocations( + ListLocationsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListLocationsResponse) { + requests.add(request); + responseObserver.onNext(((ListLocationsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListLocations, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListLocationsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getLocation(GetLocationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Location) { + requests.add(request); + responseObserver.onNext(((Location) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetLocation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Location.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java index 1cf8e3af4..b83aa1508 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/PagesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java index f1505bf0d..2f0a7ebbe 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SecuritySettingsServiceClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClientTest.java index da6f218f4..9b0a2a117 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionEntityTypesClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java index 349fdf61d..f9f41718d 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/SessionsClientTest.java @@ -33,7 +33,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java index ed28ab746..ecc623fd0 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TestCasesClientTest.java @@ -32,7 +32,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java index 72f4ee773..5b7cf1ba8 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/TransitionRouteGroupsClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClientTest.java index 08d999185..e03a57d76 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/VersionsClientTest.java @@ -31,7 +31,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClientTest.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClientTest.java index be9771290..366f0a2f5 100644 --- a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClientTest.java +++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3beta1/WebhooksClientTest.java @@ -30,7 +30,6 @@ import com.google.cloud.location.ListLocationsRequest; import com.google.cloud.location.ListLocationsResponse; import com.google.cloud.location.Location; -import com.google.cloud.location.MockLocations; import com.google.common.collect.Lists; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any;