Class GkeHubClient

java.lang.Object
com.google.cloud.gkehub.v1.GkeHubClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class GkeHubClient extends Object implements BackgroundResource
Service Description: The GKE Hub service handles the registration of many Kubernetes clusters to Google Cloud, and the management of multi-cluster features over those clusters.

The GKE Hub service operates on the following resources:

  • [Membership][google.cloud.gkehub.v1.Membership]
  • [Feature][google.cloud.gkehub.v1.Feature]

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.

**Membership management may be non-trivial:** it is recommended to use one of the Google-provided client libraries or tools where possible when working with Membership resources.

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:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   Membership response = gkeHubClient.getMembership(name);
 }
 

Note: close() needs to be called on the GkeHubClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListMemberships

Lists Memberships in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMemberships(ListMembershipsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMemberships(LocationName parent)

  • listMemberships(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipsPagedCallable()

  • listMembershipsCallable()

ListBoundMemberships

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBoundMemberships(ListBoundMembershipsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBoundMemberships(ScopeName scopeName)

  • listBoundMemberships(String scopeName)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBoundMembershipsPagedCallable()

  • listBoundMembershipsCallable()

ListFeatures

Lists Features in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFeatures(ListFeaturesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFeatures(LocationName parent)

  • listFeatures(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFeaturesPagedCallable()

  • listFeaturesCallable()

GetMembership

Gets the details of a Membership.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembership(GetMembershipRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembership(MembershipName name)

  • getMembership(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipCallable()

GetFeature

Gets details of a single Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFeature(GetFeatureRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFeature(FeatureName name)

  • getFeature(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFeatureCallable()

CreateMembership

Creates a new Membership.

**This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipAsync(CreateMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createMembershipAsync(LocationName parent, Membership resource, String membershipId)

  • createMembershipAsync(String parent, Membership resource, String membershipId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipOperationCallable()

  • createMembershipCallable()

CreateFeature

Adds a new Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFeatureAsync(CreateFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createFeatureAsync(LocationName parent, Feature resource, String featureId)

  • createFeatureAsync(String parent, Feature resource, String featureId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFeatureOperationCallable()

  • createFeatureCallable()

DeleteMembership

Removes a Membership.

**This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipAsync(DeleteMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteMembershipAsync(MembershipName name)

  • deleteMembershipAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipOperationCallable()

  • deleteMembershipCallable()

DeleteFeature

Removes a Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFeatureAsync(DeleteFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteFeatureAsync(FeatureName name)

  • deleteFeatureAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFeatureOperationCallable()

  • deleteFeatureCallable()

UpdateMembership

Updates an existing Membership.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipAsync(UpdateMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask)

  • updateMembershipAsync(String name, Membership resource, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipOperationCallable()

  • updateMembershipCallable()

UpdateFeature

Updates an existing Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFeatureAsync(UpdateFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateFeatureAsync(FeatureName name, Feature resource, FieldMask updateMask)

  • updateFeatureAsync(String name, Feature resource, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFeatureOperationCallable()

  • updateFeatureCallable()

GenerateConnectManifest

Generates the manifest for deployment of the GKE connect agent.

**This method is used internally by Google-provided libraries.** Most clients should not need to call this method directly.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateConnectManifest(GenerateConnectManifestRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateConnectManifestCallable()

CreateFleet

Creates a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFleetAsync(CreateFleetRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createFleetAsync(LocationName parent, Fleet fleet)

  • createFleetAsync(String parent, Fleet fleet)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFleetOperationCallable()

  • createFleetCallable()

GetFleet

Returns the details of a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFleet(GetFleetRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFleet(FleetName name)

  • getFleet(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFleetCallable()

UpdateFleet

Updates a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFleetAsync(UpdateFleetRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateFleetAsync(Fleet fleet, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFleetOperationCallable()

  • updateFleetCallable()

DeleteFleet

Removes a Fleet. There must be no memberships remaining in the Fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFleetAsync(DeleteFleetRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteFleetAsync(FleetName name)

  • deleteFleetAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFleetOperationCallable()

  • deleteFleetCallable()

ListFleets

Returns all fleets within an organization or a project that the caller has access to.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFleets(ListFleetsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFleets(LocationName parent)

  • listFleets(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFleetsPagedCallable()

  • listFleetsCallable()

GetScopeNamespace

Returns the details of a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScopeNamespace(GetScopeNamespaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScopeNamespace(NamespaceName name)

  • getScopeNamespace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeNamespaceCallable()

CreateScopeNamespace

Creates a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeNamespaceAsync(CreateScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId)

  • createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeNamespaceOperationCallable()

  • createScopeNamespaceCallable()

UpdateScopeNamespace

Updates a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeNamespaceAsync(UpdateScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateScopeNamespaceAsync(Namespace scopeNamespace, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeNamespaceOperationCallable()

  • updateScopeNamespaceCallable()

DeleteScopeNamespace

Deletes a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteScopeNamespaceAsync(NamespaceName name)

  • deleteScopeNamespaceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeNamespaceOperationCallable()

  • deleteScopeNamespaceCallable()

ListScopeNamespaces

Lists fleet namespaces.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopeNamespaces(ListScopeNamespacesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopeNamespaces(ScopeName parent)

  • listScopeNamespaces(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopeNamespacesPagedCallable()

  • listScopeNamespacesCallable()

GetScopeRBACRoleBinding

Returns the details of a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScopeRBACRoleBinding(RBACRoleBindingName name)

  • getScopeRBACRoleBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeRBACRoleBindingCallable()

CreateScopeRBACRoleBinding

Creates a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeRBACRoleBindingOperationCallable()

  • createScopeRBACRoleBindingCallable()

UpdateScopeRBACRoleBinding

Updates a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeRBACRoleBindingOperationCallable()

  • updateScopeRBACRoleBindingCallable()

DeleteScopeRBACRoleBinding

Deletes a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteScopeRBACRoleBindingAsync(RBACRoleBindingName name)

  • deleteScopeRBACRoleBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeRBACRoleBindingOperationCallable()

  • deleteScopeRBACRoleBindingCallable()

ListScopeRBACRoleBindings

Lists all Scope RBACRoleBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopeRBACRoleBindings(MembershipName parent)

  • listScopeRBACRoleBindings(ScopeName parent)

  • listScopeRBACRoleBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopeRBACRoleBindingsPagedCallable()

  • listScopeRBACRoleBindingsCallable()

GetScope

Returns the details of a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScope(GetScopeRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScope(ScopeName name)

  • getScope(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeCallable()

CreateScope

Creates a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeAsync(CreateScopeRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createScopeAsync(LocationName parent, Scope scope, String scopeId)

  • createScopeAsync(String parent, Scope scope, String scopeId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeOperationCallable()

  • createScopeCallable()

UpdateScope

Updates a scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeAsync(UpdateScopeRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateScopeAsync(Scope scope, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeOperationCallable()

  • updateScopeCallable()

DeleteScope

Deletes a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeAsync(DeleteScopeRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteScopeAsync(ScopeName name)

  • deleteScopeAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeOperationCallable()

  • deleteScopeCallable()

ListScopes

Lists Scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopes(ListScopesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopes(LocationName parent)

  • listScopes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopesPagedCallable()

  • listScopesCallable()

ListPermittedScopes

Lists permitted Scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPermittedScopes(ListPermittedScopesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPermittedScopes(LocationName parent)

  • listPermittedScopes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPermittedScopesPagedCallable()

  • listPermittedScopesCallable()

GetMembershipBinding

Returns the details of a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembershipBinding(GetMembershipBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembershipBinding(MembershipBindingName name)

  • getMembershipBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipBindingCallable()

CreateMembershipBinding

Creates a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipBindingAsync(CreateMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId)

  • createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipBindingOperationCallable()

  • createMembershipBindingCallable()

UpdateMembershipBinding

Updates a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipBindingAsync(UpdateMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateMembershipBindingAsync(MembershipBinding membershipBinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipBindingOperationCallable()

  • updateMembershipBindingCallable()

DeleteMembershipBinding

Deletes a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipBindingAsync(DeleteMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteMembershipBindingAsync(MembershipBindingName name)

  • deleteMembershipBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipBindingOperationCallable()

  • deleteMembershipBindingCallable()

ListMembershipBindings

Lists MembershipBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMembershipBindings(ListMembershipBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMembershipBindings(MembershipName parent)

  • listMembershipBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipBindingsPagedCallable()

  • listMembershipBindingsCallable()

GetMembershipRBACRoleBinding

Returns the details of a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembershipRBACRoleBinding(RBACRoleBindingName name)

  • getMembershipRBACRoleBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipRBACRoleBindingCallable()

CreateMembershipRBACRoleBinding

Creates a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipRBACRoleBindingOperationCallable()

  • createMembershipRBACRoleBindingCallable()

UpdateMembershipRBACRoleBinding

Updates a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipRBACRoleBindingOperationCallable()

  • updateMembershipRBACRoleBindingCallable()

DeleteMembershipRBACRoleBinding

Deletes a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteMembershipRBACRoleBindingAsync(RBACRoleBindingName name)

  • deleteMembershipRBACRoleBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipRBACRoleBindingOperationCallable()

  • deleteMembershipRBACRoleBindingCallable()

ListMembershipRBACRoleBindings

Lists all Membership RBACRoleBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMembershipRBACRoleBindings(MembershipName parent)

  • listMembershipRBACRoleBindings(ScopeName parent)

  • listMembershipRBACRoleBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipRBACRoleBindingsPagedCallable()

  • listMembershipRBACRoleBindingsCallable()

GenerateMembershipRBACRoleBindingYAML

Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateMembershipRBACRoleBindingYAMLCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of GkeHubSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings =
     GkeHubSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings = GkeHubSettings.newBuilder().setEndpoint(myEndpoint).build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings = GkeHubSettings.newHttpJsonBuilder().build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • GkeHubClient

      protected GkeHubClient(GkeHubSettings settings) throws IOException
      Constructs an instance of GkeHubClient, 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.
      Throws:
      IOException
    • GkeHubClient

      protected GkeHubClient(GkeHubStub stub)
  • Method Details

    • create

      public static final GkeHubClient create() throws IOException
      Constructs an instance of GkeHubClient with default settings.
      Throws:
      IOException
    • create

      public static final GkeHubClient create(GkeHubSettings settings) throws IOException
      Constructs an instance of GkeHubClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final GkeHubClient create(GkeHubStub stub)
      Constructs an instance of GkeHubClient, using the given stub for making calls. This is for advanced usage - prefer using create(GkeHubSettings).
    • getSettings

      public final GkeHubSettings getSettings()
    • getStub

      public GkeHubStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listMemberships

      public final GkeHubClient.ListMembershipsPagedResponse listMemberships(LocationName parent)
      Lists Memberships in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Membership element : gkeHubClient.listMemberships(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions.
      Throws:
      ApiException - if the remote call fails
    • listMemberships

      public final GkeHubClient.ListMembershipsPagedResponse listMemberships(String parent)
      Lists Memberships in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Membership element : gkeHubClient.listMemberships(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Memberships will be listed. Specified in the format `projects/*/locations/*`. `projects/*/locations/-` list memberships in all the regions.
      Throws:
      ApiException - if the remote call fails
    • listMemberships

      public final GkeHubClient.ListMembershipsPagedResponse listMemberships(ListMembershipsRequest request)
      Lists Memberships in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipsRequest request =
             ListMembershipsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (Membership element : gkeHubClient.listMemberships(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMembershipsPagedCallable

      Lists Memberships in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipsRequest request =
             ListMembershipsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<Membership> future =
             gkeHubClient.listMembershipsPagedCallable().futureCall(request);
         // Do something.
         for (Membership element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMembershipsCallable

      public final UnaryCallable<ListMembershipsRequest,ListMembershipsResponse> listMembershipsCallable()
      Lists Memberships in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipsRequest request =
             ListMembershipsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListMembershipsResponse response = gkeHubClient.listMembershipsCallable().call(request);
           for (Membership element : response.getResourcesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listBoundMemberships

      public final GkeHubClient.ListBoundMembershipsPagedResponse listBoundMemberships(ScopeName scopeName)
      Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName scopeName = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         for (Membership element : gkeHubClient.listBoundMemberships(scopeName).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      scopeName - Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.
      Throws:
      ApiException - if the remote call fails
    • listBoundMemberships

      public final GkeHubClient.ListBoundMembershipsPagedResponse listBoundMemberships(String scopeName)
      Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String scopeName = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         for (Membership element : gkeHubClient.listBoundMemberships(scopeName).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      scopeName - Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.
      Throws:
      ApiException - if the remote call fails
    • listBoundMemberships

      Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListBoundMembershipsRequest request =
             ListBoundMembershipsRequest.newBuilder()
                 .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Membership element : gkeHubClient.listBoundMemberships(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listBoundMembershipsPagedCallable

      Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListBoundMembershipsRequest request =
             ListBoundMembershipsRequest.newBuilder()
                 .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Membership> future =
             gkeHubClient.listBoundMembershipsPagedCallable().futureCall(request);
         // Do something.
         for (Membership element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listBoundMembershipsCallable

      public final UnaryCallable<ListBoundMembershipsRequest,ListBoundMembershipsResponse> listBoundMembershipsCallable()
      Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListBoundMembershipsRequest request =
             ListBoundMembershipsRequest.newBuilder()
                 .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListBoundMembershipsResponse response =
               gkeHubClient.listBoundMembershipsCallable().call(request);
           for (Membership element : response.getMembershipsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listFeatures

      public final GkeHubClient.ListFeaturesPagedResponse listFeatures(LocationName parent)
      Lists Features in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Feature element : gkeHubClient.listFeatures(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listFeatures

      public final GkeHubClient.ListFeaturesPagedResponse listFeatures(String parent)
      Lists Features in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Feature element : gkeHubClient.listFeatures(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listFeatures

      public final GkeHubClient.ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request)
      Lists Features in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFeaturesRequest request =
             ListFeaturesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         for (Feature element : gkeHubClient.listFeatures(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listFeaturesPagedCallable

      Lists Features in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFeaturesRequest request =
             ListFeaturesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<Feature> future = gkeHubClient.listFeaturesPagedCallable().futureCall(request);
         // Do something.
         for (Feature element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFeaturesCallable

      public final UnaryCallable<ListFeaturesRequest,ListFeaturesResponse> listFeaturesCallable()
      Lists Features in a given project and location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFeaturesRequest request =
             ListFeaturesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReturnPartialSuccess(true)
                 .build();
         while (true) {
           ListFeaturesResponse response = gkeHubClient.listFeaturesCallable().call(request);
           for (Feature element : response.getResourcesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getMembership

      public final Membership getMembership(MembershipName name)
      Gets the details of a Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         Membership response = gkeHubClient.getMembership(name);
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembership

      public final Membership getMembership(String name)
      Gets the details of a Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
         Membership response = gkeHubClient.getMembership(name);
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembership

      public final Membership getMembership(GetMembershipRequest request)
      Gets the details of a Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipRequest request =
             GetMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .build();
         Membership response = gkeHubClient.getMembership(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMembershipCallable

      public final UnaryCallable<GetMembershipRequest,Membership> getMembershipCallable()
      Gets the details of a Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipRequest request =
             GetMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .build();
         ApiFuture<Membership> future = gkeHubClient.getMembershipCallable().futureCall(request);
         // Do something.
         Membership response = future.get();
       }
       
    • getFeature

      public final Feature getFeature(FeatureName name)
      Gets details of a single Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
         Feature response = gkeHubClient.getFeature(name);
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`
      Throws:
      ApiException - if the remote call fails
    • getFeature

      public final Feature getFeature(String name)
      Gets details of a single Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
         Feature response = gkeHubClient.getFeature(name);
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`
      Throws:
      ApiException - if the remote call fails
    • getFeature

      public final Feature getFeature(GetFeatureRequest request)
      Gets details of a single Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetFeatureRequest request =
             GetFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setReturnPartialSuccess(true)
                 .build();
         Feature response = gkeHubClient.getFeature(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getFeatureCallable

      public final UnaryCallable<GetFeatureRequest,Feature> getFeatureCallable()
      Gets details of a single Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetFeatureRequest request =
             GetFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setReturnPartialSuccess(true)
                 .build();
         ApiFuture<Feature> future = gkeHubClient.getFeatureCallable().futureCall(request);
         // Do something.
         Feature response = future.get();
       }
       
    • createMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(LocationName parent, Membership resource, String membershipId)
      Creates a new Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Membership resource = Membership.newBuilder().build();
         String membershipId = "membershipId517665681";
         Membership response =
             gkeHubClient.createMembershipAsync(parent, resource, membershipId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.
      resource - Required. The membership to create.
      membershipId - Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(String parent, Membership resource, String membershipId)
      Creates a new Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Membership resource = Membership.newBuilder().build();
         String membershipId = "membershipId517665681";
         Membership response =
             gkeHubClient.createMembershipAsync(parent, resource, membershipId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.
      resource - Required. The membership to create.
      membershipId - Required. Client chosen ID for the membership. `membership_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(CreateMembershipRequest request)
      Creates a new Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRequest request =
             CreateMembershipRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMembershipId("membershipId517665681")
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Membership response = gkeHubClient.createMembershipAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMembershipOperationCallable

      public final OperationCallable<CreateMembershipRequest,Membership,OperationMetadata> createMembershipOperationCallable()
      Creates a new Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRequest request =
             CreateMembershipRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMembershipId("membershipId517665681")
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Membership, OperationMetadata> future =
             gkeHubClient.createMembershipOperationCallable().futureCall(request);
         // Do something.
         Membership response = future.get();
       }
       
    • createMembershipCallable

      public final UnaryCallable<CreateMembershipRequest,Operation> createMembershipCallable()
      Creates a new Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRequest request =
             CreateMembershipRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setMembershipId("membershipId517665681")
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = gkeHubClient.createMembershipCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(LocationName parent, Feature resource, String featureId)
      Adds a new Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Feature resource = Feature.newBuilder().build();
         String featureId = "featureId-420503887";
         Feature response = gkeHubClient.createFeatureAsync(parent, resource, featureId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Feature will be created. Specified in the format `projects/*/locations/*`.
      resource - The Feature resource to create.
      featureId - The ID of the feature to create.
      Throws:
      ApiException - if the remote call fails
    • createFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(String parent, Feature resource, String featureId)
      Adds a new Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Feature resource = Feature.newBuilder().build();
         String featureId = "featureId-420503887";
         Feature response = gkeHubClient.createFeatureAsync(parent, resource, featureId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Feature will be created. Specified in the format `projects/*/locations/*`.
      resource - The Feature resource to create.
      featureId - The ID of the feature to create.
      Throws:
      ApiException - if the remote call fails
    • createFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(CreateFeatureRequest request)
      Adds a new Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFeatureRequest request =
             CreateFeatureRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFeatureId("featureId-420503887")
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Feature response = gkeHubClient.createFeatureAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createFeatureOperationCallable

      public final OperationCallable<CreateFeatureRequest,Feature,OperationMetadata> createFeatureOperationCallable()
      Adds a new Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFeatureRequest request =
             CreateFeatureRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFeatureId("featureId-420503887")
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Feature, OperationMetadata> future =
             gkeHubClient.createFeatureOperationCallable().futureCall(request);
         // Do something.
         Feature response = future.get();
       }
       
    • createFeatureCallable

      public final UnaryCallable<CreateFeatureRequest,Operation> createFeatureCallable()
      Adds a new Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFeatureRequest request =
             CreateFeatureRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFeatureId("featureId-420503887")
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = gkeHubClient.createFeatureCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMembershipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipAsync(MembershipName name)
      Removes a Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         gkeHubClient.deleteMembershipAsync(name).get();
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipAsync(String name)
      Removes a Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
         gkeHubClient.deleteMembershipAsync(name).get();
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipAsync(DeleteMembershipRequest request)
      Removes a Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRequest request =
             DeleteMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         gkeHubClient.deleteMembershipAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipOperationCallable

      public final OperationCallable<DeleteMembershipRequest,com.google.protobuf.Empty,OperationMetadata> deleteMembershipOperationCallable()
      Removes a Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRequest request =
             DeleteMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteMembershipOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteMembershipCallable

      public final UnaryCallable<DeleteMembershipRequest,Operation> deleteMembershipCallable()
      Removes a Membership.

      **This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRequest request =
             DeleteMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setRequestId("requestId693933066")
                 .setForce(true)
                 .build();
         ApiFuture<Operation> future = gkeHubClient.deleteMembershipCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteFeatureAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFeatureAsync(FeatureName name)
      Removes a Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
         gkeHubClient.deleteFeatureAsync(name).get();
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteFeatureAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFeatureAsync(String name)
      Removes a Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
         gkeHubClient.deleteFeatureAsync(name).get();
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteFeatureAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFeatureAsync(DeleteFeatureRequest request)
      Removes a Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFeatureRequest request =
             DeleteFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setForce(true)
                 .setRequestId("requestId693933066")
                 .build();
         gkeHubClient.deleteFeatureAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteFeatureOperationCallable

      public final OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty,OperationMetadata> deleteFeatureOperationCallable()
      Removes a Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFeatureRequest request =
             DeleteFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setForce(true)
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteFeatureOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteFeatureCallable

      public final UnaryCallable<DeleteFeatureRequest,Operation> deleteFeatureCallable()
      Removes a Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFeatureRequest request =
             DeleteFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setForce(true)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = gkeHubClient.deleteFeatureCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(MembershipName name, Membership resource, com.google.protobuf.FieldMask updateMask)
      Updates an existing Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         Membership resource = Membership.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Membership response = gkeHubClient.updateMembershipAsync(name, resource, updateMask).get();
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      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. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match `resource`.
      updateMask - Required. Mask of fields to update.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(String name, Membership resource, com.google.protobuf.FieldMask updateMask)
      Updates an existing Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
         Membership resource = Membership.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Membership response = gkeHubClient.updateMembershipAsync(name, resource, updateMask).get();
       }
       
      Parameters:
      name - Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.
      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. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match `resource`.
      updateMask - Required. Mask of fields to update.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipAsync

      public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(UpdateMembershipRequest request)
      Updates an existing Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRequest request =
             UpdateMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Membership response = gkeHubClient.updateMembershipAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipOperationCallable

      public final OperationCallable<UpdateMembershipRequest,Membership,OperationMetadata> updateMembershipOperationCallable()
      Updates an existing Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRequest request =
             UpdateMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Membership, OperationMetadata> future =
             gkeHubClient.updateMembershipOperationCallable().futureCall(request);
         // Do something.
         Membership response = future.get();
       }
       
    • updateMembershipCallable

      public final UnaryCallable<UpdateMembershipRequest,Operation> updateMembershipCallable()
      Updates an existing Membership.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRequest request =
             UpdateMembershipRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Membership.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = gkeHubClient.updateMembershipCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(FeatureName name, Feature resource, com.google.protobuf.FieldMask updateMask)
      Updates an existing Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
         Feature resource = Feature.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Feature response = gkeHubClient.updateFeatureAsync(name, resource, updateMask).get();
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`.
      resource - 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. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match `resource`.
      updateMask - Mask of fields to update.
      Throws:
      ApiException - if the remote call fails
    • updateFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(String name, Feature resource, com.google.protobuf.FieldMask updateMask)
      Updates an existing Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
         Feature resource = Feature.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Feature response = gkeHubClient.updateFeatureAsync(name, resource, updateMask).get();
       }
       
      Parameters:
      name - Required. The Feature resource name in the format `projects/*/locations/*/features/*`.
      resource - 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. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match `resource`.
      updateMask - Mask of fields to update.
      Throws:
      ApiException - if the remote call fails
    • updateFeatureAsync

      public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(UpdateFeatureRequest request)
      Updates an existing Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFeatureRequest request =
             UpdateFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         Feature response = gkeHubClient.updateFeatureAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateFeatureOperationCallable

      public final OperationCallable<UpdateFeatureRequest,Feature,OperationMetadata> updateFeatureOperationCallable()
      Updates an existing Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFeatureRequest request =
             UpdateFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Feature, OperationMetadata> future =
             gkeHubClient.updateFeatureOperationCallable().futureCall(request);
         // Do something.
         Feature response = future.get();
       }
       
    • updateFeatureCallable

      public final UnaryCallable<UpdateFeatureRequest,Operation> updateFeatureCallable()
      Updates an existing Feature.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFeatureRequest request =
             UpdateFeatureRequest.newBuilder()
                 .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setResource(Feature.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = gkeHubClient.updateFeatureCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • generateConnectManifest

      public final GenerateConnectManifestResponse generateConnectManifest(GenerateConnectManifestRequest request)
      Generates the manifest for deployment of the GKE connect agent.

      **This method is used internally by Google-provided libraries.** Most clients should not need to call this method directly.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GenerateConnectManifestRequest request =
             GenerateConnectManifestRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setNamespace("namespace1252218203")
                 .setProxy(ByteString.EMPTY)
                 .setVersion("version351608024")
                 .setIsUpgrade(true)
                 .setRegistry("registry-690212803")
                 .setImagePullSecretContent(ByteString.EMPTY)
                 .build();
         GenerateConnectManifestResponse response = gkeHubClient.generateConnectManifest(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • generateConnectManifestCallable

      public final UnaryCallable<GenerateConnectManifestRequest,GenerateConnectManifestResponse> generateConnectManifestCallable()
      Generates the manifest for deployment of the GKE connect agent.

      **This method is used internally by Google-provided libraries.** Most clients should not need to call this method directly.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GenerateConnectManifestRequest request =
             GenerateConnectManifestRequest.newBuilder()
                 .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setNamespace("namespace1252218203")
                 .setProxy(ByteString.EMPTY)
                 .setVersion("version351608024")
                 .setIsUpgrade(true)
                 .setRegistry("registry-690212803")
                 .setImagePullSecretContent(ByteString.EMPTY)
                 .build();
         ApiFuture<GenerateConnectManifestResponse> future =
             gkeHubClient.generateConnectManifestCallable().futureCall(request);
         // Do something.
         GenerateConnectManifestResponse response = future.get();
       }
       
    • createFleetAsync

      public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(LocationName parent, Fleet fleet)
      Creates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Fleet fleet = Fleet.newBuilder().build();
         Fleet response = gkeHubClient.createFleetAsync(parent, fleet).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Fleet will be created. Specified in the format `projects/*/locations/*`.
      fleet - Required. The fleet to create.
      Throws:
      ApiException - if the remote call fails
    • createFleetAsync

      public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(String parent, Fleet fleet)
      Creates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Fleet fleet = Fleet.newBuilder().build();
         Fleet response = gkeHubClient.createFleetAsync(parent, fleet).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Fleet will be created. Specified in the format `projects/*/locations/*`.
      fleet - Required. The fleet to create.
      Throws:
      ApiException - if the remote call fails
    • createFleetAsync

      public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(CreateFleetRequest request)
      Creates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFleetRequest request =
             CreateFleetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFleet(Fleet.newBuilder().build())
                 .build();
         Fleet response = gkeHubClient.createFleetAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createFleetOperationCallable

      public final OperationCallable<CreateFleetRequest,Fleet,OperationMetadata> createFleetOperationCallable()
      Creates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFleetRequest request =
             CreateFleetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFleet(Fleet.newBuilder().build())
                 .build();
         OperationFuture<Fleet, OperationMetadata> future =
             gkeHubClient.createFleetOperationCallable().futureCall(request);
         // Do something.
         Fleet response = future.get();
       }
       
    • createFleetCallable

      public final UnaryCallable<CreateFleetRequest,Operation> createFleetCallable()
      Creates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateFleetRequest request =
             CreateFleetRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFleet(Fleet.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.createFleetCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getFleet

      public final Fleet getFleet(FleetName name)
      Returns the details of a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         FleetName name = FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]");
         Fleet response = gkeHubClient.getFleet(name);
       }
       
      Parameters:
      name - Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.
      Throws:
      ApiException - if the remote call fails
    • getFleet

      public final Fleet getFleet(String name)
      Returns the details of a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]").toString();
         Fleet response = gkeHubClient.getFleet(name);
       }
       
      Parameters:
      name - Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.
      Throws:
      ApiException - if the remote call fails
    • getFleet

      public final Fleet getFleet(GetFleetRequest request)
      Returns the details of a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetFleetRequest request =
             GetFleetRequest.newBuilder()
                 .setName(
                     FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                         .toString())
                 .build();
         Fleet response = gkeHubClient.getFleet(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getFleetCallable

      public final UnaryCallable<GetFleetRequest,Fleet> getFleetCallable()
      Returns the details of a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetFleetRequest request =
             GetFleetRequest.newBuilder()
                 .setName(
                     FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                         .toString())
                 .build();
         ApiFuture<Fleet> future = gkeHubClient.getFleetCallable().futureCall(request);
         // Do something.
         Fleet response = future.get();
       }
       
    • updateFleetAsync

      public final OperationFuture<Fleet,OperationMetadata> updateFleetAsync(Fleet fleet, com.google.protobuf.FieldMask updateMask)
      Updates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         Fleet fleet = Fleet.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Fleet response = gkeHubClient.updateFleetAsync(fleet, updateMask).get();
       }
       
      Parameters:
      fleet - Required. The Fleet to update.

      The `name` field of the Fleet object identifies which fleet will be updated.

      updateMask - Required. The fields to be updated;
      Throws:
      ApiException - if the remote call fails
    • updateFleetAsync

      public final OperationFuture<Fleet,OperationMetadata> updateFleetAsync(UpdateFleetRequest request)
      Updates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFleetRequest request =
             UpdateFleetRequest.newBuilder()
                 .setFleet(Fleet.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Fleet response = gkeHubClient.updateFleetAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateFleetOperationCallable

      public final OperationCallable<UpdateFleetRequest,Fleet,OperationMetadata> updateFleetOperationCallable()
      Updates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFleetRequest request =
             UpdateFleetRequest.newBuilder()
                 .setFleet(Fleet.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<Fleet, OperationMetadata> future =
             gkeHubClient.updateFleetOperationCallable().futureCall(request);
         // Do something.
         Fleet response = future.get();
       }
       
    • updateFleetCallable

      public final UnaryCallable<UpdateFleetRequest,Operation> updateFleetCallable()
      Updates a fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateFleetRequest request =
             UpdateFleetRequest.newBuilder()
                 .setFleet(Fleet.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.updateFleetCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteFleetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(FleetName name)
      Removes a Fleet. There must be no memberships remaining in the Fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         FleetName name = FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]");
         gkeHubClient.deleteFleetAsync(name).get();
       }
       
      Parameters:
      name - Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteFleetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(String name)
      Removes a Fleet. There must be no memberships remaining in the Fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]").toString();
         gkeHubClient.deleteFleetAsync(name).get();
       }
       
      Parameters:
      name - Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteFleetAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(DeleteFleetRequest request)
      Removes a Fleet. There must be no memberships remaining in the Fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFleetRequest request =
             DeleteFleetRequest.newBuilder()
                 .setName(
                     FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                         .toString())
                 .build();
         gkeHubClient.deleteFleetAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteFleetOperationCallable

      public final OperationCallable<DeleteFleetRequest,com.google.protobuf.Empty,OperationMetadata> deleteFleetOperationCallable()
      Removes a Fleet. There must be no memberships remaining in the Fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFleetRequest request =
             DeleteFleetRequest.newBuilder()
                 .setName(
                     FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteFleetOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteFleetCallable

      public final UnaryCallable<DeleteFleetRequest,Operation> deleteFleetCallable()
      Removes a Fleet. There must be no memberships remaining in the Fleet.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteFleetRequest request =
             DeleteFleetRequest.newBuilder()
                 .setName(
                     FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                         .toString())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.deleteFleetCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listFleets

      public final GkeHubClient.ListFleetsPagedResponse listFleets(LocationName parent)
      Returns all fleets within an organization or a project that the caller has access to.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Fleet element : gkeHubClient.listFleets(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The organization or project to list for Fleets under, in the format `organizations/*/locations/*` or `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listFleets

      public final GkeHubClient.ListFleetsPagedResponse listFleets(String parent)
      Returns all fleets within an organization or a project that the caller has access to.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Fleet element : gkeHubClient.listFleets(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The organization or project to list for Fleets under, in the format `organizations/*/locations/*` or `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listFleets

      public final GkeHubClient.ListFleetsPagedResponse listFleets(ListFleetsRequest request)
      Returns all fleets within an organization or a project that the caller has access to.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFleetsRequest request =
             ListFleetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (Fleet element : gkeHubClient.listFleets(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listFleetsPagedCallable

      public final UnaryCallable<ListFleetsRequest,GkeHubClient.ListFleetsPagedResponse> listFleetsPagedCallable()
      Returns all fleets within an organization or a project that the caller has access to.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFleetsRequest request =
             ListFleetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<Fleet> future = gkeHubClient.listFleetsPagedCallable().futureCall(request);
         // Do something.
         for (Fleet element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFleetsCallable

      public final UnaryCallable<ListFleetsRequest,ListFleetsResponse> listFleetsCallable()
      Returns all fleets within an organization or a project that the caller has access to.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListFleetsRequest request =
             ListFleetsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListFleetsResponse response = gkeHubClient.listFleetsCallable().call(request);
           for (Fleet element : response.getFleetsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getScopeNamespace

      public final Namespace getScopeNamespace(NamespaceName name)
      Returns the details of a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         NamespaceName name = NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]");
         Namespace response = gkeHubClient.getScopeNamespace(name);
       }
       
      Parameters:
      name - Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.
      Throws:
      ApiException - if the remote call fails
    • getScopeNamespace

      public final Namespace getScopeNamespace(String name)
      Returns the details of a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString();
         Namespace response = gkeHubClient.getScopeNamespace(name);
       }
       
      Parameters:
      name - Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.
      Throws:
      ApiException - if the remote call fails
    • getScopeNamespace

      public final Namespace getScopeNamespace(GetScopeNamespaceRequest request)
      Returns the details of a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeNamespaceRequest request =
             GetScopeNamespaceRequest.newBuilder()
                 .setName(
                     NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
                 .build();
         Namespace response = gkeHubClient.getScopeNamespace(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getScopeNamespaceCallable

      public final UnaryCallable<GetScopeNamespaceRequest,Namespace> getScopeNamespaceCallable()
      Returns the details of a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeNamespaceRequest request =
             GetScopeNamespaceRequest.newBuilder()
                 .setName(
                     NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
                 .build();
         ApiFuture<Namespace> future = gkeHubClient.getScopeNamespaceCallable().futureCall(request);
         // Do something.
         Namespace response = future.get();
       }
       
    • createScopeNamespaceAsync

      public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId)
      Creates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         Namespace scopeNamespace = Namespace.newBuilder().build();
         String scopeNamespaceId = "scopeNamespaceId-125738782";
         Namespace response =
             gkeHubClient.createScopeNamespaceAsync(parent, scopeNamespace, scopeNamespaceId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.
      scopeNamespace - Required. The fleet namespace to create.
      scopeNamespaceId - Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createScopeNamespaceAsync

      public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId)
      Creates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         Namespace scopeNamespace = Namespace.newBuilder().build();
         String scopeNamespaceId = "scopeNamespaceId-125738782";
         Namespace response =
             gkeHubClient.createScopeNamespaceAsync(parent, scopeNamespace, scopeNamespaceId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.
      scopeNamespace - Required. The fleet namespace to create.
      scopeNamespaceId - Required. Client chosen ID for the Namespace. `namespace_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createScopeNamespaceAsync

      public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(CreateScopeNamespaceRequest request)
      Creates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeNamespaceRequest request =
             CreateScopeNamespaceRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setScopeNamespaceId("scopeNamespaceId-125738782")
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .build();
         Namespace response = gkeHubClient.createScopeNamespaceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createScopeNamespaceOperationCallable

      public final OperationCallable<CreateScopeNamespaceRequest,Namespace,OperationMetadata> createScopeNamespaceOperationCallable()
      Creates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeNamespaceRequest request =
             CreateScopeNamespaceRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setScopeNamespaceId("scopeNamespaceId-125738782")
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .build();
         OperationFuture<Namespace, OperationMetadata> future =
             gkeHubClient.createScopeNamespaceOperationCallable().futureCall(request);
         // Do something.
         Namespace response = future.get();
       }
       
    • createScopeNamespaceCallable

      public final UnaryCallable<CreateScopeNamespaceRequest,Operation> createScopeNamespaceCallable()
      Creates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeNamespaceRequest request =
             CreateScopeNamespaceRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setScopeNamespaceId("scopeNamespaceId-125738782")
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.createScopeNamespaceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateScopeNamespaceAsync

      public final OperationFuture<Namespace,OperationMetadata> updateScopeNamespaceAsync(Namespace scopeNamespace, com.google.protobuf.FieldMask updateMask)
      Updates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         Namespace scopeNamespace = Namespace.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Namespace response = gkeHubClient.updateScopeNamespaceAsync(scopeNamespace, updateMask).get();
       }
       
      Parameters:
      scopeNamespace - Required. A namespace with fields updated. The 'name' field in this namespace is used to identify the resource to update. Given 'updated' prefix to follow go/proto-best-practices-checkers#keyword_conflict
      updateMask - Required. The fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateScopeNamespaceAsync

      public final OperationFuture<Namespace,OperationMetadata> updateScopeNamespaceAsync(UpdateScopeNamespaceRequest request)
      Updates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeNamespaceRequest request =
             UpdateScopeNamespaceRequest.newBuilder()
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Namespace response = gkeHubClient.updateScopeNamespaceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateScopeNamespaceOperationCallable

      public final OperationCallable<UpdateScopeNamespaceRequest,Namespace,OperationMetadata> updateScopeNamespaceOperationCallable()
      Updates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeNamespaceRequest request =
             UpdateScopeNamespaceRequest.newBuilder()
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<Namespace, OperationMetadata> future =
             gkeHubClient.updateScopeNamespaceOperationCallable().futureCall(request);
         // Do something.
         Namespace response = future.get();
       }
       
    • updateScopeNamespaceCallable

      public final UnaryCallable<UpdateScopeNamespaceRequest,Operation> updateScopeNamespaceCallable()
      Updates a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeNamespaceRequest request =
             UpdateScopeNamespaceRequest.newBuilder()
                 .setScopeNamespace(Namespace.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.updateScopeNamespaceCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteScopeNamespaceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeNamespaceAsync(NamespaceName name)
      Deletes a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         NamespaceName name = NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]");
         gkeHubClient.deleteScopeNamespaceAsync(name).get();
       }
       
      Parameters:
      name - Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeNamespaceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeNamespaceAsync(String name)
      Deletes a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString();
         gkeHubClient.deleteScopeNamespaceAsync(name).get();
       }
       
      Parameters:
      name - Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeNamespaceAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest request)
      Deletes a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeNamespaceRequest request =
             DeleteScopeNamespaceRequest.newBuilder()
                 .setName(
                     NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
                 .build();
         gkeHubClient.deleteScopeNamespaceAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeNamespaceOperationCallable

      public final OperationCallable<DeleteScopeNamespaceRequest,com.google.protobuf.Empty,OperationMetadata> deleteScopeNamespaceOperationCallable()
      Deletes a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeNamespaceRequest request =
             DeleteScopeNamespaceRequest.newBuilder()
                 .setName(
                     NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteScopeNamespaceOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteScopeNamespaceCallable

      public final UnaryCallable<DeleteScopeNamespaceRequest,Operation> deleteScopeNamespaceCallable()
      Deletes a fleet namespace.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeNamespaceRequest request =
             DeleteScopeNamespaceRequest.newBuilder()
                 .setName(
                     NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.deleteScopeNamespaceCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listScopeNamespaces

      public final GkeHubClient.ListScopeNamespacesPagedResponse listScopeNamespaces(ScopeName parent)
      Lists fleet namespaces.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         for (Namespace element : gkeHubClient.listScopeNamespaces(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopeNamespaces

      public final GkeHubClient.ListScopeNamespacesPagedResponse listScopeNamespaces(String parent)
      Lists fleet namespaces.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         for (Namespace element : gkeHubClient.listScopeNamespaces(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopeNamespaces

      Lists fleet namespaces.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeNamespacesRequest request =
             ListScopeNamespacesRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Namespace element : gkeHubClient.listScopeNamespaces(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listScopeNamespacesPagedCallable

      Lists fleet namespaces.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeNamespacesRequest request =
             ListScopeNamespacesRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Namespace> future =
             gkeHubClient.listScopeNamespacesPagedCallable().futureCall(request);
         // Do something.
         for (Namespace element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listScopeNamespacesCallable

      public final UnaryCallable<ListScopeNamespacesRequest,ListScopeNamespacesResponse> listScopeNamespacesCallable()
      Lists fleet namespaces.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeNamespacesRequest request =
             ListScopeNamespacesRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListScopeNamespacesResponse response =
               gkeHubClient.listScopeNamespacesCallable().call(request);
           for (Namespace element : response.getScopeNamespacesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getScopeRBACRoleBinding

      public final RBACRoleBinding getScopeRBACRoleBinding(RBACRoleBindingName name)
      Returns the details of a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBindingName name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                 "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]");
         RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(name);
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getScopeRBACRoleBinding

      public final RBACRoleBinding getScopeRBACRoleBinding(String name)
      Returns the details of a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                     "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                 .toString();
         RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(name);
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getScopeRBACRoleBinding

      public final RBACRoleBinding getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest request)
      Returns the details of a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeRBACRoleBindingRequest request =
             GetScopeRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getScopeRBACRoleBindingCallable

      public final UnaryCallable<GetScopeRBACRoleBindingRequest,RBACRoleBinding> getScopeRBACRoleBindingCallable()
      Returns the details of a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeRBACRoleBindingRequest request =
             GetScopeRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         ApiFuture<RBACRoleBinding> future =
             gkeHubClient.getScopeRBACRoleBindingCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • createScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest request)
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRBACRoleBindingRequest request =
             CreateScopeRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         RBACRoleBinding response = gkeHubClient.createScopeRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createScopeRBACRoleBindingOperationCallable

      public final OperationCallable<CreateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingOperationCallable()
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRBACRoleBindingRequest request =
             CreateScopeRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         OperationFuture<RBACRoleBinding, OperationMetadata> future =
             gkeHubClient.createScopeRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • createScopeRBACRoleBindingCallable

      public final UnaryCallable<CreateScopeRBACRoleBindingRequest,Operation> createScopeRBACRoleBindingCallable()
      Creates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRBACRoleBindingRequest request =
             CreateScopeRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.createScopeRBACRoleBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.FieldMask updateMask)
      Updates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         RBACRoleBinding response =
             gkeHubClient.updateScopeRBACRoleBindingAsync(rbacrolebinding, updateMask).get();
       }
       
      Parameters:
      rbacrolebinding - Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.
      updateMask - Required. The fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateScopeRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest request)
      Updates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRBACRoleBindingRequest request =
             UpdateScopeRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         RBACRoleBinding response = gkeHubClient.updateScopeRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateScopeRBACRoleBindingOperationCallable

      public final OperationCallable<UpdateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingOperationCallable()
      Updates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRBACRoleBindingRequest request =
             UpdateScopeRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<RBACRoleBinding, OperationMetadata> future =
             gkeHubClient.updateScopeRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • updateScopeRBACRoleBindingCallable

      public final UnaryCallable<UpdateScopeRBACRoleBindingRequest,Operation> updateScopeRBACRoleBindingCallable()
      Updates a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRBACRoleBindingRequest request =
             UpdateScopeRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.updateScopeRBACRoleBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteScopeRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(RBACRoleBindingName name)
      Deletes a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBindingName name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                 "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]");
         gkeHubClient.deleteScopeRBACRoleBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(String name)
      Deletes a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                     "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                 .toString();
         gkeHubClient.deleteScopeRBACRoleBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest request)
      Deletes a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRBACRoleBindingRequest request =
             DeleteScopeRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         gkeHubClient.deleteScopeRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeRBACRoleBindingOperationCallable

      public final OperationCallable<DeleteScopeRBACRoleBindingRequest,com.google.protobuf.Empty,OperationMetadata> deleteScopeRBACRoleBindingOperationCallable()
      Deletes a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRBACRoleBindingRequest request =
             DeleteScopeRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteScopeRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteScopeRBACRoleBindingCallable

      public final UnaryCallable<DeleteScopeRBACRoleBindingRequest,Operation> deleteScopeRBACRoleBindingCallable()
      Deletes a Scope RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRBACRoleBindingRequest request =
             DeleteScopeRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.deleteScopeRBACRoleBindingCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listScopeRBACRoleBindings

      public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(MembershipName parent)
      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopeRBACRoleBindings

      public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(ScopeName parent)
      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopeRBACRoleBindings

      public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(String parent)
      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopeRBACRoleBindings

      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeRBACRoleBindingsRequest request =
             ListScopeRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listScopeRBACRoleBindingsPagedCallable

      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeRBACRoleBindingsRequest request =
             ListScopeRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<RBACRoleBinding> future =
             gkeHubClient.listScopeRBACRoleBindingsPagedCallable().futureCall(request);
         // Do something.
         for (RBACRoleBinding element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listScopeRBACRoleBindingsCallable

      public final UnaryCallable<ListScopeRBACRoleBindingsRequest,ListScopeRBACRoleBindingsResponse> listScopeRBACRoleBindingsCallable()
      Lists all Scope RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopeRBACRoleBindingsRequest request =
             ListScopeRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListScopeRBACRoleBindingsResponse response =
               gkeHubClient.listScopeRBACRoleBindingsCallable().call(request);
           for (RBACRoleBinding element : response.getRbacrolebindingsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getScope

      public final Scope getScope(ScopeName name)
      Returns the details of a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         Scope response = gkeHubClient.getScope(name);
       }
       
      Parameters:
      name - Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • getScope

      public final Scope getScope(String name)
      Returns the details of a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         Scope response = gkeHubClient.getScope(name);
       }
       
      Parameters:
      name - Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • getScope

      public final Scope getScope(GetScopeRequest request)
      Returns the details of a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeRequest request =
             GetScopeRequest.newBuilder()
                 .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .build();
         Scope response = gkeHubClient.getScope(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getScopeCallable

      public final UnaryCallable<GetScopeRequest,Scope> getScopeCallable()
      Returns the details of a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetScopeRequest request =
             GetScopeRequest.newBuilder()
                 .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .build();
         ApiFuture<Scope> future = gkeHubClient.getScopeCallable().futureCall(request);
         // Do something.
         Scope response = future.get();
       }
       
    • createScopeAsync

      public final OperationFuture<Scope,OperationMetadata> createScopeAsync(LocationName parent, Scope scope, String scopeId)
      Creates a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         Scope scope = Scope.newBuilder().build();
         String scopeId = "scopeId1923941007";
         Scope response = gkeHubClient.createScopeAsync(parent, scope, scopeId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be created. Specified in the format `projects/*/locations/*`.
      scope - Required. The Scope to create.
      scopeId - Required. Client chosen ID for the Scope. `scope_id` must be a ????
      Throws:
      ApiException - if the remote call fails
    • createScopeAsync

      public final OperationFuture<Scope,OperationMetadata> createScopeAsync(String parent, Scope scope, String scopeId)
      Creates a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         Scope scope = Scope.newBuilder().build();
         String scopeId = "scopeId1923941007";
         Scope response = gkeHubClient.createScopeAsync(parent, scope, scopeId).get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be created. Specified in the format `projects/*/locations/*`.
      scope - Required. The Scope to create.
      scopeId - Required. Client chosen ID for the Scope. `scope_id` must be a ????
      Throws:
      ApiException - if the remote call fails
    • createScopeAsync

      public final OperationFuture<Scope,OperationMetadata> createScopeAsync(CreateScopeRequest request)
      Creates a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRequest request =
             CreateScopeRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setScopeId("scopeId1923941007")
                 .setScope(Scope.newBuilder().build())
                 .build();
         Scope response = gkeHubClient.createScopeAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createScopeOperationCallable

      public final OperationCallable<CreateScopeRequest,Scope,OperationMetadata> createScopeOperationCallable()
      Creates a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRequest request =
             CreateScopeRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setScopeId("scopeId1923941007")
                 .setScope(Scope.newBuilder().build())
                 .build();
         OperationFuture<Scope, OperationMetadata> future =
             gkeHubClient.createScopeOperationCallable().futureCall(request);
         // Do something.
         Scope response = future.get();
       }
       
    • createScopeCallable

      public final UnaryCallable<CreateScopeRequest,Operation> createScopeCallable()
      Creates a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateScopeRequest request =
             CreateScopeRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setScopeId("scopeId1923941007")
                 .setScope(Scope.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.createScopeCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateScopeAsync

      public final OperationFuture<Scope,OperationMetadata> updateScopeAsync(Scope scope, com.google.protobuf.FieldMask updateMask)
      Updates a scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         Scope scope = Scope.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         Scope response = gkeHubClient.updateScopeAsync(scope, updateMask).get();
       }
       
      Parameters:
      scope - Required. A Scope with fields updated. The 'name' field in this namespace is used to identify the resource to update.
      updateMask - Required. The fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateScopeAsync

      public final OperationFuture<Scope,OperationMetadata> updateScopeAsync(UpdateScopeRequest request)
      Updates a scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRequest request =
             UpdateScopeRequest.newBuilder()
                 .setScope(Scope.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Scope response = gkeHubClient.updateScopeAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateScopeOperationCallable

      public final OperationCallable<UpdateScopeRequest,Scope,OperationMetadata> updateScopeOperationCallable()
      Updates a scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRequest request =
             UpdateScopeRequest.newBuilder()
                 .setScope(Scope.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<Scope, OperationMetadata> future =
             gkeHubClient.updateScopeOperationCallable().futureCall(request);
         // Do something.
         Scope response = future.get();
       }
       
    • updateScopeCallable

      public final UnaryCallable<UpdateScopeRequest,Operation> updateScopeCallable()
      Updates a scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateScopeRequest request =
             UpdateScopeRequest.newBuilder()
                 .setScope(Scope.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.updateScopeCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteScopeAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(ScopeName name)
      Deletes a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         gkeHubClient.deleteScopeAsync(name).get();
       }
       
      Parameters:
      name - Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(String name)
      Deletes a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         gkeHubClient.deleteScopeAsync(name).get();
       }
       
      Parameters:
      name - Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(DeleteScopeRequest request)
      Deletes a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRequest request =
             DeleteScopeRequest.newBuilder()
                 .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .build();
         gkeHubClient.deleteScopeAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteScopeOperationCallable

      public final OperationCallable<DeleteScopeRequest,com.google.protobuf.Empty,OperationMetadata> deleteScopeOperationCallable()
      Deletes a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRequest request =
             DeleteScopeRequest.newBuilder()
                 .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteScopeOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteScopeCallable

      public final UnaryCallable<DeleteScopeRequest,Operation> deleteScopeCallable()
      Deletes a Scope.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteScopeRequest request =
             DeleteScopeRequest.newBuilder()
                 .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .build();
         ApiFuture<Operation> future = gkeHubClient.deleteScopeCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listScopes

      public final GkeHubClient.ListScopesPagedResponse listScopes(LocationName parent)
      Lists Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Scope element : gkeHubClient.listScopes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopes

      public final GkeHubClient.ListScopesPagedResponse listScopes(String parent)
      Lists Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Scope element : gkeHubClient.listScopes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listScopes

      public final GkeHubClient.ListScopesPagedResponse listScopes(ListScopesRequest request)
      Lists Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopesRequest request =
             ListScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Scope element : gkeHubClient.listScopes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listScopesPagedCallable

      public final UnaryCallable<ListScopesRequest,GkeHubClient.ListScopesPagedResponse> listScopesPagedCallable()
      Lists Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopesRequest request =
             ListScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Scope> future = gkeHubClient.listScopesPagedCallable().futureCall(request);
         // Do something.
         for (Scope element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listScopesCallable

      public final UnaryCallable<ListScopesRequest,ListScopesResponse> listScopesCallable()
      Lists Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListScopesRequest request =
             ListScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListScopesResponse response = gkeHubClient.listScopesCallable().call(request);
           for (Scope element : response.getScopesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listPermittedScopes

      public final GkeHubClient.ListPermittedScopesPagedResponse listPermittedScopes(LocationName parent)
      Lists permitted Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (Scope element : gkeHubClient.listPermittedScopes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listPermittedScopes

      public final GkeHubClient.ListPermittedScopesPagedResponse listPermittedScopes(String parent)
      Lists permitted Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (Scope element : gkeHubClient.listPermittedScopes(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.
      Throws:
      ApiException - if the remote call fails
    • listPermittedScopes

      Lists permitted Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListPermittedScopesRequest request =
             ListPermittedScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Scope element : gkeHubClient.listPermittedScopes(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listPermittedScopesPagedCallable

      Lists permitted Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListPermittedScopesRequest request =
             ListPermittedScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Scope> future = gkeHubClient.listPermittedScopesPagedCallable().futureCall(request);
         // Do something.
         for (Scope element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listPermittedScopesCallable

      public final UnaryCallable<ListPermittedScopesRequest,ListPermittedScopesResponse> listPermittedScopesCallable()
      Lists permitted Scopes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListPermittedScopesRequest request =
             ListPermittedScopesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListPermittedScopesResponse response =
               gkeHubClient.listPermittedScopesCallable().call(request);
           for (Scope element : response.getScopesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getMembershipBinding

      public final MembershipBinding getMembershipBinding(MembershipBindingName name)
      Returns the details of a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipBindingName name =
             MembershipBindingName.of(
                 "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]");
         MembershipBinding response = gkeHubClient.getMembershipBinding(name);
       }
       
      Parameters:
      name - Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembershipBinding

      public final MembershipBinding getMembershipBinding(String name)
      Returns the details of a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             MembershipBindingName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                 .toString();
         MembershipBinding response = gkeHubClient.getMembershipBinding(name);
       }
       
      Parameters:
      name - Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembershipBinding

      public final MembershipBinding getMembershipBinding(GetMembershipBindingRequest request)
      Returns the details of a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipBindingRequest request =
             GetMembershipBindingRequest.newBuilder()
                 .setName(
                     MembershipBindingName.of(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                         .toString())
                 .build();
         MembershipBinding response = gkeHubClient.getMembershipBinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMembershipBindingCallable

      public final UnaryCallable<GetMembershipBindingRequest,MembershipBinding> getMembershipBindingCallable()
      Returns the details of a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipBindingRequest request =
             GetMembershipBindingRequest.newBuilder()
                 .setName(
                     MembershipBindingName.of(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                         .toString())
                 .build();
         ApiFuture<MembershipBinding> future =
             gkeHubClient.getMembershipBindingCallable().futureCall(request);
         // Do something.
         MembershipBinding response = future.get();
       }
       
    • createMembershipBindingAsync

      public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId)
      Creates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
         String membershipBindingId = "membershipBindingId1360802634";
         MembershipBinding response =
             gkeHubClient
                 .createMembershipBindingAsync(parent, membershipBinding, membershipBindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.
      membershipBinding - Required. The MembershipBinding to create.
      membershipBindingId - Required. The ID to use for the MembershipBinding.
      Throws:
      ApiException - if the remote call fails
    • createMembershipBindingAsync

      public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId)
      Creates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
         MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
         String membershipBindingId = "membershipBindingId1360802634";
         MembershipBinding response =
             gkeHubClient
                 .createMembershipBindingAsync(parent, membershipBinding, membershipBindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.
      membershipBinding - Required. The MembershipBinding to create.
      membershipBindingId - Required. The ID to use for the MembershipBinding.
      Throws:
      ApiException - if the remote call fails
    • createMembershipBindingAsync

      public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(CreateMembershipBindingRequest request)
      Creates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipBindingRequest request =
             CreateMembershipBindingRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setMembershipBindingId("membershipBindingId1360802634")
                 .build();
         MembershipBinding response = gkeHubClient.createMembershipBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMembershipBindingOperationCallable

      public final OperationCallable<CreateMembershipBindingRequest,MembershipBinding,OperationMetadata> createMembershipBindingOperationCallable()
      Creates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipBindingRequest request =
             CreateMembershipBindingRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setMembershipBindingId("membershipBindingId1360802634")
                 .build();
         OperationFuture<MembershipBinding, OperationMetadata> future =
             gkeHubClient.createMembershipBindingOperationCallable().futureCall(request);
         // Do something.
         MembershipBinding response = future.get();
       }
       
    • createMembershipBindingCallable

      public final UnaryCallable<CreateMembershipBindingRequest,Operation> createMembershipBindingCallable()
      Creates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipBindingRequest request =
             CreateMembershipBindingRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setMembershipBindingId("membershipBindingId1360802634")
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.createMembershipBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateMembershipBindingAsync

      public final OperationFuture<MembershipBinding,OperationMetadata> updateMembershipBindingAsync(MembershipBinding membershipBinding, com.google.protobuf.FieldMask updateMask)
      Updates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         MembershipBinding response =
             gkeHubClient.updateMembershipBindingAsync(membershipBinding, updateMask).get();
       }
       
      Parameters:
      membershipBinding - Required. The MembershipBinding object with fields updated.
      updateMask - Required. The fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipBindingAsync

      public final OperationFuture<MembershipBinding,OperationMetadata> updateMembershipBindingAsync(UpdateMembershipBindingRequest request)
      Updates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipBindingRequest request =
             UpdateMembershipBindingRequest.newBuilder()
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         MembershipBinding response = gkeHubClient.updateMembershipBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipBindingOperationCallable

      public final OperationCallable<UpdateMembershipBindingRequest,MembershipBinding,OperationMetadata> updateMembershipBindingOperationCallable()
      Updates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipBindingRequest request =
             UpdateMembershipBindingRequest.newBuilder()
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<MembershipBinding, OperationMetadata> future =
             gkeHubClient.updateMembershipBindingOperationCallable().futureCall(request);
         // Do something.
         MembershipBinding response = future.get();
       }
       
    • updateMembershipBindingCallable

      public final UnaryCallable<UpdateMembershipBindingRequest,Operation> updateMembershipBindingCallable()
      Updates a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipBindingRequest request =
             UpdateMembershipBindingRequest.newBuilder()
                 .setMembershipBinding(MembershipBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.updateMembershipBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMembershipBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipBindingAsync(MembershipBindingName name)
      Deletes a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipBindingName name =
             MembershipBindingName.of(
                 "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]");
         gkeHubClient.deleteMembershipBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipBindingAsync(String name)
      Deletes a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             MembershipBindingName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                 .toString();
         gkeHubClient.deleteMembershipBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipBindingAsync(DeleteMembershipBindingRequest request)
      Deletes a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipBindingRequest request =
             DeleteMembershipBindingRequest.newBuilder()
                 .setName(
                     MembershipBindingName.of(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                         .toString())
                 .build();
         gkeHubClient.deleteMembershipBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipBindingOperationCallable

      public final OperationCallable<DeleteMembershipBindingRequest,com.google.protobuf.Empty,OperationMetadata> deleteMembershipBindingOperationCallable()
      Deletes a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipBindingRequest request =
             DeleteMembershipBindingRequest.newBuilder()
                 .setName(
                     MembershipBindingName.of(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteMembershipBindingOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteMembershipBindingCallable

      public final UnaryCallable<DeleteMembershipBindingRequest,Operation> deleteMembershipBindingCallable()
      Deletes a MembershipBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipBindingRequest request =
             DeleteMembershipBindingRequest.newBuilder()
                 .setName(
                     MembershipBindingName.of(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.deleteMembershipBindingCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listMembershipBindings

      public final GkeHubClient.ListMembershipBindingsPagedResponse listMembershipBindings(MembershipName parent)
      Lists MembershipBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         for (MembershipBinding element : gkeHubClient.listMembershipBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • listMembershipBindings

      public final GkeHubClient.ListMembershipBindingsPagedResponse listMembershipBindings(String parent)
      Lists MembershipBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
         for (MembershipBinding element : gkeHubClient.listMembershipBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • listMembershipBindings

      Lists MembershipBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipBindingsRequest request =
             ListMembershipBindingsRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         for (MembershipBinding element : gkeHubClient.listMembershipBindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMembershipBindingsPagedCallable

      Lists MembershipBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipBindingsRequest request =
             ListMembershipBindingsRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         ApiFuture<MembershipBinding> future =
             gkeHubClient.listMembershipBindingsPagedCallable().futureCall(request);
         // Do something.
         for (MembershipBinding element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMembershipBindingsCallable

      public final UnaryCallable<ListMembershipBindingsRequest,ListMembershipBindingsResponse> listMembershipBindingsCallable()
      Lists MembershipBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipBindingsRequest request =
             ListMembershipBindingsRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .build();
         while (true) {
           ListMembershipBindingsResponse response =
               gkeHubClient.listMembershipBindingsCallable().call(request);
           for (MembershipBinding element : response.getMembershipBindingsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getMembershipRBACRoleBinding

      public final RBACRoleBinding getMembershipRBACRoleBinding(RBACRoleBindingName name)
      Returns the details of a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBindingName name =
             RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                 "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]");
         RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(name);
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembershipRBACRoleBinding

      public final RBACRoleBinding getMembershipRBACRoleBinding(String name)
      Returns the details of a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                     "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                 .toString();
         RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(name);
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • getMembershipRBACRoleBinding

      public final RBACRoleBinding getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest request)
      Returns the details of a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipRBACRoleBindingRequest request =
             GetMembershipRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMembershipRBACRoleBindingCallable

      public final UnaryCallable<GetMembershipRBACRoleBindingRequest,RBACRoleBinding> getMembershipRBACRoleBindingCallable()
      Returns the details of a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GetMembershipRBACRoleBindingRequest request =
             GetMembershipRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         ApiFuture<RBACRoleBinding> future =
             gkeHubClient.getMembershipRBACRoleBindingCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • createMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         String rbacrolebindingId = "rbacrolebindingId827577784";
         RBACRoleBinding response =
             gkeHubClient
                 .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.
      rbacrolebinding - Required. The rbacrolebindings to create.
      rbacrolebindingId - Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` must be a valid RFC 1123 compliant DNS label:

      1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or `-` 3. It must start and end with an alphanumeric character

      Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.

      Throws:
      ApiException - if the remote call fails
    • createMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest request)
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRBACRoleBindingRequest request =
             CreateMembershipRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         RBACRoleBinding response = gkeHubClient.createMembershipRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMembershipRBACRoleBindingOperationCallable

      public final OperationCallable<CreateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingOperationCallable()
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRBACRoleBindingRequest request =
             CreateMembershipRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         OperationFuture<RBACRoleBinding, OperationMetadata> future =
             gkeHubClient.createMembershipRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • createMembershipRBACRoleBindingCallable

      public final UnaryCallable<CreateMembershipRBACRoleBindingRequest,Operation> createMembershipRBACRoleBindingCallable()
      Creates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         CreateMembershipRBACRoleBindingRequest request =
             CreateMembershipRBACRoleBindingRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.createMembershipRBACRoleBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.FieldMask updateMask)
      Updates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         RBACRoleBinding response =
             gkeHubClient.updateMembershipRBACRoleBindingAsync(rbacrolebinding, updateMask).get();
       }
       
      Parameters:
      rbacrolebinding - Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.
      updateMask - Required. The fields to be updated.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipRBACRoleBindingAsync

      public final OperationFuture<RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest request)
      Updates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRBACRoleBindingRequest request =
             UpdateMembershipRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         RBACRoleBinding response = gkeHubClient.updateMembershipRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMembershipRBACRoleBindingOperationCallable

      public final OperationCallable<UpdateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingOperationCallable()
      Updates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRBACRoleBindingRequest request =
             UpdateMembershipRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OperationFuture<RBACRoleBinding, OperationMetadata> future =
             gkeHubClient.updateMembershipRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         RBACRoleBinding response = future.get();
       }
       
    • updateMembershipRBACRoleBindingCallable

      public final UnaryCallable<UpdateMembershipRBACRoleBindingRequest,Operation> updateMembershipRBACRoleBindingCallable()
      Updates a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         UpdateMembershipRBACRoleBindingRequest request =
             UpdateMembershipRBACRoleBindingRequest.newBuilder()
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.updateMembershipRBACRoleBindingCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteMembershipRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(RBACRoleBindingName name)
      Deletes a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         RBACRoleBindingName name =
             RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                 "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]");
         gkeHubClient.deleteMembershipRBACRoleBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(String name)
      Deletes a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String name =
             RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                     "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                 .toString();
         gkeHubClient.deleteMembershipRBACRoleBindingAsync(name).get();
       }
       
      Parameters:
      name - Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipRBACRoleBindingAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest request)
      Deletes a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRBACRoleBindingRequest request =
             DeleteMembershipRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         gkeHubClient.deleteMembershipRBACRoleBindingAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMembershipRBACRoleBindingOperationCallable

      public final OperationCallable<DeleteMembershipRBACRoleBindingRequest,com.google.protobuf.Empty,OperationMetadata> deleteMembershipRBACRoleBindingOperationCallable()
      Deletes a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRBACRoleBindingRequest request =
             DeleteMembershipRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             gkeHubClient.deleteMembershipRBACRoleBindingOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteMembershipRBACRoleBindingCallable

      public final UnaryCallable<DeleteMembershipRBACRoleBindingRequest,Operation> deleteMembershipRBACRoleBindingCallable()
      Deletes a Membership RBACRoleBinding.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         DeleteMembershipRBACRoleBindingRequest request =
             DeleteMembershipRBACRoleBindingRequest.newBuilder()
                 .setName(
                     RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                             "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                         .toString())
                 .build();
         ApiFuture<Operation> future =
             gkeHubClient.deleteMembershipRBACRoleBindingCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • listMembershipRBACRoleBindings

      public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(MembershipName parent)
      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
         for (RBACRoleBinding element :
             gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • listMembershipRBACRoleBindings

      public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(ScopeName parent)
      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
         for (RBACRoleBinding element :
             gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • listMembershipRBACRoleBindings

      public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(String parent)
      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
         for (RBACRoleBinding element :
             gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.
      Throws:
      ApiException - if the remote call fails
    • listMembershipRBACRoleBindings

      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipRBACRoleBindingsRequest request =
             ListMembershipRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (RBACRoleBinding element :
             gkeHubClient.listMembershipRBACRoleBindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMembershipRBACRoleBindingsPagedCallable

      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipRBACRoleBindingsRequest request =
             ListMembershipRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<RBACRoleBinding> future =
             gkeHubClient.listMembershipRBACRoleBindingsPagedCallable().futureCall(request);
         // Do something.
         for (RBACRoleBinding element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMembershipRBACRoleBindingsCallable

      public final UnaryCallable<ListMembershipRBACRoleBindingsRequest,ListMembershipRBACRoleBindingsResponse> listMembershipRBACRoleBindingsCallable()
      Lists all Membership RBACRoleBindings.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         ListMembershipRBACRoleBindingsRequest request =
             ListMembershipRBACRoleBindingsRequest.newBuilder()
                 .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListMembershipRBACRoleBindingsResponse response =
               gkeHubClient.listMembershipRBACRoleBindingsCallable().call(request);
           for (RBACRoleBinding element : response.getRbacrolebindingsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • generateMembershipRBACRoleBindingYAML

      public final GenerateMembershipRBACRoleBindingYAMLResponse generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest request)
      Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GenerateMembershipRBACRoleBindingYAMLRequest request =
             GenerateMembershipRBACRoleBindingYAMLRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         GenerateMembershipRBACRoleBindingYAMLResponse response =
             gkeHubClient.generateMembershipRBACRoleBindingYAML(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • generateMembershipRBACRoleBindingYAMLCallable

      Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
         GenerateMembershipRBACRoleBindingYAMLRequest request =
             GenerateMembershipRBACRoleBindingYAMLRequest.newBuilder()
                 .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
                 .setRbacrolebindingId("rbacrolebindingId827577784")
                 .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
                 .build();
         ApiFuture<GenerateMembershipRBACRoleBindingYAMLResponse> future =
             gkeHubClient.generateMembershipRBACRoleBindingYAMLCallable().futureCall(request);
         // Do something.
         GenerateMembershipRBACRoleBindingYAMLResponse response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException