Skip to content

Commit

Permalink
feat: [gkehub] add monitoring_config field (#9370)
Browse files Browse the repository at this point in the history
* feat: add `monitoring_config` field
feat: add `cluster_missing` on `GkeResource`
feat: add `google_managed` on `MembershipEndpoint`
feat: add `force` on `DeleteMembershipRequest`
docs: update API annotation

PiperOrigin-RevId: 525548423

Source-Link: googleapis/googleapis@1b897f4

Source-Link: https://github.com/googleapis/googleapis-gen/commit/935fadefeae60e94051bdfc9ff60a946734b7abf
Copy-Tag: eyJwIjoiamF2YS1na2VodWIvLk93bEJvdC55YW1sIiwiaCI6IjkzNWZhZGVmZWFlNjBlOTQwNTFiZGZjOWZmNjBhOTQ2NzM0YjdhYmYifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add `monitoring_config` field
feat: add `force` on `DeleteMembershipRequest`
docs: update API annotation

PiperOrigin-RevId: 525780657

Source-Link: googleapis/googleapis@d3ceec8

Source-Link: https://github.com/googleapis/googleapis-gen/commit/9b15e39278fa9b2d2f19c09f7c916ca7aac336bf
Copy-Tag: eyJwIjoiamF2YS1na2VodWIvLk93bEJvdC55YW1sIiwiaCI6IjliMTVlMzkyNzhmYTliMmQyZjE5YzA5ZjdjOTE2Y2E3YWFjMzM2YmYifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Apr 26, 2023
1 parent ded8000 commit 80e0262
Show file tree
Hide file tree
Showing 84 changed files with 6,701 additions and 1,931 deletions.
4 changes: 2 additions & 2 deletions java-gkehub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.11.0</version>
<version>26.13.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-gkehub.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gkehub/1.14.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-gkehub/1.15.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
* <li>[Feature][google.cloud.gkehub.v1.Feature]
* </ul>
*
* <p>GKE Hub is currently only available in the global region.
* <p>GKE Hub is currently available in the global region and all regions in
* https://cloud.google.com/compute/docs/regions-zones. Feature is only available in global region
* while membership is global region and all the regions.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
Expand Down Expand Up @@ -234,7 +236,8 @@ public final OperationsClient getHttpJsonOperationsClient() {
* }</pre>
*
* @param parent Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/&#42;/locations/&#42;`.
* Specified in the format `projects/&#42;/locations/&#42;`. `projects/&#42;/locations/-` list
* memberships in all the regions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListMembershipsPagedResponse listMemberships(LocationName parent) {
Expand Down Expand Up @@ -266,7 +269,8 @@ public final ListMembershipsPagedResponse listMemberships(LocationName parent) {
* }</pre>
*
* @param parent Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/&#42;/locations/&#42;`.
* Specified in the format `projects/&#42;/locations/&#42;`. `projects/&#42;/locations/-` list
* memberships in all the regions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListMembershipsPagedResponse listMemberships(String parent) {
Expand Down Expand Up @@ -1226,6 +1230,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(Str
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* gkeHubClient.deleteMembershipAsync(request).get();
* }
Expand Down Expand Up @@ -1260,6 +1265,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* OperationFuture<Empty, OperationMetadata> future =
* gkeHubClient.deleteMembershipOperationCallable().futureCall(request);
Expand Down Expand Up @@ -1294,6 +1300,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* ApiFuture<Operation> future = gkeHubClient.deleteMembershipCallable().futureCall(request);
* // Do something.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
* <li>[Feature][google.cloud.gkehub.v1.Feature]
* </ul>
*
* <p>GKE Hub is currently only available in the global region.
* <p>GKE Hub is currently available in the global region and all regions in
* https://cloud.google.com/compute/docs/regions-zones. Feature is only available in global region
* while membership is global region and all the regions.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ public class HttpJsonGkeHubStub extends GkeHubStub {
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<DeleteMembershipRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "force", request.getForce());
serializer.putQueryParam(fields, "requestId", request.getRequestId());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
* clusters to Google Cloud, represented with the
* [Membership][google.cloud.gkehub.v1beta1.Membership] resource.
*
* <p>GKE Hub is currently only available in the global region.
* <p>GKE Hub is currently available in the global region and all regions in
* https://cloud.google.com/compute/docs/regions-zones.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
Expand Down Expand Up @@ -250,7 +251,8 @@ public final OperationsClient getHttpJsonOperationsClient() {
* }</pre>
*
* @param parent Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/&#42;/locations/&#42;`.
* Specified in the format `projects/&#42;/locations/&#42;`. `projects/&#42;/locations/-` list
* memberships in all the regions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListMembershipsPagedResponse listMemberships(LocationName parent) {
Expand Down Expand Up @@ -284,7 +286,8 @@ public final ListMembershipsPagedResponse listMemberships(LocationName parent) {
* }</pre>
*
* @param parent Required. The parent (project and location) where the Memberships will be listed.
* Specified in the format `projects/&#42;/locations/&#42;`.
* Specified in the format `projects/&#42;/locations/&#42;`. `projects/&#42;/locations/-` list
* memberships in all the regions.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListMembershipsPagedResponse listMemberships(String parent) {
Expand Down Expand Up @@ -816,6 +819,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(Str
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* gkeHubMembershipServiceClient.deleteMembershipAsync(request).get();
* }
Expand Down Expand Up @@ -851,6 +855,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* OperationFuture<Empty, OperationMetadata> future =
* gkeHubMembershipServiceClient.deleteMembershipOperationCallable().futureCall(request);
Expand Down Expand Up @@ -886,6 +891,7 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
* DeleteMembershipRequest.newBuilder()
* .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
* .setRequestId("requestId693933066")
* .setForce(true)
* .build();
* ApiFuture<Operation> future =
* gkeHubMembershipServiceClient.deleteMembershipCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
* clusters to Google Cloud, represented with the
* [Membership][google.cloud.gkehub.v1beta1.Membership] resource.
*
* <p>GKE Hub is currently only available in the global region.
* <p>GKE Hub is currently available in the global region and all regions in
* https://cloud.google.com/compute/docs/regions-zones.
*
* <p>&#42;&#42;Membership management may be non-trivial:&#42;&#42; it is recommended to use one of
* the Google-provided client libraries or tools where possible when working with Membership
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public class HttpJsonGkeHubMembershipServiceStub extends GkeHubMembershipService
Map<String, List<String>> fields = new HashMap<>();
ProtoRestSerializer<DeleteMembershipRequest> serializer =
ProtoRestSerializer.create();
serializer.putQueryParam(fields, "force", request.getForce());
serializer.putQueryParam(fields, "requestId", request.getRequestId());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ public void getMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -353,6 +354,7 @@ public void getMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -513,6 +515,7 @@ public void createMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -576,6 +579,7 @@ public void createMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -943,6 +947,7 @@ public void updateMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -1006,6 +1011,7 @@ public void updateMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ public void getMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockGkeHub.addResponse(expectedResponse);

Expand Down Expand Up @@ -328,6 +329,7 @@ public void getMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockGkeHub.addResponse(expectedResponse);

Expand Down Expand Up @@ -470,6 +472,7 @@ public void createMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -532,6 +535,7 @@ public void createMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -884,6 +888,7 @@ public void updateMembershipTest() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -946,6 +951,7 @@ public void updateMembershipTest2() throws Exception {
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setAuthority(Authority.newBuilder().build())
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public void getMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -267,6 +268,7 @@ public void getMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -321,6 +323,7 @@ public void createMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -384,6 +387,7 @@ public void createMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -537,6 +541,7 @@ public void updateMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -600,6 +605,7 @@ public void updateMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public void getMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockGkeHubMembershipService.addResponse(expectedResponse);

Expand Down Expand Up @@ -259,6 +260,7 @@ public void getMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
mockGkeHubMembershipService.addResponse(expectedResponse);

Expand Down Expand Up @@ -307,6 +309,7 @@ public void createMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -369,6 +372,7 @@ public void createMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -515,6 +519,7 @@ public void updateMembershipTest() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -577,6 +582,7 @@ public void updateMembershipTest2() throws Exception {
.setExternalId("externalId-1699764666")
.setLastConnectionTime(Timestamp.newBuilder().build())
.setUniqueId("uniqueId-294460212")
.setMonitoringConfig(MonitoringConfig.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Loading

0 comments on commit 80e0262

Please sign in to comment.