Skip to content

Commit f127f1a

Browse files
chore: autogenerated updates (#1206)
* feat: AuditConfig for IAM v1 PiperOrigin-RevId: 439356405 Source-Link: googleapis/googleapis@afa2ba1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3e40c17e1510c95fab58fc2143ccb61cceca5989 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2U0MGMxN2UxNTEwYzk1ZmFiNThmYzIxNDNjY2I2MWNjZWNhNTk4OSJ9 docs: Update `cpu_utilization_percent` limit docs: Remove the limitation of all clusters in a CMEK instance must use the same key PiperOrigin-RevId: 438385300 Source-Link: googleapis/googleapis@c59f02e Source-Link: https://github.com/googleapis/googleapis-gen/commit/04d03d17aafa7b4422f73c93600f040542817fcd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDRkMDNkMTdhYWZhN2I0NDIyZjczYzkzNjAwZjA0MDU0MjgxN2ZjZCJ9 feat: Add ListHotTablets API method and protobufs PiperOrigin-RevId: 436758628 Source-Link: googleapis/googleapis@92ab86a Source-Link: https://github.com/googleapis/googleapis-gen/commit/931ef114d5f845abf117bf8e0a29836ca300b694 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMxZWYxMTRkNWY4NDVhYmYxMTdiZjhlMGEyOTgzNmNhMzAwYjY5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(bazel): update version of Protobuf to v3.20.1 PiperOrigin-RevId: 444328399 Source-Link: googleapis/googleapis@c7ca416 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d61705453a62b3ecda78aa30c192840ebc5a8a90 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYxNzA1NDUzYTYyYjNlY2RhNzhhYTMwYzE5Mjg0MGViYzVhOGE5MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4c96d48 commit f127f1a

118 files changed

Lines changed: 6500 additions & 230 deletions

File tree

Some content is hidden

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

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444
import com.google.bigtable.admin.v2.GetAppProfileRequest;
4545
import com.google.bigtable.admin.v2.GetClusterRequest;
4646
import com.google.bigtable.admin.v2.GetInstanceRequest;
47+
import com.google.bigtable.admin.v2.HotTablet;
4748
import com.google.bigtable.admin.v2.Instance;
4849
import com.google.bigtable.admin.v2.InstanceName;
4950
import com.google.bigtable.admin.v2.ListAppProfilesRequest;
5051
import com.google.bigtable.admin.v2.ListAppProfilesResponse;
5152
import com.google.bigtable.admin.v2.ListClustersRequest;
5253
import com.google.bigtable.admin.v2.ListClustersResponse;
54+
import com.google.bigtable.admin.v2.ListHotTabletsRequest;
55+
import com.google.bigtable.admin.v2.ListHotTabletsResponse;
5356
import com.google.bigtable.admin.v2.ListInstancesRequest;
5457
import com.google.bigtable.admin.v2.ListInstancesResponse;
5558
import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata;
@@ -2279,6 +2282,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
22792282
* SetIamPolicyRequest.newBuilder()
22802283
* .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
22812284
* .setPolicy(Policy.newBuilder().build())
2285+
* .setUpdateMask(FieldMask.newBuilder().build())
22822286
* .build();
22832287
* Policy response = baseBigtableInstanceAdminClient.setIamPolicy(request);
22842288
* }
@@ -2304,6 +2308,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
23042308
* SetIamPolicyRequest.newBuilder()
23052309
* .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
23062310
* .setPolicy(Policy.newBuilder().build())
2311+
* .setUpdateMask(FieldMask.newBuilder().build())
23072312
* .build();
23082313
* ApiFuture<Policy> future =
23092314
* baseBigtableInstanceAdminClient.setIamPolicyCallable().futureCall(request);
@@ -2434,6 +2439,166 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
24342439
return stub.testIamPermissionsCallable();
24352440
}
24362441

