Skip to content
Permalink
Browse files
feat: migrate to java microgenerator (#629)
* chore: migrate java-bigtable to the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 346117305

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Dec 7 10:01:05 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 93519d59c61f0e45e00e8b6f76a7f588f4937183
Source-Link: googleapis/googleapis@93519d5

* chore: update gapic-generator-java to 0.0.8

Committer: @miraleung
PiperOrigin-RevId: 346126713

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Dec 7 10:39:38 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: b8b2f8c288cec1f673bf10aa5008819c1576bf2e
Source-Link: googleapis/googleapis@b8b2f8c

* chore: update gapic-generator-java to 0.0.9

Committer: @miraleung
PiperOrigin-RevId: 346372957

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Dec 8 11:37:30 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 857f70daef9f4c38f042fb3dfb7b8423ae18fd19
Source-Link: googleapis/googleapis@857f70d

* feat: migrate bigtable retry/timeout settings to gRPC's service configs

Committer: @miraleung
PiperOrigin-RevId: 346894665

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Dec 10 16:55:31 2020 -0800
Source-Repo: googleapis/googleapis
Source-Sha: cbbd3170bcf217e36ae72f4ac522449bf861346f
Source-Link: googleapis/googleapis@cbbd317

* chore: update gapic-generator-java to 0.0.18

Committer: @miraleung
PiperOrigin-RevId: 350949863

Source-Author: Google APIs <noreply@google.com>
Source-Date: Sat Jan 9 14:01:49 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 91e206bcfeaf8948ea03fe3cb1b7616108496cd3
Source-Link: googleapis/googleapis@91e206b

* fix: add retryableStatusCodes back to bigtable

Committer: @miraleung
PiperOrigin-RevId: 351852297

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Jan 14 12:19:44 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: df49bfe877fff8c37f60855a7e754b7a4369709e
Source-Link: googleapis/googleapis@df49bfe

* feat: generate sample code in the Java microgenerator

Committer: @miraleung
PiperOrigin-RevId: 356341083

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Feb 8 13:33:28 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 8d8c008e56f1af31d57f75561e0f1848ffb29eeb
Source-Link: googleapis/googleapis@8d8c008

Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com>
  • Loading branch information
yoshi-automation and kolea2 committed Feb 23, 2021
1 parent d2d4a27 commit 60d17dc1d0a0a568a8bdd3bcc1e7491c17142af3
Showing with 6,382 additions and 4,111 deletions.
  1. +788 −658 ...ud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java
  2. +11 −28 ...-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java
  3. +1,424 −1,129 ...cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
  4. +56 −69 ...oud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
  5. +7 −9 ...oud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
  6. +231 −232 ...able/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
  7. +24 −29 ...-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
  8. +423 −430 ...igtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
  9. +18 −19 ...c/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java
  10. +79 −40 ...bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminStub.java
  11. +18 −19 .../src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminCallableFactory.java
  12. +178 −163 ...ud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
  13. +3 −2 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java
  14. +74 −62 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStubSettings.java
  15. +18 −19 ...ud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableCallableFactory.java
  16. +18 −6 google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java
  17. +851 −213 ...igtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClientTest.java
  18. +1,502 −456 ...d-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java
  19. +4 −2 ...le-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdmin.java
  20. +54 −38 ...loud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableInstanceAdminImpl.java
  21. +4 −2 google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdmin.java
  22. +48 −46 ...e-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java
  23. +62 −50 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AppProfileName.java
  24. +70 −55 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BackupName.java
  25. +63 −50 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ClusterName.java
  26. +54 −44 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/InstanceName.java
  27. +54 −44 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/LocationName.java
  28. +46 −40 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ProjectName.java
  29. +72 −55 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/SnapshotName.java
  30. +63 −50 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/TableName.java
  31. +63 −50 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/TableName.java
  32. +2 −2 synth.metadata

Large diffs are not rendered by default.

@@ -5,14 +5,15 @@
* 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
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.cloud.bigtable.admin.v2;

import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
@@ -67,20 +68,19 @@
import java.util.List;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/** For internal use only. */
@Generated("by gapic-generator")
@InternalApi
public class BaseBigtableInstanceAdminSettings
extends ClientSettings<BaseBigtableInstanceAdminSettings> {

/** Returns the object with the settings used for calls to createInstance. */
public UnaryCallSettings<CreateInstanceRequest, Operation> createInstanceSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).createInstanceSettings();
}

