| GitHub Repository | Product Reference |
Service Description: Service for managing customer support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
SupportEventSubscription supportEventSubscription =
SupportEventSubscription.newBuilder().build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.createSupportEventSubscription(
parent, supportEventSubscription);
}
Note: close() needs to be called on the SupportEventSubscriptionServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
CreateSupportEventSubscription |
Creates a support event subscription for an organization. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSupportEventSubscription |
Gets a support event subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSupportEventSubscriptions |
Lists support event subscriptions. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSupportEventSubscription |
Updates a support event subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSupportEventSubscription |
Soft deletes a support event subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UndeleteSupportEventSubscription |
Undeletes a support event subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 SupportEventSubscriptionServiceSettings 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
SupportEventSubscriptionServiceSettings supportEventSubscriptionServiceSettings =
SupportEventSubscriptionServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create(supportEventSubscriptionServiceSettings);
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
SupportEventSubscriptionServiceSettings supportEventSubscriptionServiceSettings =
SupportEventSubscriptionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create(supportEventSubscriptionServiceSettings);
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
SupportEventSubscriptionServiceSettings supportEventSubscriptionServiceSettings =
SupportEventSubscriptionServiceSettings.newHttpJsonBuilder().build();
SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create(supportEventSubscriptionServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final SupportEventSubscriptionServiceClient create()Constructs an instance of SupportEventSubscriptionServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SupportEventSubscriptionServiceSettings settings)
public static final SupportEventSubscriptionServiceClient create(SupportEventSubscriptionServiceSettings settings)Constructs an instance of SupportEventSubscriptionServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
SupportEventSubscriptionServiceSettings |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SupportEventSubscriptionServiceStub stub)
public static final SupportEventSubscriptionServiceClient create(SupportEventSubscriptionServiceStub stub)Constructs an instance of SupportEventSubscriptionServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(SupportEventSubscriptionServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
SupportEventSubscriptionServiceStub |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient |
|
Constructors
SupportEventSubscriptionServiceClient(SupportEventSubscriptionServiceSettings settings)
protected SupportEventSubscriptionServiceClient(SupportEventSubscriptionServiceSettings settings)Constructs an instance of SupportEventSubscriptionServiceClient, 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.
| Parameter | |
|---|---|
| Name | Description |
settings |
SupportEventSubscriptionServiceSettings |
SupportEventSubscriptionServiceClient(SupportEventSubscriptionServiceStub stub)
protected SupportEventSubscriptionServiceClient(SupportEventSubscriptionServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
SupportEventSubscriptionServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()createSupportEventSubscription(CreateSupportEventSubscriptionRequest request)
public final SupportEventSubscription createSupportEventSubscription(CreateSupportEventSubscriptionRequest request)Creates a support event subscription for an organization.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
CreateSupportEventSubscriptionRequest request =
CreateSupportEventSubscriptionRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setSupportEventSubscription(SupportEventSubscription.newBuilder().build())
.build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.createSupportEventSubscription(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateSupportEventSubscriptionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
createSupportEventSubscription(OrganizationName parent, SupportEventSubscription supportEventSubscription)
public final SupportEventSubscription createSupportEventSubscription(OrganizationName parent, SupportEventSubscription supportEventSubscription)Creates a support event subscription for an organization.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
SupportEventSubscription supportEventSubscription =
SupportEventSubscription.newBuilder().build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.createSupportEventSubscription(
parent, supportEventSubscription);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. The parent resource name where the support event subscription will be created. Format: organizations/{organization_id} |
supportEventSubscription |
SupportEventSubscriptionRequired. The Pub/Sub configuration to create. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
createSupportEventSubscription(String parent, SupportEventSubscription supportEventSubscription)
public final SupportEventSubscription createSupportEventSubscription(String parent, SupportEventSubscription supportEventSubscription)Creates a support event subscription for an organization.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
SupportEventSubscription supportEventSubscription =
SupportEventSubscription.newBuilder().build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.createSupportEventSubscription(
parent, supportEventSubscription);
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource name where the support event subscription will be created. Format: organizations/{organization_id} |
supportEventSubscription |
SupportEventSubscriptionRequired. The Pub/Sub configuration to create. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
createSupportEventSubscriptionCallable()
public final UnaryCallable<CreateSupportEventSubscriptionRequest,SupportEventSubscription> createSupportEventSubscriptionCallable()Creates a support event subscription for an organization.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
CreateSupportEventSubscriptionRequest request =
CreateSupportEventSubscriptionRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setSupportEventSubscription(SupportEventSubscription.newBuilder().build())
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.createSupportEventSubscriptionCallable()
.futureCall(request);
// Do something.
SupportEventSubscription response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateSupportEventSubscriptionRequest,SupportEventSubscription> |
|
deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest request)
public final SupportEventSubscription deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest request)Soft deletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
DeleteSupportEventSubscriptionRequest request =
DeleteSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.deleteSupportEventSubscription(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteSupportEventSubscriptionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
deleteSupportEventSubscription(SupportEventSubscriptionName name)
public final SupportEventSubscription deleteSupportEventSubscription(SupportEventSubscriptionName name)Soft deletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
SupportEventSubscriptionName name =
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]");
SupportEventSubscription response =
supportEventSubscriptionServiceClient.deleteSupportEventSubscription(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
SupportEventSubscriptionNameRequired. The name of the support event subscription to delete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
deleteSupportEventSubscription(String name)
public final SupportEventSubscription deleteSupportEventSubscription(String name)Soft deletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
String name =
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.deleteSupportEventSubscription(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the support event subscription to delete. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
deleteSupportEventSubscriptionCallable()
public final UnaryCallable<DeleteSupportEventSubscriptionRequest,SupportEventSubscription> deleteSupportEventSubscriptionCallable()Soft deletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
DeleteSupportEventSubscriptionRequest request =
DeleteSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.deleteSupportEventSubscriptionCallable()
.futureCall(request);
// Do something.
SupportEventSubscription response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteSupportEventSubscriptionRequest,SupportEventSubscription> |
|
getSettings()
public final SupportEventSubscriptionServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceSettings |
|
getStub()
public SupportEventSubscriptionServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceStub |
|
getSupportEventSubscription(GetSupportEventSubscriptionRequest request)
public final SupportEventSubscription getSupportEventSubscription(GetSupportEventSubscriptionRequest request)Gets a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
GetSupportEventSubscriptionRequest request =
GetSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.getSupportEventSubscription(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetSupportEventSubscriptionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
getSupportEventSubscription(SupportEventSubscriptionName name)
public final SupportEventSubscription getSupportEventSubscription(SupportEventSubscriptionName name)Gets a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
SupportEventSubscriptionName name =
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]");
SupportEventSubscription response =
supportEventSubscriptionServiceClient.getSupportEventSubscription(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
SupportEventSubscriptionNameRequired. The name of the support event subscription to retrieve. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
getSupportEventSubscription(String name)
public final SupportEventSubscription getSupportEventSubscription(String name)Gets a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
String name =
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.getSupportEventSubscription(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the support event subscription to retrieve. Format: organizations/{organization_id}/supportEventSubscriptions/{subscription_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
getSupportEventSubscriptionCallable()
public final UnaryCallable<GetSupportEventSubscriptionRequest,SupportEventSubscription> getSupportEventSubscriptionCallable()Gets a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
GetSupportEventSubscriptionRequest request =
GetSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.getSupportEventSubscriptionCallable()
.futureCall(request);
// Do something.
SupportEventSubscription response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetSupportEventSubscriptionRequest,SupportEventSubscription> |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest request)
public final SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest request)Lists support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
ListSupportEventSubscriptionsRequest request =
ListSupportEventSubscriptionsRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setFilter("filter-1274492040")
.setShowDeleted(true)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SupportEventSubscription element :
supportEventSubscriptionServiceClient
.listSupportEventSubscriptions(request)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListSupportEventSubscriptionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse |
|
listSupportEventSubscriptions(OrganizationName parent)
public final SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse listSupportEventSubscriptions(OrganizationName parent)Lists support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
for (SupportEventSubscription element :
supportEventSubscriptionServiceClient
.listSupportEventSubscriptions(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
OrganizationNameRequired. The fully qualified name of the Cloud resource to list support event subscriptions under. Format: organizations/{organization_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse |
|
listSupportEventSubscriptions(String parent)
public final SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse listSupportEventSubscriptions(String parent)Lists support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
String parent = OrganizationName.of("[ORGANIZATION]").toString();
for (SupportEventSubscription element :
supportEventSubscriptionServiceClient
.listSupportEventSubscriptions(parent)
.iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The fully qualified name of the Cloud resource to list support event subscriptions under. Format: organizations/{organization_id} |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse |
|
listSupportEventSubscriptionsCallable()
public final UnaryCallable<ListSupportEventSubscriptionsRequest,ListSupportEventSubscriptionsResponse> listSupportEventSubscriptionsCallable()Lists support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
ListSupportEventSubscriptionsRequest request =
ListSupportEventSubscriptionsRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setFilter("filter-1274492040")
.setShowDeleted(true)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSupportEventSubscriptionsResponse response =
supportEventSubscriptionServiceClient
.listSupportEventSubscriptionsCallable()
.call(request);
for (SupportEventSubscription element : response.getSupportEventSubscriptionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSupportEventSubscriptionsRequest,ListSupportEventSubscriptionsResponse> |
|
listSupportEventSubscriptionsPagedCallable()
public final UnaryCallable<ListSupportEventSubscriptionsRequest,SupportEventSubscriptionServiceClient.ListSupportEventSubscriptionsPagedResponse> listSupportEventSubscriptionsPagedCallable()Lists support event subscriptions.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
ListSupportEventSubscriptionsRequest request =
ListSupportEventSubscriptionsRequest.newBuilder()
.setParent(OrganizationName.of("[ORGANIZATION]").toString())
.setFilter("filter-1274492040")
.setShowDeleted(true)
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.listSupportEventSubscriptionsPagedCallable()
.futureCall(request);
// Do something.
for (SupportEventSubscription element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSupportEventSubscriptionsRequest,ListSupportEventSubscriptionsPagedResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest request)
public final SupportEventSubscription undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest request)Undeletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
UndeleteSupportEventSubscriptionRequest request =
UndeleteSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.undeleteSupportEventSubscription(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UndeleteSupportEventSubscriptionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
undeleteSupportEventSubscriptionCallable()
public final UnaryCallable<UndeleteSupportEventSubscriptionRequest,SupportEventSubscription> undeleteSupportEventSubscriptionCallable()Undeletes a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
UndeleteSupportEventSubscriptionRequest request =
UndeleteSupportEventSubscriptionRequest.newBuilder()
.setName(
SupportEventSubscriptionName.of("[ORGANIZATION]", "[SUPPORT_EVENT_SUBSCRIPTION]")
.toString())
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.undeleteSupportEventSubscriptionCallable()
.futureCall(request);
// Do something.
SupportEventSubscription response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UndeleteSupportEventSubscriptionRequest,SupportEventSubscription> |
|
updateSupportEventSubscription(SupportEventSubscription supportEventSubscription, FieldMask updateMask)
public final SupportEventSubscription updateSupportEventSubscription(SupportEventSubscription supportEventSubscription, FieldMask updateMask)Updates a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
SupportEventSubscription supportEventSubscription =
SupportEventSubscription.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.updateSupportEventSubscription(
supportEventSubscription, updateMask);
}
| Parameters | |
|---|---|
| Name | Description |
supportEventSubscription |
SupportEventSubscriptionRequired. The support event subscription to update. The |
updateMask |
FieldMaskOptional. The list of fields to update. The only supported value is pub_sub_topic. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest request)
public final SupportEventSubscription updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest request)Updates a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
UpdateSupportEventSubscriptionRequest request =
UpdateSupportEventSubscriptionRequest.newBuilder()
.setSupportEventSubscription(SupportEventSubscription.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
SupportEventSubscription response =
supportEventSubscriptionServiceClient.updateSupportEventSubscription(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateSupportEventSubscriptionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SupportEventSubscription |
|
updateSupportEventSubscriptionCallable()
public final UnaryCallable<UpdateSupportEventSubscriptionRequest,SupportEventSubscription> updateSupportEventSubscriptionCallable()Updates a support event subscription.
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 (SupportEventSubscriptionServiceClient supportEventSubscriptionServiceClient =
SupportEventSubscriptionServiceClient.create()) {
UpdateSupportEventSubscriptionRequest request =
UpdateSupportEventSubscriptionRequest.newBuilder()
.setSupportEventSubscription(SupportEventSubscription.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<SupportEventSubscription> future =
supportEventSubscriptionServiceClient
.updateSupportEventSubscriptionCallable()
.futureCall(request);
// Do something.
SupportEventSubscription response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateSupportEventSubscriptionRequest,SupportEventSubscription> |
|