2442+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2443+
/**
2444+
* Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based
2445+
* on CPU usage.
2446+
*
2447+
* <p>Sample code:
2448+
*
2449+
* <pre>{@code
2450+
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
2451+
* BaseBigtableInstanceAdminClient.create()) {
2452+
* ClusterName parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
2453+
* for (HotTablet element :
2454+
* baseBigtableInstanceAdminClient.listHotTablets(parent).iterateAll()) {
2455+
* // doThingsWith(element);
2456+
* }
2457+
* }
2458+
* }</pre>
2459+
*
2460+
* @param parent Required. The cluster name to list hot tablets. Value is in the following form:
2461+
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
2462+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2463+
*/
2464+
public final ListHotTabletsPagedResponse listHotTablets(ClusterName parent) {
2465+
ListHotTabletsRequest request =
2466+
ListHotTabletsRequest.newBuilder()
2467+
.setParent(parent == null ? null : parent.toString())
2468+
.build();
2469+
return listHotTablets(request);
2470+
}
2471+
2472+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2473+
/**
2474+
* Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based
2475+
* on CPU usage.
2476+
*
2477+
* <p>Sample code:
2478+
*
2479+
* <pre>{@code
2480+
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
2481+
* BaseBigtableInstanceAdminClient.create()) {
2482+
* String parent = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
2483+
* for (HotTablet element :
2484+
* baseBigtableInstanceAdminClient.listHotTablets(parent).iterateAll()) {
2485+
* // doThingsWith(element);
2486+
* }
2487+
* }
2488+
* }</pre>
2489+
*
2490+
* @param parent Required. The cluster name to list hot tablets. Value is in the following form:
2491+
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
2492+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2493+
*/
2494+
public final ListHotTabletsPagedResponse listHotTablets(String parent) {
2495+
ListHotTabletsRequest request = ListHotTabletsRequest.newBuilder().setParent(parent).build();
2496+
return listHotTablets(request);
2497+
}
2498+
2499+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2500+
/**
2501+
* Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based
2502+
* on CPU usage.
2503+
*
2504+
* <p>Sample code:
2505+
*
2506+
* <pre>{@code
2507+
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
2508+
* BaseBigtableInstanceAdminClient.create()) {
2509+
* ListHotTabletsRequest request =
2510+
* ListHotTabletsRequest.newBuilder()
2511+
* .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
2512+
* .setStartTime(Timestamp.newBuilder().build())
2513+
* .setEndTime(Timestamp.newBuilder().build())
2514+
* .setPageSize(883849137)
2515+
* .setPageToken("pageToken873572522")
2516+
* .build();
2517+
* for (HotTablet element :
2518+
* baseBigtableInstanceAdminClient.listHotTablets(request).iterateAll()) {
2519+
* // doThingsWith(element);
2520+
* }
2521+
* }
2522+
* }</pre>
2523+
*
2524+
* @param request The request object containing all of the parameters for the API call.
2525+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2526+
*/
2527+
public final ListHotTabletsPagedResponse listHotTablets(ListHotTabletsRequest request) {
2528+
return listHotTabletsPagedCallable().call(request);
2529+
}
2530+
2531+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2532+
/**
2533+
* Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based
2534+
* on CPU usage.
2535+
*
2536+
* <p>Sample code:
2537+
*
2538+
* <pre>{@code
2539+
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
2540+
* BaseBigtableInstanceAdminClient.create()) {
2541+
* ListHotTabletsRequest request =
2542+
* ListHotTabletsRequest.newBuilder()
2543+
* .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
2544+
* .setStartTime(Timestamp.newBuilder().build())
2545+
* .setEndTime(Timestamp.newBuilder().build())
2546+
* .setPageSize(883849137)
2547+
* .setPageToken("pageToken873572522")
2548+
* .build();
2549+
* ApiFuture<HotTablet> future =
2550+
* baseBigtableInstanceAdminClient.listHotTabletsPagedCallable().futureCall(request);
2551+
* // Do something.
2552+
* for (HotTablet element : future.get().iterateAll()) {
2553+
* // doThingsWith(element);
2554+
* }
2555+
* }
2556+
* }</pre>
2557+
*/
2558+
public final UnaryCallable<ListHotTabletsRequest, ListHotTabletsPagedResponse>
2559+
listHotTabletsPagedCallable() {
2560+
return stub.listHotTabletsPagedCallable();
2561+
}
2562+
2563+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2564+
/**
2565+
* Lists hot tablets in a cluster, within the time range provided. Hot tablets are ordered based
2566+
* on CPU usage.
2567+
*
2568+
* <p>Sample code:
2569+
*
2570+
* <pre>{@code
2571+
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
2572+
* BaseBigtableInstanceAdminClient.create()) {
2573+
* ListHotTabletsRequest request =
2574+
* ListHotTabletsRequest.newBuilder()
2575+
* .setParent(ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString())
2576+
* .setStartTime(Timestamp.newBuilder().build())
2577+
* .setEndTime(Timestamp.newBuilder().build())
2578+
* .setPageSize(883849137)
2579+
* .setPageToken("pageToken873572522")
2580+
* .build();
2581+
* while (true) {
2582+
* ListHotTabletsResponse response =
2583+
* baseBigtableInstanceAdminClient.listHotTabletsCallable().call(request);
2584+
* for (HotTablet element : response.getResponsesList()) {
2585+
* // doThingsWith(element);
2586+
* }
2587+
* String nextPageToken = response.getNextPageToken();
2588+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
2589+
* request = request.toBuilder().setPageToken(nextPageToken).build();
2590+
* } else {
2591+
* break;
2592+
* }
2593+
* }
2594+
* }
2595+
* }</pre>
2596+
*/
2597+
public final UnaryCallable<ListHotTabletsRequest, ListHotTabletsResponse>
2598+
listHotTabletsCallable() {
2599+
return stub.listHotTabletsCallable();
2600+
}
2601+
24372602
@Override
24382603
public final void close() {
24392604
stub.close();
@@ -2540,4 +2705,80 @@ protected ListAppProfilesFixedSizeCollection createCollection(
25402705
return new ListAppProfilesFixedSizeCollection(pages, collectionSize);
25412706
}
25422707
}
2708+
2709+
public static class ListHotTabletsPagedResponse
2710+
extends AbstractPagedListResponse<
2711+
ListHotTabletsRequest,
2712+
ListHotTabletsResponse,
2713+
HotTablet,
2714+
ListHotTabletsPage,
2715+
ListHotTabletsFixedSizeCollection> {
2716+
2717+
public static ApiFuture<ListHotTabletsPagedResponse> createAsync(
2718+
PageContext<ListHotTabletsRequest, ListHotTabletsResponse, HotTablet> context,
2719+
ApiFuture<ListHotTabletsResponse> futureResponse) {
2720+
ApiFuture<ListHotTabletsPage> futurePage =
2721+
ListHotTabletsPage.createEmptyPage().createPageAsync(context, futureResponse);
2722+
return ApiFutures.transform(
2723+
futurePage,
2724+
input -> new ListHotTabletsPagedResponse(input),
2725+
MoreExecutors.directExecutor());
2726+
}
2727+
2728+
private ListHotTabletsPagedResponse(ListHotTabletsPage page) {
2729+
super(page, ListHotTabletsFixedSizeCollection.createEmptyCollection());
2730+
}
2731+
}
2732+
2733+
public static class ListHotTabletsPage
2734+
extends AbstractPage<
2735+
ListHotTabletsRequest, ListHotTabletsResponse, HotTablet, ListHotTabletsPage> {
2736+
2737+
private ListHotTabletsPage(
2738+
PageContext<ListHotTabletsRequest, ListHotTabletsResponse, HotTablet> context,
2739+
ListHotTabletsResponse response) {
2740+
super(context, response);
2741+
}
2742+
2743+
private static ListHotTabletsPage createEmptyPage() {
2744+
return new ListHotTabletsPage(null, null);
2745+
}
2746+
2747+
@Override
2748+
protected ListHotTabletsPage createPage(
2749+
PageContext<ListHotTabletsRequest, ListHotTabletsResponse, HotTablet> context,
2750+
ListHotTabletsResponse response) {
2751+
return new ListHotTabletsPage(context, response);
2752+
}
2753+
2754+
@Override
2755+
public ApiFuture<ListHotTabletsPage> createPageAsync(
2756+
PageContext<ListHotTabletsRequest, ListHotTabletsResponse, HotTablet> context,
2757+
ApiFuture<ListHotTabletsResponse> futureResponse) {
2758+
return super.createPageAsync(context, futureResponse);
2759+
}
2760+
}
2761+
2762+
public static class ListHotTabletsFixedSizeCollection
2763+
extends AbstractFixedSizeCollection<
2764+
ListHotTabletsRequest,
2765+
ListHotTabletsResponse,
2766+
HotTablet,
2767+
ListHotTabletsPage,
2768+
ListHotTabletsFixedSizeCollection> {
2769+
2770+
private ListHotTabletsFixedSizeCollection(List<ListHotTabletsPage> pages, int collectionSize) {
2771+
super(pages, collectionSize);
2772+
}
2773+
2774+
private static ListHotTabletsFixedSizeCollection createEmptyCollection() {
2775+
return new ListHotTabletsFixedSizeCollection(null, 0);
2776+
}
2777+
2778+
@Override
2779+
protected ListHotTabletsFixedSizeCollection createCollection(
2780+
List<ListHotTabletsPage> pages, int collectionSize) {
2781+
return new ListHotTabletsFixedSizeCollection(pages, collectionSize);
2782+
}
2783+
}
25432784
}

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.bigtable.admin.v2;
1818

