diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java
index e816f70a01ec..98936f3535da 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsClient.java
@@ -18,13 +18,13 @@
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;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.appengine.v1.stub.ApplicationsStub;
import com.google.appengine.v1.stub.ApplicationsStubSettings;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
@@ -93,13 +93,28 @@
* ApplicationsClient applicationsClient = ApplicationsClient.create(applicationsSettings);
* }
*
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ApplicationsSettings applicationsSettings =
+ * ApplicationsSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * ApplicationsSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * ApplicationsClient applicationsClient = ApplicationsClient.create(applicationsSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class ApplicationsClient implements BackgroundResource {
private final ApplicationsSettings settings;
private final ApplicationsStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of ApplicationsClient with default settings. */
public static final ApplicationsClient create() throws IOException {
@@ -118,7 +133,6 @@ public static final ApplicationsClient create(ApplicationsSettings settings) thr
* Constructs an instance of ApplicationsClient, using the given stub for making calls. This is
* for advanced usage - prefer using create(ApplicationsSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final ApplicationsClient create(ApplicationsStub stub) {
return new ApplicationsClient(stub);
}
@@ -131,21 +145,23 @@ public static final ApplicationsClient create(ApplicationsStub stub) {
protected ApplicationsClient(ApplicationsSettings settings) throws IOException {
this.settings = settings;
this.stub = ((ApplicationsStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected ApplicationsClient(ApplicationsStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final ApplicationsSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ApplicationsStub getStub() {
return stub;
}
@@ -154,10 +170,19 @@ public ApplicationsStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * 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;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about an application.
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java
index b0691a46591c..e47a5f719fa5 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ApplicationsSettings.java
@@ -21,6 +21,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -132,11 +133,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return ApplicationsStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return ApplicationsStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return ApplicationsStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return ApplicationsStubSettings.defaultTransportChannelProvider();
}
@@ -146,11 +154,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return ApplicationsStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -188,6 +202,11 @@ private static Builder createDefault() {
return new Builder(ApplicationsStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(ApplicationsStubSettings.newHttpJsonBuilder());
+ }
+
public ApplicationsStubSettings.Builder getStubSettingsBuilder() {
return ((ApplicationsStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java
index 7f3ee6f43cab..2f032fe7d9fe 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesClient.java
@@ -18,7 +18,6 @@
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;
@@ -108,6 +107,21 @@
* AuthorizedCertificatesClient.create(authorizedCertificatesSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AuthorizedCertificatesSettings authorizedCertificatesSettings =
+ * AuthorizedCertificatesSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * AuthorizedCertificatesSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * AuthorizedCertificatesClient authorizedCertificatesClient =
+ * AuthorizedCertificatesClient.create(authorizedCertificatesSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -133,7 +147,6 @@ public static final AuthorizedCertificatesClient create(AuthorizedCertificatesSe
* Constructs an instance of AuthorizedCertificatesClient, using the given stub for making calls.
* This is for advanced usage - prefer using create(AuthorizedCertificatesSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final AuthorizedCertificatesClient create(AuthorizedCertificatesStub stub) {
return new AuthorizedCertificatesClient(stub);
}
@@ -149,7 +162,6 @@ protected AuthorizedCertificatesClient(AuthorizedCertificatesSettings settings)
this.stub = ((AuthorizedCertificatesStubSettings) settings.getStubSettings()).createStub();
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected AuthorizedCertificatesClient(AuthorizedCertificatesStub stub) {
this.settings = null;
this.stub = stub;
@@ -159,7 +171,6 @@ public final AuthorizedCertificatesSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public AuthorizedCertificatesStub getStub() {
return stub;
}
@@ -253,7 +264,7 @@ public final ListAuthorizedCertificatesPagedResponse listAuthorizedCertificates(
* while (true) {
* ListAuthorizedCertificatesResponse response =
* authorizedCertificatesClient.listAuthorizedCertificatesCallable().call(request);
- * for (AuthorizedCertificate element : response.getResponsesList()) {
+ * for (AuthorizedCertificate element : response.getCertificatesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java
index bd859c29b073..42213f60991f 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedCertificatesSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -136,11 +137,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return AuthorizedCertificatesStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return AuthorizedCertificatesStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return AuthorizedCertificatesStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return AuthorizedCertificatesStubSettings.defaultTransportChannelProvider();
}
@@ -150,11 +158,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return AuthorizedCertificatesStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -193,6 +207,11 @@ private static Builder createDefault() {
return new Builder(AuthorizedCertificatesStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(AuthorizedCertificatesStubSettings.newHttpJsonBuilder());
+ }
+
public AuthorizedCertificatesStubSettings.Builder getStubSettingsBuilder() {
return ((AuthorizedCertificatesStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java
index 431aa52f1531..dea2e3282a6a 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsClient.java
@@ -18,7 +18,6 @@
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;
@@ -110,6 +109,21 @@
* AuthorizedDomainsClient.create(authorizedDomainsSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * AuthorizedDomainsSettings authorizedDomainsSettings =
+ * AuthorizedDomainsSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * AuthorizedDomainsSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * AuthorizedDomainsClient authorizedDomainsClient =
+ * AuthorizedDomainsClient.create(authorizedDomainsSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -135,7 +149,6 @@ public static final AuthorizedDomainsClient create(AuthorizedDomainsSettings set
* Constructs an instance of AuthorizedDomainsClient, using the given stub for making calls. This
* is for advanced usage - prefer using create(AuthorizedDomainsSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final AuthorizedDomainsClient create(AuthorizedDomainsStub stub) {
return new AuthorizedDomainsClient(stub);
}
@@ -150,7 +163,6 @@ protected AuthorizedDomainsClient(AuthorizedDomainsSettings settings) throws IOE
this.stub = ((AuthorizedDomainsStubSettings) settings.getStubSettings()).createStub();
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected AuthorizedDomainsClient(AuthorizedDomainsStub stub) {
this.settings = null;
this.stub = stub;
@@ -160,7 +172,6 @@ public final AuthorizedDomainsSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public AuthorizedDomainsStub getStub() {
return stub;
}
@@ -245,7 +256,7 @@ public final ListAuthorizedDomainsPagedResponse listAuthorizedDomains(
* while (true) {
* ListAuthorizedDomainsResponse response =
* authorizedDomainsClient.listAuthorizedDomainsCallable().call(request);
- * for (AuthorizedDomain element : response.getResponsesList()) {
+ * for (AuthorizedDomain element : response.getDomainsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java
index 35cd464d86df..762544736cf1 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/AuthorizedDomainsSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -105,11 +106,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return AuthorizedDomainsStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return AuthorizedDomainsStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return AuthorizedDomainsStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return AuthorizedDomainsStubSettings.defaultTransportChannelProvider();
}
@@ -119,11 +127,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return AuthorizedDomainsStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -161,6 +175,11 @@ private static Builder createDefault() {
return new Builder(AuthorizedDomainsStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(AuthorizedDomainsStubSettings.newHttpJsonBuilder());
+ }
+
public AuthorizedDomainsStubSettings.Builder getStubSettingsBuilder() {
return ((AuthorizedDomainsStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java
index 4e081faaa81d..3ed91d0eeac5 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsClient.java
@@ -20,6 +20,7 @@
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;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -31,7 +32,6 @@
import com.google.appengine.v1.stub.DomainMappingsStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -103,13 +103,28 @@
* DomainMappingsClient domainMappingsClient = DomainMappingsClient.create(domainMappingsSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DomainMappingsSettings domainMappingsSettings =
+ * DomainMappingsSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * DomainMappingsSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * DomainMappingsClient domainMappingsClient = DomainMappingsClient.create(domainMappingsSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class DomainMappingsClient implements BackgroundResource {
private final DomainMappingsSettings settings;
private final DomainMappingsStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of DomainMappingsClient with default settings. */
public static final DomainMappingsClient create() throws IOException {
@@ -129,7 +144,6 @@ public static final DomainMappingsClient create(DomainMappingsSettings settings)
* Constructs an instance of DomainMappingsClient, using the given stub for making calls. This is
* for advanced usage - prefer using create(DomainMappingsSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final DomainMappingsClient create(DomainMappingsStub stub) {
return new DomainMappingsClient(stub);
}
@@ -142,21 +156,23 @@ public static final DomainMappingsClient create(DomainMappingsStub stub) {
protected DomainMappingsClient(DomainMappingsSettings settings) throws IOException {
this.settings = settings;
this.stub = ((DomainMappingsStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected DomainMappingsClient(DomainMappingsStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final DomainMappingsSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public DomainMappingsStub getStub() {
return stub;
}
@@ -165,10 +181,19 @@ public DomainMappingsStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * 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;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the domain mappings on an application.
@@ -248,7 +273,7 @@ public final ListDomainMappingsPagedResponse listDomainMappings(
* while (true) {
* ListDomainMappingsResponse response =
* domainMappingsClient.listDomainMappingsCallable().call(request);
- * for (DomainMapping element : response.getResponsesList()) {
+ * for (DomainMapping element : response.getDomainMappingsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java
index cd13c6231e4d..b8e6265c2e9b 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/DomainMappingsSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -144,11 +145,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return DomainMappingsStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return DomainMappingsStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return DomainMappingsStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return DomainMappingsStubSettings.defaultTransportChannelProvider();
}
@@ -158,11 +166,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return DomainMappingsStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -200,6 +214,11 @@ private static Builder createDefault() {
return new Builder(DomainMappingsStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(DomainMappingsStubSettings.newHttpJsonBuilder());
+ }
+
public DomainMappingsStubSettings.Builder getStubSettingsBuilder() {
return ((DomainMappingsStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java
index d73c5a8b583a..05317b9cdf8a 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallClient.java
@@ -18,7 +18,6 @@
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;
@@ -111,6 +110,20 @@
* FirewallClient firewallClient = FirewallClient.create(firewallSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * FirewallSettings firewallSettings =
+ * FirewallSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * FirewallSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * FirewallClient firewallClient = FirewallClient.create(firewallSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -135,7 +148,6 @@ public static final FirewallClient create(FirewallSettings settings) throws IOEx
* Constructs an instance of FirewallClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(FirewallSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final FirewallClient create(FirewallStub stub) {
return new FirewallClient(stub);
}
@@ -149,7 +161,6 @@ protected FirewallClient(FirewallSettings settings) throws IOException {
this.stub = ((FirewallStubSettings) settings.getStubSettings()).createStub();
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected FirewallClient(FirewallStub stub) {
this.settings = null;
this.stub = stub;
@@ -159,7 +170,6 @@ public final FirewallSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public FirewallStub getStub() {
return stub;
}
@@ -244,7 +254,7 @@ public final ListIngressRulesPagedResponse listIngressRules(ListIngressRulesRequ
* .build();
* while (true) {
* ListIngressRulesResponse response = firewallClient.listIngressRulesCallable().call(request);
- * for (FirewallRule element : response.getResponsesList()) {
+ * for (FirewallRule element : response.getIngressRulesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java
index 0898e161d7cc..cf6191be100c 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/FirewallSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -129,11 +130,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return FirewallStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return FirewallStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return FirewallStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return FirewallStubSettings.defaultTransportChannelProvider();
}
@@ -143,11 +151,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return FirewallStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -185,6 +199,11 @@ private static Builder createDefault() {
return new Builder(FirewallStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(FirewallStubSettings.newHttpJsonBuilder());
+ }
+
public FirewallStubSettings.Builder getStubSettingsBuilder() {
return ((FirewallStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java
index 322ddddcead2..53c0aa810dfa 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesClient.java
@@ -20,6 +20,7 @@
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;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -31,7 +32,6 @@
import com.google.appengine.v1.stub.InstancesStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -102,13 +102,28 @@
* InstancesClient instancesClient = InstancesClient.create(instancesSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * InstancesSettings instancesSettings =
+ * InstancesSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * InstancesSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * InstancesClient instancesClient = InstancesClient.create(instancesSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class InstancesClient implements BackgroundResource {
private final InstancesSettings settings;
private final InstancesStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of InstancesClient with default settings. */
public static final InstancesClient create() throws IOException {
@@ -127,7 +142,6 @@ public static final InstancesClient create(InstancesSettings settings) throws IO
* Constructs an instance of InstancesClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(InstancesSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final InstancesClient create(InstancesStub stub) {
return new InstancesClient(stub);
}
@@ -139,21 +153,23 @@ public static final InstancesClient create(InstancesStub stub) {
protected InstancesClient(InstancesSettings settings) throws IOException {
this.settings = settings;
this.stub = ((InstancesStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected InstancesClient(InstancesStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final InstancesSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public InstancesStub getStub() {
return stub;
}
@@ -162,10 +178,19 @@ public InstancesStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * 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;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the instances of a version.
@@ -251,7 +276,7 @@ public final ListInstancesPagedResponse listInstances(ListInstancesRequest reque
* .build();
* while (true) {
* ListInstancesResponse response = instancesClient.listInstancesCallable().call(request);
- * for (Instance element : response.getResponsesList()) {
+ * for (Instance element : response.getInstancesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java
index 192c896b3c4d..4c0c3f03561d 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/InstancesSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -130,11 +131,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return InstancesStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstancesStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstancesStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return InstancesStubSettings.defaultTransportChannelProvider();
}
@@ -144,11 +152,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return InstancesStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -186,6 +200,11 @@ private static Builder createDefault() {
return new Builder(InstancesStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(InstancesStubSettings.newHttpJsonBuilder());
+ }
+
public InstancesStubSettings.Builder getStubSettingsBuilder() {
return ((InstancesStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java
index 5b45701072c3..ccbf0f8b7752 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesClient.java
@@ -20,6 +20,7 @@
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;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -31,7 +32,6 @@
import com.google.appengine.v1.stub.ServicesStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -102,13 +102,28 @@
* ServicesClient servicesClient = ServicesClient.create(servicesSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ServicesSettings servicesSettings =
+ * ServicesSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * ServicesSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * ServicesClient servicesClient = ServicesClient.create(servicesSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class ServicesClient implements BackgroundResource {
private final ServicesSettings settings;
private final ServicesStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of ServicesClient with default settings. */
public static final ServicesClient create() throws IOException {
@@ -127,7 +142,6 @@ public static final ServicesClient create(ServicesSettings settings) throws IOEx
* Constructs an instance of ServicesClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(ServicesSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final ServicesClient create(ServicesStub stub) {
return new ServicesClient(stub);
}
@@ -139,21 +153,23 @@ public static final ServicesClient create(ServicesStub stub) {
protected ServicesClient(ServicesSettings settings) throws IOException {
this.settings = settings;
this.stub = ((ServicesStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected ServicesClient(ServicesStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final ServicesSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ServicesStub getStub() {
return stub;
}
@@ -162,10 +178,19 @@ public ServicesStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * 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;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists all the services in the application.
@@ -242,7 +267,7 @@ public final ListServicesPagedResponse listServices(ListServicesRequest request)
* .build();
* while (true) {
* ListServicesResponse response = servicesClient.listServicesCallable().call(request);
- * for (Service element : response.getResponsesList()) {
+ * for (Service element : response.getServicesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java
index 8a795c729c53..f6223acf95ca 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/ServicesSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -130,11 +131,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return ServicesStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return ServicesStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return ServicesStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return ServicesStubSettings.defaultTransportChannelProvider();
}
@@ -144,11 +152,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return ServicesStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -186,6 +200,11 @@ private static Builder createDefault() {
return new Builder(ServicesStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(ServicesStubSettings.newHttpJsonBuilder());
+ }
+
public ServicesStubSettings.Builder getStubSettingsBuilder() {
return ((ServicesStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java
index f9f6f0481eec..05977fc70a8a 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsClient.java
@@ -20,6 +20,7 @@
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;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -31,7 +32,6 @@
import com.google.appengine.v1.stub.VersionsStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -106,13 +106,28 @@
* VersionsClient versionsClient = VersionsClient.create(versionsSettings);
* }
*
+ *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
+ * the wire:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * VersionsSettings versionsSettings =
+ * VersionsSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * VersionsSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * VersionsClient versionsClient = VersionsClient.create(versionsSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class VersionsClient implements BackgroundResource {
private final VersionsSettings settings;
private final VersionsStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of VersionsClient with default settings. */
public static final VersionsClient create() throws IOException {
@@ -131,7 +146,6 @@ public static final VersionsClient create(VersionsSettings settings) throws IOEx
* Constructs an instance of VersionsClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(VersionsSettings).
*/
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final VersionsClient create(VersionsStub stub) {
return new VersionsClient(stub);
}
@@ -143,21 +157,23 @@ public static final VersionsClient create(VersionsStub stub) {
protected VersionsClient(VersionsSettings settings) throws IOException {
this.settings = settings;
this.stub = ((VersionsStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
protected VersionsClient(VersionsStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final VersionsSettings getSettings() {
return settings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public VersionsStub getStub() {
return stub;
}
@@ -166,10 +182,19 @@ public VersionsStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
+ /**
+ * 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;
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists the versions of a service.
@@ -249,7 +274,7 @@ public final ListVersionsPagedResponse listVersions(ListVersionsRequest request)
* .build();
* while (true) {
* ListVersionsResponse response = versionsClient.listVersionsCallable().call(request);
- * for (Version element : response.getResponsesList()) {
+ * for (Version element : response.getVersionsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java
index 7e06dff7e1f3..3cf4141de9cf 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/VersionsSettings.java
@@ -23,6 +23,7 @@
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.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -141,11 +142,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return VersionsStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return VersionsStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return VersionsStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return VersionsStubSettings.defaultTransportChannelProvider();
}
@@ -155,11 +163,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return VersionsStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -197,6 +211,11 @@ private static Builder createDefault() {
return new Builder(VersionsStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(VersionsStubSettings.newHttpJsonBuilder());
+ }
+
public VersionsStubSettings.Builder getStubSettingsBuilder() {
return ((VersionsStubSettings.Builder) getStubSettings());
}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java
index 714a4ed6ca4b..9164550076cf 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStub.java
@@ -39,7 +39,11 @@
public abstract class ApplicationsStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public UnaryCallable getApplicationCallable() {
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java
index 09a787f25070..854cd87fd0d5 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/ApplicationsStubSettings.java
@@ -25,6 +25,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -144,13 +147,17 @@ public UnaryCallSettings repairApplicationS
return repairApplicationOperationSettings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ApplicationsStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcApplicationsStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonApplicationsStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -183,18 +190,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
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() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(ApplicationsStubSettings.class))
@@ -202,11 +216,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(ApplicationsStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ApplicationsStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -335,6 +368,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.getApplicationSettings()
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java
index 59190f6520b9..ff1a841b71ec 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedCertificatesStubSettings.java
@@ -27,6 +27,9 @@
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.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
@@ -227,13 +230,17 @@ public ApiFuture getFuturePagedResponse
return deleteAuthorizedCertificateSettings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public AuthorizedCertificatesStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcAuthorizedCertificatesStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonAuthorizedCertificatesStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -266,18 +273,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
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() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(AuthorizedCertificatesStubSettings.class))
@@ -285,11 +299,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(AuthorizedCertificatesStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return AuthorizedCertificatesStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -418,6 +451,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listAuthorizedCertificatesSettings()
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java
index 24f0a5b978b2..31db72663957 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/AuthorizedDomainsStubSettings.java
@@ -27,6 +27,9 @@
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.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
@@ -177,13 +180,17 @@ public ApiFuture getFuturePagedResponse(
return listAuthorizedDomainsSettings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public AuthorizedDomainsStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcAuthorizedDomainsStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonAuthorizedDomainsStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -216,18 +223,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
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() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(AuthorizedDomainsStubSettings.class))
@@ -235,11 +249,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(AuthorizedDomainsStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return AuthorizedDomainsStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -328,6 +361,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listAuthorizedDomainsSettings()
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java
index a69ff29ec123..5be7f2f74849 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStub.java
@@ -44,7 +44,11 @@
public abstract class DomainMappingsStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public UnaryCallable
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java
index d927ef3742de..b069005137ba 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/DomainMappingsStubSettings.java
@@ -28,6 +28,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -232,13 +235,17 @@ public UnaryCallSettings deleteDomainMapp
return deleteDomainMappingOperationSettings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public DomainMappingsStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcDomainMappingsStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonDomainMappingsStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -271,18 +278,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
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() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(DomainMappingsStubSettings.class))
@@ -290,11 +304,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(DomainMappingsStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return DomainMappingsStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -434,6 +467,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listDomainMappingsSettings()
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java
index 6dfdc8e267bf..90e5ee7cc9aa 100644
--- a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/FirewallStubSettings.java
@@ -27,6 +27,9 @@
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.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
@@ -204,13 +207,17 @@ public UnaryCallSettings deleteIngressRuleSetti
return deleteIngressRuleSettings;
}
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public FirewallStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcFirewallStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonFirewallStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -243,29 +250,54 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
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() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(FirewallStubSettings.class))
.setTransportToken(
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(FirewallStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return FirewallStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -389,6 +421,19 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.listIngressRulesSettings()
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsCallableFactory.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsCallableFactory.java
new file mode 100644
index 000000000000..5679e8bb93bd
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsCallableFactory.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.appengine.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+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.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the Applications service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonApplicationsCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsStub.java
new file mode 100644
index 000000000000..0a58e58777f3
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonApplicationsStub.java
@@ -0,0 +1,420 @@
+/*
+ * 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.appengine.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.appengine.v1.Application;
+import com.google.appengine.v1.CreateApplicationRequest;
+import com.google.appengine.v1.GetApplicationRequest;
+import com.google.appengine.v1.OperationMetadataV1;
+import com.google.appengine.v1.RepairApplicationRequest;
+import com.google.appengine.v1.UpdateApplicationRequest;
+import com.google.longrunning.Operation;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the Applications service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonApplicationsStub extends ApplicationsStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(Application.getDescriptor())
+ .add(OperationMetadataV1.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getApplicationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.Applications/GetApplication")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Application.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ createApplicationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.Applications/CreateApplication")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/apps",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("application", request.getApplication()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (CreateApplicationRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ updateApplicationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.Applications/UpdateApplication")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("application", request.getApplication()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (UpdateApplicationRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private static final ApiMethodDescriptor
+ repairApplicationMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.Applications/RepairApplication")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*}:repair",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("*", request.toBuilder().clearName().build()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Operation.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .setOperationSnapshotFactory(
+ (RepairApplicationRequest request, Operation response) ->
+ HttpJsonOperationSnapshot.create(response))
+ .build();
+
+ private final UnaryCallable getApplicationCallable;
+ private final UnaryCallable createApplicationCallable;
+ private final OperationCallable
+ createApplicationOperationCallable;
+ private final UnaryCallable updateApplicationCallable;
+ private final OperationCallable
+ updateApplicationOperationCallable;
+ private final UnaryCallable repairApplicationCallable;
+ private final OperationCallable
+ repairApplicationOperationCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonOperationsStub httpJsonOperationsStub;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonApplicationsStub create(ApplicationsStubSettings settings)
+ throws IOException {
+ return new HttpJsonApplicationsStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonApplicationsStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonApplicationsStub(
+ ApplicationsStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonApplicationsStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonApplicationsStub(
+ ApplicationsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonApplicationsStub, 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 HttpJsonApplicationsStub(ApplicationsStubSettings settings, ClientContext clientContext)
+ throws IOException {
+ this(settings, clientContext, new HttpJsonApplicationsCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonApplicationsStub, 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 HttpJsonApplicationsStub(
+ ApplicationsStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+ this.httpJsonOperationsStub =
+ HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry);
+
+ HttpJsonCallSettings getApplicationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(getApplicationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings createApplicationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(createApplicationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings updateApplicationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(updateApplicationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings repairApplicationTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(repairApplicationMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+
+ this.getApplicationCallable =
+ callableFactory.createUnaryCallable(
+ getApplicationTransportSettings, settings.getApplicationSettings(), clientContext);
+ this.createApplicationCallable =
+ callableFactory.createUnaryCallable(
+ createApplicationTransportSettings,
+ settings.createApplicationSettings(),
+ clientContext);
+ this.createApplicationOperationCallable =
+ callableFactory.createOperationCallable(
+ createApplicationTransportSettings,
+ settings.createApplicationOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.updateApplicationCallable =
+ callableFactory.createUnaryCallable(
+ updateApplicationTransportSettings,
+ settings.updateApplicationSettings(),
+ clientContext);
+ this.updateApplicationOperationCallable =
+ callableFactory.createOperationCallable(
+ updateApplicationTransportSettings,
+ settings.updateApplicationOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+ this.repairApplicationCallable =
+ callableFactory.createUnaryCallable(
+ repairApplicationTransportSettings,
+ settings.repairApplicationSettings(),
+ clientContext);
+ this.repairApplicationOperationCallable =
+ callableFactory.createOperationCallable(
+ repairApplicationTransportSettings,
+ settings.repairApplicationOperationSettings(),
+ clientContext,
+ httpJsonOperationsStub);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(getApplicationMethodDescriptor);
+ methodDescriptors.add(createApplicationMethodDescriptor);
+ methodDescriptors.add(updateApplicationMethodDescriptor);
+ methodDescriptors.add(repairApplicationMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ public HttpJsonOperationsStub getHttpJsonOperationsStub() {
+ return httpJsonOperationsStub;
+ }
+
+ @Override
+ public UnaryCallable getApplicationCallable() {
+ return getApplicationCallable;
+ }
+
+ @Override
+ public UnaryCallable createApplicationCallable() {
+ return createApplicationCallable;
+ }
+
+ @Override
+ public OperationCallable
+ createApplicationOperationCallable() {
+ return createApplicationOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable updateApplicationCallable() {
+ return updateApplicationCallable;
+ }
+
+ @Override
+ public OperationCallable
+ updateApplicationOperationCallable() {
+ return updateApplicationOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable repairApplicationCallable() {
+ return repairApplicationCallable;
+ }
+
+ @Override
+ public OperationCallable
+ repairApplicationOperationCallable() {
+ return repairApplicationOperationCallable;
+ }
+
+ @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/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesCallableFactory.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesCallableFactory.java
new file mode 100644
index 000000000000..091a93665afc
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesCallableFactory.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.appengine.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+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.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the AuthorizedCertificates service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonAuthorizedCertificatesCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesStub.java
new file mode 100644
index 000000000000..f2f3b863dfd7
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedCertificatesStub.java
@@ -0,0 +1,458 @@
+/*
+ * 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.appengine.v1.stub;
+
+import static com.google.appengine.v1.AuthorizedCertificatesClient.ListAuthorizedCertificatesPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.appengine.v1.AuthorizedCertificate;
+import com.google.appengine.v1.CreateAuthorizedCertificateRequest;
+import com.google.appengine.v1.DeleteAuthorizedCertificateRequest;
+import com.google.appengine.v1.GetAuthorizedCertificateRequest;
+import com.google.appengine.v1.ListAuthorizedCertificatesRequest;
+import com.google.appengine.v1.ListAuthorizedCertificatesResponse;
+import com.google.appengine.v1.UpdateAuthorizedCertificateRequest;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the AuthorizedCertificates service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonAuthorizedCertificatesStub extends AuthorizedCertificatesStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor<
+ ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesResponse>
+ listAuthorizedCertificatesMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.appengine.v1.AuthorizedCertificates/ListAuthorizedCertificates")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=apps/*}/authorizedCertificates",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(fields, "view", request.getView());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListAuthorizedCertificatesResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getAuthorizedCertificateMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.appengine.v1.AuthorizedCertificates/GetAuthorizedCertificate")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*/authorizedCertificates/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "view", request.getView());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuthorizedCertificate.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ CreateAuthorizedCertificateRequest, AuthorizedCertificate>
+ createAuthorizedCertificateMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.appengine.v1.AuthorizedCertificates/CreateAuthorizedCertificate")
+ .setHttpMethod("POST")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=apps/*}/authorizedCertificates",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("certificate", request.getCertificate()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuthorizedCertificate.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor<
+ UpdateAuthorizedCertificateRequest, AuthorizedCertificate>
+ updateAuthorizedCertificateMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName(
+ "google.appengine.v1.AuthorizedCertificates/UpdateAuthorizedCertificate")
+ .setHttpMethod("PATCH")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*/authorizedCertificates/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "updateMask", request.getUpdateMask());
+ return fields;
+ })
+ .setRequestBodyExtractor(
+ request ->
+ ProtoRestSerializer.create()
+ .toBody("certificate", request.getCertificate()))
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(AuthorizedCertificate.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ deleteAuthorizedCertificateMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName(
+ "google.appengine.v1.AuthorizedCertificates/DeleteAuthorizedCertificate")
+ .setHttpMethod("DELETE")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{name=apps/*/authorizedCertificates/*}",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "name", request.getName());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(Empty.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private final UnaryCallable
+ listAuthorizedCertificatesCallable;
+ private final UnaryCallable<
+ ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesPagedResponse>
+ listAuthorizedCertificatesPagedCallable;
+ private final UnaryCallable
+ getAuthorizedCertificateCallable;
+ private final UnaryCallable
+ createAuthorizedCertificateCallable;
+ private final UnaryCallable
+ updateAuthorizedCertificateCallable;
+ private final UnaryCallable
+ deleteAuthorizedCertificateCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonAuthorizedCertificatesStub create(
+ AuthorizedCertificatesStubSettings settings) throws IOException {
+ return new HttpJsonAuthorizedCertificatesStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonAuthorizedCertificatesStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonAuthorizedCertificatesStub(
+ AuthorizedCertificatesStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonAuthorizedCertificatesStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonAuthorizedCertificatesStub(
+ AuthorizedCertificatesStubSettings.newHttpJsonBuilder().build(),
+ clientContext,
+ callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonAuthorizedCertificatesStub, 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 HttpJsonAuthorizedCertificatesStub(
+ AuthorizedCertificatesStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new HttpJsonAuthorizedCertificatesCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonAuthorizedCertificatesStub, 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 HttpJsonAuthorizedCertificatesStub(
+ AuthorizedCertificatesStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+
+ HttpJsonCallSettings
+ listAuthorizedCertificatesTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listAuthorizedCertificatesMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ getAuthorizedCertificateTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(getAuthorizedCertificateMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ createAuthorizedCertificateTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(createAuthorizedCertificateMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ updateAuthorizedCertificateTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(updateAuthorizedCertificateMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+ HttpJsonCallSettings
+ deleteAuthorizedCertificateTransportSettings =
+ HttpJsonCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAuthorizedCertificateMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+
+ this.listAuthorizedCertificatesCallable =
+ callableFactory.createUnaryCallable(
+ listAuthorizedCertificatesTransportSettings,
+ settings.listAuthorizedCertificatesSettings(),
+ clientContext);
+ this.listAuthorizedCertificatesPagedCallable =
+ callableFactory.createPagedCallable(
+ listAuthorizedCertificatesTransportSettings,
+ settings.listAuthorizedCertificatesSettings(),
+ clientContext);
+ this.getAuthorizedCertificateCallable =
+ callableFactory.createUnaryCallable(
+ getAuthorizedCertificateTransportSettings,
+ settings.getAuthorizedCertificateSettings(),
+ clientContext);
+ this.createAuthorizedCertificateCallable =
+ callableFactory.createUnaryCallable(
+ createAuthorizedCertificateTransportSettings,
+ settings.createAuthorizedCertificateSettings(),
+ clientContext);
+ this.updateAuthorizedCertificateCallable =
+ callableFactory.createUnaryCallable(
+ updateAuthorizedCertificateTransportSettings,
+ settings.updateAuthorizedCertificateSettings(),
+ clientContext);
+ this.deleteAuthorizedCertificateCallable =
+ callableFactory.createUnaryCallable(
+ deleteAuthorizedCertificateTransportSettings,
+ settings.deleteAuthorizedCertificateSettings(),
+ clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(listAuthorizedCertificatesMethodDescriptor);
+ methodDescriptors.add(getAuthorizedCertificateMethodDescriptor);
+ methodDescriptors.add(createAuthorizedCertificateMethodDescriptor);
+ methodDescriptors.add(updateAuthorizedCertificateMethodDescriptor);
+ methodDescriptors.add(deleteAuthorizedCertificateMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedCertificatesCallable() {
+ return listAuthorizedCertificatesCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedCertificatesPagedCallable() {
+ return listAuthorizedCertificatesPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ getAuthorizedCertificateCallable() {
+ return getAuthorizedCertificateCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ createAuthorizedCertificateCallable() {
+ return createAuthorizedCertificateCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ updateAuthorizedCertificateCallable() {
+ return updateAuthorizedCertificateCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ deleteAuthorizedCertificateCallable() {
+ return deleteAuthorizedCertificateCallable;
+ }
+
+ @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/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsCallableFactory.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsCallableFactory.java
new file mode 100644
index 000000000000..bef6379cfab3
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsCallableFactory.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.appengine.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+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.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the AuthorizedDomains service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonAuthorizedDomainsCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsStub.java
new file mode 100644
index 000000000000..b9f6a5ca30d7
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonAuthorizedDomainsStub.java
@@ -0,0 +1,216 @@
+/*
+ * 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.appengine.v1.stub;
+
+import static com.google.appengine.v1.AuthorizedDomainsClient.ListAuthorizedDomainsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.appengine.v1.ListAuthorizedDomainsRequest;
+import com.google.appengine.v1.ListAuthorizedDomainsResponse;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the AuthorizedDomains service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonAuthorizedDomainsStub extends AuthorizedDomainsStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor<
+ ListAuthorizedDomainsRequest, ListAuthorizedDomainsResponse>
+ listAuthorizedDomainsMethodDescriptor =
+ ApiMethodDescriptor
+ .newBuilder()
+ .setFullMethodName("google.appengine.v1.AuthorizedDomains/ListAuthorizedDomains")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=apps/*}/authorizedDomains",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListAuthorizedDomainsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private final UnaryCallable
+ listAuthorizedDomainsCallable;
+ private final UnaryCallable
+ listAuthorizedDomainsPagedCallable;
+
+ private final BackgroundResource backgroundResources;
+ private final HttpJsonStubCallableFactory callableFactory;
+
+ public static final HttpJsonAuthorizedDomainsStub create(AuthorizedDomainsStubSettings settings)
+ throws IOException {
+ return new HttpJsonAuthorizedDomainsStub(settings, ClientContext.create(settings));
+ }
+
+ public static final HttpJsonAuthorizedDomainsStub create(ClientContext clientContext)
+ throws IOException {
+ return new HttpJsonAuthorizedDomainsStub(
+ AuthorizedDomainsStubSettings.newHttpJsonBuilder().build(), clientContext);
+ }
+
+ public static final HttpJsonAuthorizedDomainsStub create(
+ ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException {
+ return new HttpJsonAuthorizedDomainsStub(
+ AuthorizedDomainsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory);
+ }
+
+ /**
+ * Constructs an instance of HttpJsonAuthorizedDomainsStub, 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 HttpJsonAuthorizedDomainsStub(
+ AuthorizedDomainsStubSettings settings, ClientContext clientContext) throws IOException {
+ this(settings, clientContext, new HttpJsonAuthorizedDomainsCallableFactory());
+ }
+
+ /**
+ * Constructs an instance of HttpJsonAuthorizedDomainsStub, 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 HttpJsonAuthorizedDomainsStub(
+ AuthorizedDomainsStubSettings settings,
+ ClientContext clientContext,
+ HttpJsonStubCallableFactory callableFactory)
+ throws IOException {
+ this.callableFactory = callableFactory;
+
+ HttpJsonCallSettings
+ listAuthorizedDomainsTransportSettings =
+ HttpJsonCallSettings
+ .newBuilder()
+ .setMethodDescriptor(listAuthorizedDomainsMethodDescriptor)
+ .setTypeRegistry(typeRegistry)
+ .build();
+
+ this.listAuthorizedDomainsCallable =
+ callableFactory.createUnaryCallable(
+ listAuthorizedDomainsTransportSettings,
+ settings.listAuthorizedDomainsSettings(),
+ clientContext);
+ this.listAuthorizedDomainsPagedCallable =
+ callableFactory.createPagedCallable(
+ listAuthorizedDomainsTransportSettings,
+ settings.listAuthorizedDomainsSettings(),
+ clientContext);
+
+ this.backgroundResources =
+ new BackgroundResourceAggregation(clientContext.getBackgroundResources());
+ }
+
+ @InternalApi
+ public static List getMethodDescriptors() {
+ List methodDescriptors = new ArrayList<>();
+ methodDescriptors.add(listAuthorizedDomainsMethodDescriptor);
+ return methodDescriptors;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedDomainsCallable() {
+ return listAuthorizedDomainsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedDomainsPagedCallable() {
+ return listAuthorizedDomainsPagedCallable;
+ }
+
+ @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/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsCallableFactory.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsCallableFactory.java
new file mode 100644
index 000000000000..57d7c96182dd
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsCallableFactory.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.appengine.v1.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonCallableFactory;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.longrunning.stub.OperationsStub;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.ClientContext;
+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.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST callable factory implementation for the DomainMappings service API.
+ *
+ * This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonDomainMappingsCallableFactory
+ implements HttpJsonStubCallableFactory {
+
+ @Override
+ public UnaryCallable createUnaryCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ UnaryCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createUnaryCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public
+ UnaryCallable createPagedCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ PagedCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createPagedCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @Override
+ public UnaryCallable createBatchingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ BatchingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createBatchingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ @Override
+ public
+ OperationCallable createOperationCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ OperationCallSettings callSettings,
+ ClientContext clientContext,
+ OperationsStub operationsStub) {
+ UnaryCallable innerCallable =
+ HttpJsonCallableFactory.createBaseUnaryCallable(
+ httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext);
+ HttpJsonOperationSnapshotCallable initialCallable =
+ new HttpJsonOperationSnapshotCallable(
+ innerCallable,
+ httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory());
+ return HttpJsonCallableFactory.createOperationCallable(
+ callSettings, clientContext, operationsStub.longRunningClient(), initialCallable);
+ }
+
+ @Override
+ public
+ ServerStreamingCallable createServerStreamingCallable(
+ HttpJsonCallSettings httpJsonCallSettings,
+ ServerStreamingCallSettings callSettings,
+ ClientContext clientContext) {
+ return HttpJsonCallableFactory.createServerStreamingCallable(
+ httpJsonCallSettings, callSettings, clientContext);
+ }
+}
diff --git a/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsStub.java b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsStub.java
new file mode 100644
index 000000000000..11ca17304b49
--- /dev/null
+++ b/java-appengine-admin/google-cloud-appengine-admin/src/main/java/com/google/appengine/v1/stub/HttpJsonDomainMappingsStub.java
@@ -0,0 +1,497 @@
+/*
+ * 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.appengine.v1.stub;
+
+import static com.google.appengine.v1.DomainMappingsClient.ListDomainMappingsPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.core.BackgroundResourceAggregation;
+import com.google.api.gax.httpjson.ApiMethodDescriptor;
+import com.google.api.gax.httpjson.HttpJsonCallSettings;
+import com.google.api.gax.httpjson.HttpJsonOperationSnapshot;
+import com.google.api.gax.httpjson.HttpJsonStubCallableFactory;
+import com.google.api.gax.httpjson.ProtoMessageRequestFormatter;
+import com.google.api.gax.httpjson.ProtoMessageResponseParser;
+import com.google.api.gax.httpjson.ProtoRestSerializer;
+import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.appengine.v1.CreateDomainMappingRequest;
+import com.google.appengine.v1.DeleteDomainMappingRequest;
+import com.google.appengine.v1.DomainMapping;
+import com.google.appengine.v1.GetDomainMappingRequest;
+import com.google.appengine.v1.ListDomainMappingsRequest;
+import com.google.appengine.v1.ListDomainMappingsResponse;
+import com.google.appengine.v1.OperationMetadataV1;
+import com.google.appengine.v1.UpdateDomainMappingRequest;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Empty;
+import com.google.protobuf.TypeRegistry;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * REST stub implementation for the DomainMappings service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonDomainMappingsStub extends DomainMappingsStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(Empty.getDescriptor())
+ .add(DomainMapping.getDescriptor())
+ .add(OperationMetadataV1.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor
+ listDomainMappingsMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.DomainMappings/ListDomainMappings")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.newBuilder()
+ .setPath(
+ "/v1/{parent=apps/*}/domainMappings",
+ request -> {
+ Map fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putPathParam(fields, "parent", request.getParent());
+ return fields;
+ })
+ .setQueryParamsExtractor(
+ request -> {
+ Map> fields = new HashMap<>();
+ ProtoRestSerializer serializer =
+ ProtoRestSerializer.create();
+ serializer.putQueryParam(fields, "pageSize", request.getPageSize());
+ serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ return fields;
+ })
+ .setRequestBodyExtractor(request -> null)
+ .build())
+ .setResponseParser(
+ ProtoMessageResponseParser.newBuilder()
+ .setDefaultInstance(ListDomainMappingsResponse.getDefaultInstance())
+ .setDefaultTypeRegistry(typeRegistry)
+ .build())
+ .build();
+
+ private static final ApiMethodDescriptor
+ getDomainMappingMethodDescriptor =
+ ApiMethodDescriptor.newBuilder()
+ .setFullMethodName("google.appengine.v1.DomainMappings/GetDomainMapping")
+ .setHttpMethod("GET")
+ .setType(ApiMethodDescriptor.MethodType.UNARY)
+ .setRequestFormatter(
+ ProtoMessageRequestFormatter.