Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

Commit

Permalink
feat: Add request_id under DeleteMembershipRequest and `UpdateMembe…
Browse files Browse the repository at this point in the history
…rshipRequest` (#103)

- [ ] Regenerate this pull request now.

feat: Add `OnPremCluster` and `MultiCloudCluster` as `GkeCluster` equivalent field

fix: Move `GkeCluster` under oneof

PiperOrigin-RevId: 392706843

Source-Link: googleapis/googleapis@8c0e4a3

Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a85d795e0c5edb0ec70b29947f141a774d90ca8
  • Loading branch information
gcf-owl-bot[bot] authored Sep 8, 2021
1 parent 5438aec commit 1beaef5
Show file tree
Hide file tree
Showing 26 changed files with 4,198 additions and 304 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: GKE Hub CRUD API for the Membership resource. The Membership service is
* currently only available in the global location.
* Service Description: The GKE Hub MembershipService handles the registration of many Kubernetes
* 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>&#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
* resources.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down Expand Up @@ -365,7 +372,11 @@ public final UnaryCallable<GetMembershipRequest, Membership> getMembershipCallab

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -404,7 +415,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -416,6 +431,7 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn
* .setParent("parent-995424086")
* .setMembershipId("membershipId517665681")
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* Membership response = gkeHubMembershipServiceClient.createMembershipAsync(request).get();
* }
Expand All @@ -431,7 +447,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -443,6 +463,7 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn
* .setParent("parent-995424086")
* .setMembershipId("membershipId517665681")
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Membership, OperationMetadata> future =
* gkeHubMembershipServiceClient.createMembershipOperationCallable().futureCall(request);
Expand All @@ -458,7 +479,11 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Adds a new Membership.
* Creates a new Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* register other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
*
* <p>Sample code:
*
Expand All @@ -470,6 +495,7 @@ public final OperationFuture<Membership, OperationMetadata> createMembershipAsyn
* .setParent("parent-995424086")
* .setMembershipId("membershipId517665681")
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* gkeHubMembershipServiceClient.createMembershipCallable().futureCall(request);
Expand All @@ -486,6 +512,10 @@ public final UnaryCallable<CreateMembershipRequest, Operation> createMembershipC
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
Expand All @@ -509,13 +539,20 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(Str
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
* try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
* GkeHubMembershipServiceClient.create()) {
* DeleteMembershipRequest request =
* DeleteMembershipRequest.newBuilder().setName("name3373707").build();
* DeleteMembershipRequest.newBuilder()
* .setName("name3373707")
* .setRequestId("requestId693933066")
* .build();
* gkeHubMembershipServiceClient.deleteMembershipAsync(request).get();
* }
* }</pre>
Expand All @@ -532,13 +569,20 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
* try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
* GkeHubMembershipServiceClient.create()) {
* DeleteMembershipRequest request =
* DeleteMembershipRequest.newBuilder().setName("name3373707").build();
* DeleteMembershipRequest.newBuilder()
* .setName("name3373707")
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Empty, OperationMetadata> future =
* gkeHubMembershipServiceClient.deleteMembershipOperationCallable().futureCall(request);
* // Do something.
Expand All @@ -555,13 +599,20 @@ public final OperationFuture<Empty, OperationMetadata> deleteMembershipAsync(
/**
* Removes a Membership.
*
* <p>&#42;&#42;This is currently only supported for GKE clusters on Google Cloud&#42;&#42;. To
* unregister other clusters, follow the instructions at
* https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
*
* <p>Sample code:
*
* <pre>{@code
* try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
* GkeHubMembershipServiceClient.create()) {
* DeleteMembershipRequest request =
* DeleteMembershipRequest.newBuilder().setName("name3373707").build();
* DeleteMembershipRequest.newBuilder()
* .setName("name3373707")
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* gkeHubMembershipServiceClient.deleteMembershipCallable().futureCall(request);
* // Do something.
Expand Down Expand Up @@ -595,7 +646,9 @@ public final UnaryCallable<DeleteMembershipRequest, Operation> deleteMembershipC
* @param resource Required. Only fields specified in update_mask are updated. If you specify a
* field in the update_mask but don't specify its value here that field will be deleted. If
* you are updating a map field, set the value of a key to null or empty string to delete the
* key from the map. It's not possible to update a key's value to the empty string.
* key from the map. It's not possible to update a key's value to the empty string. If you
* specify the update_mask to be a special path "&#42;", fully replaces all user-modifiable
* fields to match `resource`.
* @param updateMask Required. Mask of fields to update. At least one field path must be specified
* in this mask.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand Down Expand Up @@ -625,6 +678,7 @@ public final OperationFuture<Membership, OperationMetadata> updateMembershipAsyn
* .setName("name3373707")
* .setUpdateMask(FieldMask.newBuilder().build())
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* Membership response = gkeHubMembershipServiceClient.updateMembershipAsync(request).get();
* }
Expand Down Expand Up @@ -652,6 +706,7 @@ public final OperationFuture<Membership, OperationMetadata> updateMembershipAsyn
* .setName("name3373707")
* .setUpdateMask(FieldMask.newBuilder().build())
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* OperationFuture<Membership, OperationMetadata> future =
* gkeHubMembershipServiceClient.updateMembershipOperationCallable().futureCall(request);
Expand Down Expand Up @@ -679,6 +734,7 @@ public final OperationFuture<Membership, OperationMetadata> updateMembershipAsyn
* .setName("name3373707")
* .setUpdateMask(FieldMask.newBuilder().build())
* .setResource(Membership.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
* ApiFuture<Operation> future =
* gkeHubMembershipServiceClient.updateMembershipCallable().futureCall(request);
Expand All @@ -695,6 +751,9 @@ public final UnaryCallable<UpdateMembershipRequest, Operation> updateMembershipC
/**
* Generates the manifest for deployment of the GKE connect agent.
*
* <p>&#42;&#42;This method is used internally by Google-provided libraries.&#42;&#42; Most
* clients should not need to call this method directly.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down Expand Up @@ -726,6 +785,9 @@ public final GenerateConnectManifestResponse generateConnectManifest(
/**
* Generates the manifest for deployment of the GKE connect agent.
*
* <p>&#42;&#42;This method is used internally by Google-provided libraries.&#42;&#42; Most
* clients should not need to call this method directly.
*
* <p>Sample code:
*
* <pre>{@code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@
*
* <p>======================= GkeHubMembershipServiceClient =======================
*
* <p>Service Description: GKE Hub CRUD API for the Membership resource. The Membership service is
* currently only available in the global location.
* <p>Service Description: The GKE Hub MembershipService handles the registration of many Kubernetes
* 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>&#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
* resources.
*
* <p>Sample for GkeHubMembershipServiceClient:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ public static List<String> getDefaultServiceScopes() {

/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES);
return GoogleCredentialsProvider.newBuilder()
.setScopesToApply(DEFAULT_SERVICE_SCOPES)
.setUseJwtAccessWithScope(true);
}

/** Returns a builder for the default ChannelProvider for this service. */
Expand Down
Loading

0 comments on commit 1beaef5

Please sign in to comment.