1919
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
20+
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse;
2021

2122
import com.google.api.core.ApiFunction;
2223
import com.google.api.core.BetaApi;
@@ -49,6 +50,8 @@
4950
import com.google.bigtable.admin.v2.ListAppProfilesResponse;
5051
import com.google.bigtable.admin.v2.ListClustersRequest;
5152
import com.google.bigtable.admin.v2.ListClustersResponse;
53+
import com.google.bigtable.admin.v2.ListHotTabletsRequest;
54+
import com.google.bigtable.admin.v2.ListHotTabletsResponse;
5255
import com.google.bigtable.admin.v2.ListInstancesRequest;
5356
import com.google.bigtable.admin.v2.ListInstancesResponse;
5457
import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata;
@@ -216,6 +219,13 @@ public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() {
216219
return ((BigtableInstanceAdminStubSettings) getStubSettings()).testIamPermissionsSettings();
217220
}
218221

222+
/** Returns the object with the settings used for calls to listHotTablets. */
223+
public PagedCallSettings<
224+
ListHotTabletsRequest, ListHotTabletsResponse, ListHotTabletsPagedResponse>
225+
listHotTabletsSettings() {
226+
return ((BigtableInstanceAdminStubSettings) getStubSettings()).listHotTabletsSettings();
227+
}
228+
219229
public static final BaseBigtableInstanceAdminSettings create(
220230
BigtableInstanceAdminStubSettings stub) throws IOException {
221231
return new BaseBigtableInstanceAdminSettings.Builder(stub.toBuilder()).build();
@@ -457,6 +467,13 @@ public UnaryCallSettings.Builder<SetIamPolicyRequest, Policy> setIamPolicySettin
457467
return getStubSettingsBuilder().testIamPermissionsSettings();
458468
}
459469