/** Returns the object with the settings used for calls to createInstance. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateInstanceRequest, Instance, CreateInstanceMetadata>
createInstanceOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings())
@@ -104,8 +104,6 @@ public UnaryCallSettings<ListInstancesRequest, ListInstancesResponse> listInstan
}

/** Returns the object with the settings used for calls to partialUpdateInstance. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<PartialUpdateInstanceRequest, Instance, UpdateInstanceMetadata>
partialUpdateInstanceOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings())
@@ -123,8 +121,6 @@ public UnaryCallSettings<CreateClusterRequest, Operation> createClusterSettings(
}

/** Returns the object with the settings used for calls to createCluster. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<CreateClusterRequest, Cluster, CreateClusterMetadata>
createClusterOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).createClusterOperationSettings();
@@ -146,8 +142,6 @@ public UnaryCallSettings<Cluster, Operation> updateClusterSettings() {
}

/** Returns the object with the settings used for calls to updateCluster. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<Cluster, Cluster, UpdateClusterMetadata>
updateClusterOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateClusterOperationSettings();
@@ -181,8 +175,6 @@ public UnaryCallSettings<UpdateAppProfileRequest, Operation> updateAppProfileSet
}

/** Returns the object with the settings used for calls to updateAppProfile. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<UpdateAppProfileRequest, AppProfile, UpdateAppProfileMetadata>
updateAppProfileOperationSettings() {
return ((BigtableInstanceAdminStubSettings) getStubSettings())
@@ -271,18 +263,15 @@ protected BaseBigtableInstanceAdminSettings(Builder settingsBuilder) throws IOEx
/** Builder for BaseBigtableInstanceAdminSettings. */
public static class Builder
extends ClientSettings.Builder<BaseBigtableInstanceAdminSettings, Builder> {

protected Builder() throws IOException {
this((ClientContext) null);
this(((ClientContext) null));
}

protected Builder(ClientContext clientContext) {
super(BigtableInstanceAdminStubSettings.newBuilder(clientContext));
}

private static Builder createDefault() {
return new Builder(BigtableInstanceAdminStubSettings.newBuilder());
}

protected Builder(BaseBigtableInstanceAdminSettings settings) {
super(settings.getStubSettings().toBuilder());
}
@@ -291,11 +280,15 @@ protected Builder(BigtableInstanceAdminStubSettings.Builder stubSettings) {
super(stubSettings);
}

private static Builder createDefault() {
return new Builder(BigtableInstanceAdminStubSettings.newBuilder());
}

public BigtableInstanceAdminStubSettings.Builder getStubSettingsBuilder() {
return ((BigtableInstanceAdminStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'
// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
@@ -314,8 +307,6 @@ public UnaryCallSettings.Builder<CreateInstanceRequest, Operation> createInstanc
}

/** Returns the builder for the settings used for calls to createInstance. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateInstanceRequest, Instance, CreateInstanceMetadata>
createInstanceOperationSettings() {
return getStubSettingsBuilder().createInstanceOperationSettings();
@@ -339,8 +330,6 @@ public UnaryCallSettings.Builder<GetInstanceRequest, Instance> getInstanceSettin
}

/** Returns the builder for the settings used for calls to partialUpdateInstance. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
PartialUpdateInstanceRequest, Instance, UpdateInstanceMetadata>
partialUpdateInstanceOperationSettings() {
@@ -358,8 +347,6 @@ public UnaryCallSettings.Builder<CreateClusterRequest, Operation> createClusterS
}

/** Returns the builder for the settings used for calls to createCluster. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<CreateClusterRequest, Cluster, CreateClusterMetadata>
createClusterOperationSettings() {
return getStubSettingsBuilder().createClusterOperationSettings();
@@ -382,8 +369,6 @@ public UnaryCallSettings.Builder<Cluster, Operation> updateClusterSettings() {
}

/** Returns the builder for the settings used for calls to updateCluster. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<Cluster, Cluster, UpdateClusterMetadata>
updateClusterOperationSettings() {
return getStubSettingsBuilder().updateClusterOperationSettings();
@@ -419,8 +404,6 @@ public UnaryCallSettings.Builder<GetAppProfileRequest, AppProfile> getAppProfile
}

/** Returns the builder for the settings used for calls to updateAppProfile. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
UpdateAppProfileRequest, AppProfile, UpdateAppProfileMetadata>
updateAppProfileOperationSettings() {

0 comments on commit 60d17dc

Please sign in to comment.