GitHub Repository | Product Reference |
Service Description: Service to provide an issue resolution content for account issues and product issues.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
RenderAccountIssuesResponse response = issueResolutionServiceClient.renderAccountIssues(name);
}
Note: close() needs to be called on the IssueResolutionServiceClient 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 |
---|---|---|
RenderAccountIssues |
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications. |
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.
|
RenderProductIssues |
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications. |
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.
|
TriggerAction |
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form. The action can be successfully started only once all |
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.
|
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 IssueResolutionServiceSettings 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
IssueResolutionServiceSettings issueResolutionServiceSettings =
IssueResolutionServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create(issueResolutionServiceSettings);
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
IssueResolutionServiceSettings issueResolutionServiceSettings =
IssueResolutionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create(issueResolutionServiceSettings);
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
IssueResolutionServiceSettings issueResolutionServiceSettings =
IssueResolutionServiceSettings.newHttpJsonBuilder().build();
IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create(issueResolutionServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final IssueResolutionServiceClient create()
Constructs an instance of IssueResolutionServiceClient with default settings.
Returns | |
---|---|
Type | Description |
IssueResolutionServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(IssueResolutionServiceSettings settings)
public static final IssueResolutionServiceClient create(IssueResolutionServiceSettings settings)
Constructs an instance of IssueResolutionServiceClient, 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 |
IssueResolutionServiceSettings |
Returns | |
---|---|
Type | Description |
IssueResolutionServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(IssueResolutionServiceStub stub)
public static final IssueResolutionServiceClient create(IssueResolutionServiceStub stub)
Constructs an instance of IssueResolutionServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(IssueResolutionServiceSettings).
Parameter | |
---|---|
Name | Description |
stub |
IssueResolutionServiceStub |
Returns | |
---|---|
Type | Description |
IssueResolutionServiceClient |
Constructors
IssueResolutionServiceClient(IssueResolutionServiceSettings settings)
protected IssueResolutionServiceClient(IssueResolutionServiceSettings settings)
Constructs an instance of IssueResolutionServiceClient, 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 |
IssueResolutionServiceSettings |
IssueResolutionServiceClient(IssueResolutionServiceStub stub)
protected IssueResolutionServiceClient(IssueResolutionServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub |
IssueResolutionServiceStub |
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()
getSettings()
public final IssueResolutionServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
IssueResolutionServiceSettings |
getStub()
public IssueResolutionServiceStub getStub()
Returns | |
---|---|
Type | Description |
IssueResolutionServiceStub |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
renderAccountIssues(AccountName name)
public final RenderAccountIssuesResponse renderAccountIssues(AccountName name)
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
RenderAccountIssuesResponse response = issueResolutionServiceClient.renderAccountIssues(name);
}
Parameter | |
---|---|
Name | Description |
name |
AccountName Required. The account to fetch issues for. Format: |
Returns | |
---|---|
Type | Description |
RenderAccountIssuesResponse |
renderAccountIssues(RenderAccountIssuesRequest request)
public final RenderAccountIssuesResponse renderAccountIssues(RenderAccountIssuesRequest request)
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
RenderAccountIssuesRequest request =
RenderAccountIssuesRequest.newBuilder()
.setName(AccountName.of("[ACCOUNT]").toString())
.setLanguageCode("languageCode-2092349083")
.setTimeZone("timeZone-2077180903")
.setPayload(RenderIssuesRequestPayload.newBuilder().build())
.build();
RenderAccountIssuesResponse response =
issueResolutionServiceClient.renderAccountIssues(request);
}
Parameter | |
---|---|
Name | Description |
request |
RenderAccountIssuesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
RenderAccountIssuesResponse |
renderAccountIssues(String name)
public final RenderAccountIssuesResponse renderAccountIssues(String name)
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
String name = AccountName.of("[ACCOUNT]").toString();
RenderAccountIssuesResponse response = issueResolutionServiceClient.renderAccountIssues(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The account to fetch issues for. Format: |
Returns | |
---|---|
Type | Description |
RenderAccountIssuesResponse |
renderAccountIssuesCallable()
public final UnaryCallable<RenderAccountIssuesRequest,RenderAccountIssuesResponse> renderAccountIssuesCallable()
Provide a list of business's account issues with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
RenderAccountIssuesRequest request =
RenderAccountIssuesRequest.newBuilder()
.setName(AccountName.of("[ACCOUNT]").toString())
.setLanguageCode("languageCode-2092349083")
.setTimeZone("timeZone-2077180903")
.setPayload(RenderIssuesRequestPayload.newBuilder().build())
.build();
ApiFuture<RenderAccountIssuesResponse> future =
issueResolutionServiceClient.renderAccountIssuesCallable().futureCall(request);
// Do something.
RenderAccountIssuesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<RenderAccountIssuesRequest,RenderAccountIssuesResponse> |
renderProductIssues(ProductName name)
public final RenderProductIssuesResponse renderProductIssues(ProductName name)
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
ProductName name = ProductName.of("[ACCOUNT]", "[PRODUCT]");
RenderProductIssuesResponse response = issueResolutionServiceClient.renderProductIssues(name);
}
Parameter | |
---|---|
Name | Description |
name |
ProductName Required. The name of the product to fetch issues for. Format:
|
Returns | |
---|---|
Type | Description |
RenderProductIssuesResponse |
renderProductIssues(RenderProductIssuesRequest request)
public final RenderProductIssuesResponse renderProductIssues(RenderProductIssuesRequest request)
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
RenderProductIssuesRequest request =
RenderProductIssuesRequest.newBuilder()
.setName(ProductName.of("[ACCOUNT]", "[PRODUCT]").toString())
.setLanguageCode("languageCode-2092349083")
.setTimeZone("timeZone-2077180903")
.setPayload(RenderIssuesRequestPayload.newBuilder().build())
.build();
RenderProductIssuesResponse response =
issueResolutionServiceClient.renderProductIssues(request);
}
Parameter | |
---|---|
Name | Description |
request |
RenderProductIssuesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
RenderProductIssuesResponse |
renderProductIssues(String name)
public final RenderProductIssuesResponse renderProductIssues(String name)
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
String name = ProductName.of("[ACCOUNT]", "[PRODUCT]").toString();
RenderProductIssuesResponse response = issueResolutionServiceClient.renderProductIssues(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The name of the product to fetch issues for. Format:
|
Returns | |
---|---|
Type | Description |
RenderProductIssuesResponse |
renderProductIssuesCallable()
public final UnaryCallable<RenderProductIssuesRequest,RenderProductIssuesResponse> renderProductIssuesCallable()
Provide a list of issues for business's product with an issue resolution content and available actions. This content and actions are meant to be rendered and shown in third-party applications.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
RenderProductIssuesRequest request =
RenderProductIssuesRequest.newBuilder()
.setName(ProductName.of("[ACCOUNT]", "[PRODUCT]").toString())
.setLanguageCode("languageCode-2092349083")
.setTimeZone("timeZone-2077180903")
.setPayload(RenderIssuesRequestPayload.newBuilder().build())
.build();
ApiFuture<RenderProductIssuesResponse> future =
issueResolutionServiceClient.renderProductIssuesCallable().futureCall(request);
// Do something.
RenderProductIssuesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<RenderProductIssuesRequest,RenderProductIssuesResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
triggerAction(AccountName name)
public final TriggerActionResponse triggerAction(AccountName name)
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form.
The action can be successfully started only once all required
inputs are provided. If any
required
input is missing, or invalid value was provided, the service will return 400 error.
Validation errors will contain
Ids for all problematic field
together with translated, human readable error messages that can be shown to the user.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
AccountName name = AccountName.of("[ACCOUNT]");
TriggerActionResponse response = issueResolutionServiceClient.triggerAction(name);
}
Parameter | |
---|---|
Name | Description |
name |
AccountName Required. The business's account that is triggering the action. Format:
|
Returns | |
---|---|
Type | Description |
TriggerActionResponse |
triggerAction(TriggerActionRequest request)
public final TriggerActionResponse triggerAction(TriggerActionRequest request)
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form.
The action can be successfully started only once all required
inputs are provided. If any
required
input is missing, or invalid value was provided, the service will return 400 error.
Validation errors will contain
Ids for all problematic field
together with translated, human readable error messages that can be shown to the user.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
TriggerActionRequest request =
TriggerActionRequest.newBuilder()
.setName(AccountName.of("[ACCOUNT]").toString())
.setPayload(TriggerActionPayload.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
TriggerActionResponse response = issueResolutionServiceClient.triggerAction(request);
}
Parameter | |
---|---|
Name | Description |
request |
TriggerActionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TriggerActionResponse |
triggerAction(String name)
public final TriggerActionResponse triggerAction(String name)
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form.
The action can be successfully started only once all required
inputs are provided. If any
required
input is missing, or invalid value was provided, the service will return 400 error.
Validation errors will contain
Ids for all problematic field
together with translated, human readable error messages that can be shown to the user.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
String name = AccountName.of("[ACCOUNT]").toString();
TriggerActionResponse response = issueResolutionServiceClient.triggerAction(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The business's account that is triggering the action. Format:
|
Returns | |
---|---|
Type | Description |
TriggerActionResponse |
triggerActionCallable()
public final UnaryCallable<TriggerActionRequest,TriggerActionResponse> triggerActionCallable()
Start an action. The action can be requested by a business in third-party application. Before the business can request the action, the third-party application needs to show them action specific content and display a user input form.
The action can be successfully started only once all required
inputs are provided. If any
required
input is missing, or invalid value was provided, the service will return 400 error.
Validation errors will contain
Ids for all problematic field
together with translated, human readable error messages that can be shown to the user.
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 (IssueResolutionServiceClient issueResolutionServiceClient =
IssueResolutionServiceClient.create()) {
TriggerActionRequest request =
TriggerActionRequest.newBuilder()
.setName(AccountName.of("[ACCOUNT]").toString())
.setPayload(TriggerActionPayload.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.build();
ApiFuture<TriggerActionResponse> future =
issueResolutionServiceClient.triggerActionCallable().futureCall(request);
// Do something.
TriggerActionResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<TriggerActionRequest,TriggerActionResponse> |