470+
/** Returns the builder for the settings used for calls to listHotTablets. */
471+
public PagedCallSettings.Builder<
472+
ListHotTabletsRequest, ListHotTabletsResponse, ListHotTabletsPagedResponse>
473+
listHotTabletsSettings() {
474+
return getStubSettingsBuilder().listHotTabletsSettings();
475+
}
476+
460477
@Override
461478
public BaseBigtableInstanceAdminSettings build() throws IOException {
462479
return new BaseBigtableInstanceAdminSettings(this);

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2887,6 +2887,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
28872887
* SetIamPolicyRequest.newBuilder()
28882888
* .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
28892889
* .setPolicy(Policy.newBuilder().build())
2890+
* .setUpdateMask(FieldMask.newBuilder().build())
28902891
* .build();
28912892
* Policy response = baseBigtableTableAdminClient.setIamPolicy(request);
28922893
* }
@@ -2912,6 +2913,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
29122913
* SetIamPolicyRequest.newBuilder()
29132914
* .setResource(AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString())
29142915
* .setPolicy(Policy.newBuilder().build())
2916+
* .setUpdateMask(FieldMask.newBuilder().build())
29152917
* .build();
29162918
* ApiFuture<Policy> future =
29172919
* baseBigtableTableAdminClient.setIamPolicyCallable().futureCall(request);

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"ListClusters": {
4747
"methods": ["listClusters", "listClusters", "listClusters", "listClustersCallable"]
4848
},
49+
"ListHotTablets": {
50+
"methods": ["listHotTablets", "listHotTablets", "listHotTablets", "listHotTabletsPagedCallable", "listHotTabletsCallable"]
51+
},
4952
"ListInstances": {
5053
"methods": ["listInstances", "listInstances", "listInstances", "listInstancesCallable"]
5154
},

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.google.cloud.bigtable.admin.v2.stub;
1818

1919
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
20+
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListHotTabletsPagedResponse;
2021

2122
import com.google.api.core.InternalApi;
2223
import com.google.api.gax.core.BackgroundResource;
@@ -40,6 +41,8 @@
4041
import com.google.bigtable.admin.v2.ListAppProfilesResponse;
4142
import com.google.bigtable.admin.v2.ListClustersRequest;
4243
import com.google.bigtable.admin.v2.ListClustersResponse;
44+
import com.google.bigtable.admin.v2.ListHotTabletsRequest;
45+
import com.google.bigtable.admin.v2.ListHotTabletsResponse;
4346
import com.google.bigtable.admin.v2.ListInstancesRequest;
4447
import com.google.bigtable.admin.v2.ListInstancesResponse;
4548
import com.google.bigtable.admin.v2.PartialUpdateClusterMetadata;
@@ -187,6 +190,15 @@ public UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
187190
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
188191
}
189192

193+
public UnaryCallable<ListHotTabletsRequest, ListHotTabletsPagedResponse>
194+
listHotTabletsPagedCallable() {
195+
throw new UnsupportedOperationException("Not implemented: listHotTabletsPagedCallable()");
196+
}
197+
198+
public UnaryCallable<ListHotTabletsRequest, ListHotTabletsResponse> listHotTabletsCallable() {
199+
throw new UnsupportedOperationException("Not implemented: listHotTabletsCallable()");
200+
}
201+
190202
@Override
191203
public abstract void close();
192204
}

0 commit comments

Comments
 (0)