diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClient.java
new file mode 100644
index 000000000..e9217d5b3
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClient.java
@@ -0,0 +1,494 @@
+/*
+ * Copyright 2021 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.v3;
+
+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.cx.v3.stub.ChangelogsStub;
+import com.google.cloud.dialogflow.cx.v3.stub.ChangelogsStubSettings;
+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 CLASS.
+/**
+ * Service Description: Service for managing [Changelogs][google.cloud.dialogflow.cx.v3.Changelog].
+ *
+ *
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:
+ *
+ *
Note: close() needs to be called on the ChangelogsClient 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:
+ *
+ *
+ *
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.
+ *
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.
+ *
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 ChangelogsSettings to
+ * create(). For example:
+ *
+ *
Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class ChangelogsClient implements BackgroundResource {
+ private final ChangelogsSettings settings;
+ private final ChangelogsStub stub;
+
+ /** Constructs an instance of ChangelogsClient with default settings. */
+ public static final ChangelogsClient create() throws IOException {
+ return create(ChangelogsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, 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 ChangelogsClient create(ChangelogsSettings settings) throws IOException {
+ return new ChangelogsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(ChangelogsSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final ChangelogsClient create(ChangelogsStub stub) {
+ return new ChangelogsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, 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 ChangelogsClient(ChangelogsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ChangelogsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected ChangelogsClient(ChangelogsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ChangelogsSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ChangelogsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the list of Changelogs.
+ *
+ *
+ *
+ * @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 ListChangelogsPagedResponse listChangelogs(ListChangelogsRequest request) {
+ return listChangelogsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the list of Changelogs.
+ *
+ *
+ *
+ * @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 Changelog getChangelog(GetChangelogRequest request) {
+ return getChangelogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the specified Changelog.
+ *
+ *
+ */
+ public final UnaryCallable getChangelogCallable() {
+ return stub.getChangelogCallable();
+ }
+
+ @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 ListChangelogsPagedResponse
+ extends AbstractPagedListResponse<
+ ListChangelogsRequest,
+ ListChangelogsResponse,
+ Changelog,
+ ListChangelogsPage,
+ ListChangelogsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListChangelogsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListChangelogsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListChangelogsPagedResponse(ListChangelogsPage page) {
+ super(page, ListChangelogsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListChangelogsPage
+ extends AbstractPage<
+ ListChangelogsRequest, ListChangelogsResponse, Changelog, ListChangelogsPage> {
+
+ private ListChangelogsPage(
+ PageContext context,
+ ListChangelogsResponse response) {
+ super(context, response);
+ }
+
+ private static ListChangelogsPage createEmptyPage() {
+ return new ListChangelogsPage(null, null);
+ }
+
+ @Override
+ protected ListChangelogsPage createPage(
+ PageContext context,
+ ListChangelogsResponse response) {
+ return new ListChangelogsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListChangelogsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListChangelogsRequest,
+ ListChangelogsResponse,
+ Changelog,
+ ListChangelogsPage,
+ ListChangelogsFixedSizeCollection> {
+
+ private ListChangelogsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListChangelogsFixedSizeCollection createEmptyCollection() {
+ return new ListChangelogsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListChangelogsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListChangelogsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsSettings.java
new file mode 100644
index 000000000..33bd0f8c0
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/ChangelogsSettings.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2021 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.v3;
+
+import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.cx.v3.stub.ChangelogsStubSettings;
+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 ChangelogsClient}.
+ *
+ *
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 getChangelog to 30 seconds:
+ *
+ *
Service Description: Service for managing
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStub.java
new file mode 100644
index 000000000..83130880e
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStub.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2021 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.v3.stub;
+
+import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.dialogflow.cx.v3.Changelog;
+import com.google.cloud.dialogflow.cx.v3.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Changelogs service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ChangelogsStub implements BackgroundResource {
+
+ public UnaryCallable
+ listChangelogsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listChangelogsPagedCallable()");
+ }
+
+ public UnaryCallable listChangelogsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listChangelogsCallable()");
+ }
+
+ public UnaryCallable getChangelogCallable() {
+ throw new UnsupportedOperationException("Not implemented: getChangelogCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStubSettings.java
new file mode 100644
index 000000000..e7dc4cb5c
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/ChangelogsStubSettings.java
@@ -0,0 +1,371 @@
+/*
+ * Copyright 2021 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.v3.stub;
+
+import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.cx.v3.Changelog;
+import com.google.cloud.dialogflow.cx.v3.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse;
+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 ChangelogsStub}.
+ *
+ *
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 getChangelog to 30 seconds:
+ *
+ *
+ */
+@Generated("by gapic-generator-java")
+public class ChangelogsStubSettings 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<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings;
+ private final UnaryCallSettings getChangelogSettings;
+
+ private static final PagedListDescriptor
+ LIST_CHANGELOGS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListChangelogsRequest injectToken(ListChangelogsRequest payload, String token) {
+ return ListChangelogsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListChangelogsRequest injectPageSize(
+ ListChangelogsRequest payload, int pageSize) {
+ return ListChangelogsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListChangelogsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListChangelogsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListChangelogsResponse payload) {
+ return payload.getChangelogsList() == null
+ ? ImmutableList.of()
+ : payload.getChangelogsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ LIST_CHANGELOGS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListChangelogsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_CHANGELOGS_PAGE_STR_DESC, request, context);
+ return ListChangelogsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to listChangelogs. */
+ public PagedCallSettings<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings() {
+ return listChangelogsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getChangelog. */
+ public UnaryCallSettings getChangelogSettings() {
+ return getChangelogSettings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ChangelogsStub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcChangelogsStub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", 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 mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "dialogflow.mtls.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)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** 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(ChangelogsStubSettings.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 ChangelogsStubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ listChangelogsSettings = settingsBuilder.listChangelogsSettings().build();
+ getChangelogSettings = settingsBuilder.getChangelogSettings().build();
+ }
+
+ /** Builder for ChangelogsStubSettings. */
+ public static class Builder extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final PagedCallSettings.Builder<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings;
+ private final UnaryCallSettings.Builder getChangelogSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put(
+ "retry_policy_0_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
+ 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(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_0_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ listChangelogsSettings = PagedCallSettings.newBuilder(LIST_CHANGELOGS_PAGE_STR_FACT);
+ getChangelogSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ listChangelogsSettings, getChangelogSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(ChangelogsStubSettings settings) {
+ super(settings);
+
+ listChangelogsSettings = settings.listChangelogsSettings.toBuilder();
+ getChangelogSettings = settings.getChangelogSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ listChangelogsSettings, getChangelogSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .listChangelogsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .getChangelogSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ return builder;
+ }
+
+ /**
+ * 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) {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to listChangelogs. */
+ public PagedCallSettings.Builder<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings() {
+ return listChangelogsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getChangelog. */
+ public UnaryCallSettings.Builder getChangelogSettings() {
+ return getChangelogSettings;
+ }
+
+ @Override
+ public ChangelogsStubSettings build() throws IOException {
+ return new ChangelogsStubSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsCallableFactory.java
new file mode 100644
index 000000000..24c6e8283
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsCallableFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2021 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.v3.stub;
+
+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.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the Changelogs service API.
+ *
+ *
This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcChangelogsCallableFactory 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 callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsStub.java
new file mode 100644
index 000000000..f20e31dc6
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3/stub/GrpcChangelogsStub.java
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2021 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.v3.stub;
+
+import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.UnaryCallable;
+import com.google.cloud.dialogflow.cx.v3.Changelog;
+import com.google.cloud.dialogflow.cx.v3.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3.ListChangelogsResponse;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the Changelogs service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcChangelogsStub extends ChangelogsStub {
+ private static final MethodDescriptor
+ listChangelogsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dialogflow.cx.v3.Changelogs/ListChangelogs")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListChangelogsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListChangelogsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getChangelogMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dialogflow.cx.v3.Changelogs/GetChangelog")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetChangelogRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Changelog.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable listChangelogsCallable;
+ private final UnaryCallable
+ listChangelogsPagedCallable;
+ private final UnaryCallable getChangelogCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcChangelogsStub create(ChangelogsStubSettings settings)
+ throws IOException {
+ return new GrpcChangelogsStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcChangelogsStub create(ClientContext clientContext) throws IOException {
+ return new GrpcChangelogsStub(ChangelogsStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcChangelogsStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcChangelogsStub(
+ ChangelogsStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcChangelogsStub, 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 GrpcChangelogsStub(ChangelogsStubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new GrpcChangelogsCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcChangelogsStub, 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 GrpcChangelogsStub(
+ ChangelogsStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings
+ listChangelogsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listChangelogsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getChangelogTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getChangelogMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+
+ this.listChangelogsCallable =
+ callableFactory.createUnaryCallable(
+ listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext);
+ this.listChangelogsPagedCallable =
+ callableFactory.createPagedCallable(
+ listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext);
+ this.getChangelogCallable =
+ callableFactory.createUnaryCallable(
+ getChangelogTransportSettings, settings.getChangelogSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable listChangelogsCallable() {
+ return listChangelogsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listChangelogsPagedCallable() {
+ return listChangelogsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getChangelogCallable() {
+ return getChangelogCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @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-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClient.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClient.java
new file mode 100644
index 000000000..277afe3c5
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsClient.java
@@ -0,0 +1,496 @@
+/*
+ * Copyright 2021 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.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.cx.v3beta1.stub.ChangelogsStub;
+import com.google.cloud.dialogflow.cx.v3beta1.stub.ChangelogsStubSettings;
+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 CLASS.
+/**
+ * Service Description: Service for managing
+ * [Changelogs][google.cloud.dialogflow.cx.v3beta1.Changelog].
+ *
+ *
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:
+ *
+ *
Note: close() needs to be called on the ChangelogsClient 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:
+ *
+ *
+ *
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.
+ *
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.
+ *
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 ChangelogsSettings to
+ * create(). For example:
+ *
+ *
Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class ChangelogsClient implements BackgroundResource {
+ private final ChangelogsSettings settings;
+ private final ChangelogsStub stub;
+
+ /** Constructs an instance of ChangelogsClient with default settings. */
+ public static final ChangelogsClient create() throws IOException {
+ return create(ChangelogsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, 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 ChangelogsClient create(ChangelogsSettings settings) throws IOException {
+ return new ChangelogsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(ChangelogsSettings).
+ */
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public static final ChangelogsClient create(ChangelogsStub stub) {
+ return new ChangelogsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ChangelogsClient, 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 ChangelogsClient(ChangelogsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ChangelogsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ protected ChangelogsClient(ChangelogsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final ChangelogsSettings getSettings() {
+ return settings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ChangelogsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the list of Changelogs.
+ *
+ *
+ *
+ * @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 ListChangelogsPagedResponse listChangelogs(ListChangelogsRequest request) {
+ return listChangelogsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the list of Changelogs.
+ *
+ *
+ *
+ * @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 Changelog getChangelog(GetChangelogRequest request) {
+ return getChangelogCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the specified Changelog.
+ *
+ *
+ */
+ public final UnaryCallable getChangelogCallable() {
+ return stub.getChangelogCallable();
+ }
+
+ @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 ListChangelogsPagedResponse
+ extends AbstractPagedListResponse<
+ ListChangelogsRequest,
+ ListChangelogsResponse,
+ Changelog,
+ ListChangelogsPage,
+ ListChangelogsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListChangelogsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListChangelogsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListChangelogsPagedResponse(ListChangelogsPage page) {
+ super(page, ListChangelogsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListChangelogsPage
+ extends AbstractPage<
+ ListChangelogsRequest, ListChangelogsResponse, Changelog, ListChangelogsPage> {
+
+ private ListChangelogsPage(
+ PageContext context,
+ ListChangelogsResponse response) {
+ super(context, response);
+ }
+
+ private static ListChangelogsPage createEmptyPage() {
+ return new ListChangelogsPage(null, null);
+ }
+
+ @Override
+ protected ListChangelogsPage createPage(
+ PageContext context,
+ ListChangelogsResponse response) {
+ return new ListChangelogsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListChangelogsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListChangelogsRequest,
+ ListChangelogsResponse,
+ Changelog,
+ ListChangelogsPage,
+ ListChangelogsFixedSizeCollection> {
+
+ private ListChangelogsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListChangelogsFixedSizeCollection createEmptyCollection() {
+ return new ListChangelogsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListChangelogsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListChangelogsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsSettings.java
new file mode 100644
index 000000000..5ee2e6322
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/ChangelogsSettings.java
@@ -0,0 +1,197 @@
+/*
+ * Copyright 2021 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 static com.google.cloud.dialogflow.cx.v3beta1.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.cx.v3beta1.stub.ChangelogsStubSettings;
+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 ChangelogsClient}.
+ *
+ *
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 getChangelog to 30 seconds:
+ *
+ *
Service Description: Service for managing
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStub.java
new file mode 100644
index 000000000..5088976da
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStub.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2021 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.stub;
+
+import static com.google.cloud.dialogflow.cx.v3beta1.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.cx.v3beta1.Changelog;
+import com.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Changelogs service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public abstract class ChangelogsStub implements BackgroundResource {
+
+ public UnaryCallable
+ listChangelogsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listChangelogsPagedCallable()");
+ }
+
+ public UnaryCallable listChangelogsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listChangelogsCallable()");
+ }
+
+ public UnaryCallable getChangelogCallable() {
+ throw new UnsupportedOperationException("Not implemented: getChangelogCallable()");
+ }
+
+ @Override
+ public abstract void close();
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStubSettings.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStubSettings.java
new file mode 100644
index 000000000..b6123ea3a
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/ChangelogsStubSettings.java
@@ -0,0 +1,372 @@
+/*
+ * Copyright 2021 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.stub;
+
+import static com.google.cloud.dialogflow.cx.v3beta1.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.cx.v3beta1.Changelog;
+import com.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse;
+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 ChangelogsStub}.
+ *
+ *
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 getChangelog to 30 seconds:
+ *
+ *
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class ChangelogsStubSettings 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<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings;
+ private final UnaryCallSettings getChangelogSettings;
+
+ private static final PagedListDescriptor
+ LIST_CHANGELOGS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListChangelogsRequest injectToken(ListChangelogsRequest payload, String token) {
+ return ListChangelogsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListChangelogsRequest injectPageSize(
+ ListChangelogsRequest payload, int pageSize) {
+ return ListChangelogsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListChangelogsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListChangelogsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListChangelogsResponse payload) {
+ return payload.getChangelogsList() == null
+ ? ImmutableList.of()
+ : payload.getChangelogsList();
+ }
+ };
+
+ private static final PagedListResponseFactory<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ LIST_CHANGELOGS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListChangelogsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_CHANGELOGS_PAGE_STR_DESC, request, context);
+ return ListChangelogsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
+ /** Returns the object with the settings used for calls to listChangelogs. */
+ public PagedCallSettings<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings() {
+ return listChangelogsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getChangelog. */
+ public UnaryCallSettings getChangelogSettings() {
+ return getChangelogSettings;
+ }
+
+ @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+ public ChangelogsStub createStub() throws IOException {
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(GrpcTransportChannel.getGrpcTransportName())) {
+ return GrpcChangelogsStub.create(this);
+ }
+ throw new UnsupportedOperationException(
+ String.format(
+ "Transport not supported: %s", 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 mTLS service endpoint. */
+ public static String getDefaultMtlsEndpoint() {
+ return "dialogflow.mtls.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)
+ .setUseJwtAccessWithScope(true);
+ }
+
+ /** 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(ChangelogsStubSettings.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 ChangelogsStubSettings(Builder settingsBuilder) throws IOException {
+ super(settingsBuilder);
+
+ listChangelogsSettings = settingsBuilder.listChangelogsSettings().build();
+ getChangelogSettings = settingsBuilder.getChangelogSettings().build();
+ }
+
+ /** Builder for ChangelogsStubSettings. */
+ public static class Builder extends StubSettings.Builder {
+ private final ImmutableList> unaryMethodSettingsBuilders;
+ private final PagedCallSettings.Builder<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings;
+ private final UnaryCallSettings.Builder getChangelogSettings;
+ private static final ImmutableMap>
+ RETRYABLE_CODE_DEFINITIONS;
+
+ static {
+ ImmutableMap.Builder> definitions =
+ ImmutableMap.builder();
+ definitions.put(
+ "retry_policy_0_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
+ 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(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_0_params", settings);
+ RETRY_PARAM_DEFINITIONS = definitions.build();
+ }
+
+ protected Builder() {
+ this(((ClientContext) null));
+ }
+
+ protected Builder(ClientContext clientContext) {
+ super(clientContext);
+
+ listChangelogsSettings = PagedCallSettings.newBuilder(LIST_CHANGELOGS_PAGE_STR_FACT);
+ getChangelogSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ listChangelogsSettings, getChangelogSettings);
+ initDefaults(this);
+ }
+
+ protected Builder(ChangelogsStubSettings settings) {
+ super(settings);
+
+ listChangelogsSettings = settings.listChangelogsSettings.toBuilder();
+ getChangelogSettings = settings.getChangelogSettings.toBuilder();
+
+ unaryMethodSettingsBuilders =
+ ImmutableList.>of(
+ listChangelogsSettings, getChangelogSettings);
+ }
+
+ private static Builder createDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultTransportChannelProvider());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
+ private static Builder initDefaults(Builder builder) {
+ builder
+ .listChangelogsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .getChangelogSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ return builder;
+ }
+
+ /**
+ * 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) {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
+ return this;
+ }
+
+ public ImmutableList> unaryMethodSettingsBuilders() {
+ return unaryMethodSettingsBuilders;
+ }
+
+ /** Returns the builder for the settings used for calls to listChangelogs. */
+ public PagedCallSettings.Builder<
+ ListChangelogsRequest, ListChangelogsResponse, ListChangelogsPagedResponse>
+ listChangelogsSettings() {
+ return listChangelogsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getChangelog. */
+ public UnaryCallSettings.Builder getChangelogSettings() {
+ return getChangelogSettings;
+ }
+
+ @Override
+ public ChangelogsStubSettings build() throws IOException {
+ return new ChangelogsStubSettings(this);
+ }
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsCallableFactory.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsCallableFactory.java
new file mode 100644
index 000000000..ec5d2ebd5
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2021 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.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.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the Changelogs service API.
+ *
+ *
This class is for advanced usage.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcChangelogsCallableFactory 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 callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ GrpcCallSettings grpcCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBatchingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ GrpcCallSettings grpcCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ return GrpcCallableFactory.createOperationCallable(
+ grpcCallSettings, callSettings, clientContext, operationsStub);
+ }
+
+ @Override
+ public
+ BidiStreamingCallable createBidiStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createBidiStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createServerStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ ClientStreamingCallable createClientStreamingCallable(
+ GrpcCallSettings grpcCallSettings,
+ StreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return GrpcCallableFactory.createClientStreamingCallable(
+ grpcCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsStub.java b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsStub.java
new file mode 100644
index 000000000..36883e3d0
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/main/java/com/google/cloud/dialogflow/cx/v3beta1/stub/GrpcChangelogsStub.java
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2021 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.stub;
+
+import static com.google.cloud.dialogflow.cx.v3beta1.ChangelogsClient.ListChangelogsPagedResponse;
+
+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.UnaryCallable;
+import com.google.cloud.dialogflow.cx.v3beta1.Changelog;
+import com.google.cloud.dialogflow.cx.v3beta1.GetChangelogRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsRequest;
+import com.google.cloud.dialogflow.cx.v3beta1.ListChangelogsResponse;
+import com.google.common.collect.ImmutableMap;
+import com.google.longrunning.stub.GrpcOperationsStub;
+import io.grpc.MethodDescriptor;
+import io.grpc.protobuf.ProtoUtils;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC stub implementation for the Changelogs service API.
+ *
+ *
This class is for advanced usage and reflects the underlying API directly.
+ */
+@BetaApi
+@Generated("by gapic-generator-java")
+public class GrpcChangelogsStub extends ChangelogsStub {
+ private static final MethodDescriptor
+ listChangelogsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Changelogs/ListChangelogs")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListChangelogsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListChangelogsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getChangelogMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dialogflow.cx.v3beta1.Changelogs/GetChangelog")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetChangelogRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Changelog.getDefaultInstance()))
+ .build();
+
+ private final UnaryCallable listChangelogsCallable;
+ private final UnaryCallable
+ listChangelogsPagedCallable;
+ private final UnaryCallable getChangelogCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final GrpcOperationsStub operationsStub;
+ private final GrpcStubCallableFactory callableFactory;
+
+ public static final GrpcChangelogsStub create(ChangelogsStubSettings settings)
+ throws IOException {
+ return new GrpcChangelogsStub(settings, ClientContext.create(settings));
+ }
+
+ public static final GrpcChangelogsStub create(ClientContext clientContext) throws IOException {
+ return new GrpcChangelogsStub(ChangelogsStubSettings.newBuilder().build(), clientContext);
+ }
+
+ public static final GrpcChangelogsStub create(
+ ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException {
+ return new GrpcChangelogsStub(
+ ChangelogsStubSettings.newBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of GrpcChangelogsStub, 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 GrpcChangelogsStub(ChangelogsStubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new GrpcChangelogsCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of GrpcChangelogsStub, 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 GrpcChangelogsStub(
+ ChangelogsStubSettings settings,
+ ClientContext clientContext,
+ GrpcStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
+
+ GrpcCallSettings
+ listChangelogsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listChangelogsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getChangelogTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getChangelogMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+
+ this.listChangelogsCallable =
+ callableFactory.createUnaryCallable(
+ listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext);
+ this.listChangelogsPagedCallable =
+ callableFactory.createPagedCallable(
+ listChangelogsTransportSettings, settings.listChangelogsSettings(), clientContext);
+ this.getChangelogCallable =
+ callableFactory.createUnaryCallable(
+ getChangelogTransportSettings, settings.getChangelogSettings(), clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ public GrpcOperationsStub getOperationsStub() {
+ return operationsStub;
+ }
+
+ @Override
+ public UnaryCallable listChangelogsCallable() {
+ return listChangelogsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listChangelogsPagedCallable() {
+ return listChangelogsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getChangelogCallable() {
+ return getChangelogCallable;
+ }
+
+ @Override
+ public final void close() {
+ try {
+ backgroundResources.close();
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IllegalStateException("Failed to close resource", e);
+ }
+ }
+
+ @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-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
new file mode 100644
index 000000000..99640438f
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/ChangelogsClientTest.java
@@ -0,0 +1,259 @@
+/*
+ * Copyright 2021 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.v3;
+
+import static com.google.cloud.dialogflow.cx.v3.ChangelogsClient.ListChangelogsPagedResponse;
+
+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 com.google.protobuf.Timestamp;
+import io.grpc.StatusRuntimeException;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+import javax.annotation.Generated;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+@Generated("by gapic-generator-java")
+public class ChangelogsClientTest {
+ private static MockChangelogs mockChangelogs;
+ private static MockServiceHelper mockServiceHelper;
+ private LocalChannelProvider channelProvider;
+ private ChangelogsClient client;
+
+ @BeforeClass
+ public static void startStaticServer() {
+ mockChangelogs = new MockChangelogs();
+ mockServiceHelper =
+ new MockServiceHelper(
+ UUID.randomUUID().toString(), Arrays.asList(mockChangelogs));
+ mockServiceHelper.start();
+ }
+
+ @AfterClass
+ public static void stopServer() {
+ mockServiceHelper.stop();
+ }
+
+ @Before
+ public void setUp() throws IOException {
+ mockServiceHelper.reset();
+ channelProvider = mockServiceHelper.createChannelProvider();
+ ChangelogsSettings settings =
+ ChangelogsSettings.newBuilder()
+ .setTransportChannelProvider(channelProvider)
+ .setCredentialsProvider(NoCredentialsProvider.create())
+ .build();
+ client = ChangelogsClient.create(settings);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ client.close();
+ }
+
+ @Test
+ public void listChangelogsTest() throws Exception {
+ Changelog responsesElement = Changelog.newBuilder().build();
+ ListChangelogsResponse expectedResponse =
+ ListChangelogsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllChangelogs(Arrays.asList(responsesElement))
+ .build();
+ mockChangelogs.addResponse(expectedResponse);
+
+ AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+
+ ListChangelogsPagedResponse pagedListResponse = client.listChangelogs(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getChangelogsList().get(0), resources.get(0));
+
+ List actualRequests = mockChangelogs.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListChangelogsRequest actualRequest = ((ListChangelogsRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listChangelogsExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockChangelogs.addException(exception);
+
+ try {
+ AgentName parent = AgentName.of("[PROJECT]", "[LOCATION]", "[AGENT]");
+ client.listChangelogs(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listChangelogsTest2() throws Exception {
+ Changelog responsesElement = Changelog.newBuilder().build();
+ ListChangelogsResponse expectedResponse =
+ ListChangelogsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllChangelogs(Arrays.asList(responsesElement))
+ .build();
+ mockChangelogs.addResponse(expectedResponse);
+
+ String parent = "parent-995424086";
+
+ ListChangelogsPagedResponse pagedListResponse = client.listChangelogs(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getChangelogsList().get(0), resources.get(0));
+
+ List actualRequests = mockChangelogs.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListChangelogsRequest actualRequest = ((ListChangelogsRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent, actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listChangelogsExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockChangelogs.addException(exception);
+
+ try {
+ String parent = "parent-995424086";
+ client.listChangelogs(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getChangelogTest() throws Exception {
+ Changelog expectedResponse =
+ Changelog.newBuilder()
+ .setName(
+ ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]").toString())
+ .setUserEmail("userEmail315299473")
+ .setDisplayName("displayName1714148973")
+ .setAction("action-1422950858")
+ .setType("type3575610")
+ .setResource("resource-341064690")
+ .setCreateTime(Timestamp.newBuilder().build())
+ .build();
+ mockChangelogs.addResponse(expectedResponse);
+
+ ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]");
+
+ Changelog actualResponse = client.getChangelog(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockChangelogs.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetChangelogRequest actualRequest = ((GetChangelogRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name.toString(), actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getChangelogExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockChangelogs.addException(exception);
+
+ try {
+ ChangelogName name = ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]");
+ client.getChangelog(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getChangelogTest2() throws Exception {
+ Changelog expectedResponse =
+ Changelog.newBuilder()
+ .setName(
+ ChangelogName.of("[PROJECT]", "[LOCATION]", "[AGENT]", "[CHANGELOG]").toString())
+ .setUserEmail("userEmail315299473")
+ .setDisplayName("displayName1714148973")
+ .setAction("action-1422950858")
+ .setType("type3575610")
+ .setResource("resource-341064690")
+ .setCreateTime(Timestamp.newBuilder().build())
+ .build();
+ mockChangelogs.addResponse(expectedResponse);
+
+ String name = "name3373707";
+
+ Changelog actualResponse = client.getChangelog(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockChangelogs.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetChangelogRequest actualRequest = ((GetChangelogRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name, actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getChangelogExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockChangelogs.addException(exception);
+
+ try {
+ String name = "name3373707";
+ client.getChangelog(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+}
diff --git a/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockChangelogs.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockChangelogs.java
new file mode 100644
index 000000000..192f3cd04
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockChangelogs.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2021 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.v3;
+
+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 MockChangelogs implements MockGrpcService {
+ private final MockChangelogsImpl serviceImpl;
+
+ public MockChangelogs() {
+ serviceImpl = new MockChangelogsImpl();
+ }
+
+ @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/v3/MockChangelogsImpl.java b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockChangelogsImpl.java
new file mode 100644
index 000000000..aaa92402e
--- /dev/null
+++ b/google-cloud-dialogflow-cx/src/test/java/com/google/cloud/dialogflow/cx/v3/MockChangelogsImpl.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2021 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.v3;
+
+import com.google.api.core.BetaApi;
+import com.google.cloud.dialogflow.cx.v3.ChangelogsGrpc.ChangelogsImplBase;
+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 MockChangelogsImpl extends ChangelogsImplBase {
+ private List requests;
+ private Queue