All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.support.v2.CaseServiceClient Maven / Gradle / Ivy

Go to download

Google Cloud Support API Manages Google Cloud technical support cases for Customer Care support offerings.

There is a newer version: 0.39.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.support.v2;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.support.v2.stub.CaseServiceStub;
import com.google.cloud.support.v2.stub.CaseServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: A service to manage Google Cloud support cases.
 *
 * 

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: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
 *   CaseName name = CaseName.ofProjectCaseName("[PROJECT]", "[CASE]");
 *   Case response = caseServiceClient.getCase(name);
 * }
 * }
* *

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

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Methods
MethodDescriptionMethod Variants

GetCase

Retrieve the specified case.

*

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

*
    *
  • getCase(GetCaseRequest request) *

*

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

*
    *
  • getCase(CaseName name) *

  • getCase(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.

*
    *
  • getCaseCallable() *

*

ListCases

Retrieve all cases under the specified parent. *

Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.

*

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

*
    *
  • listCases(ListCasesRequest request) *

*

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

*
    *
  • listCases(OrganizationName parent) *

  • listCases(ProjectName parent) *

  • listCases(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.

*
    *
  • listCasesPagedCallable() *

  • listCasesCallable() *

*

SearchCases

Search cases using the specified query.

*

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

*
    *
  • searchCases(SearchCasesRequest request) *

*

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

*
    *
  • searchCasesPagedCallable() *

  • searchCasesCallable() *

*

CreateCase

Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.

*

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

*
    *
  • createCase(CreateCaseRequest request) *

*

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

*
    *
  • createCase(OrganizationName parent, Case case_) *

  • createCase(ProjectName parent, Case case_) *

  • createCase(String parent, Case case_) *

*

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

*
    *
  • createCaseCallable() *

*

UpdateCase

Update the specified case. Only a subset of fields can be updated.

*

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

*
    *
  • updateCase(UpdateCaseRequest request) *

*

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

*
    *
  • updateCase(Case case_, 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.

*
    *
  • updateCaseCallable() *

*

EscalateCase

Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. *

This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.

*

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

*
    *
  • escalateCase(EscalateCaseRequest request) *

*

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

*
    *
  • escalateCaseCallable() *

*

CloseCase

Close the specified case.

*

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

*
    *
  • closeCase(CloseCaseRequest request) *

*

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

*
    *
  • closeCaseCallable() *

*

SearchCaseClassifications

Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by " > ". For example "Technical Issue > Compute > Compute Engine".

*

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

*
    *
  • searchCaseClassifications(SearchCaseClassificationsRequest request) *

*

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

*
    *
  • searchCaseClassificationsPagedCallable() *

  • searchCaseClassificationsCallable() *

*
* *

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 CaseServiceSettings to * create(). For example: * *

To customize credentials: * *

{@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
 * CaseServiceSettings caseServiceSettings =
 *     CaseServiceSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
 * }
* *

To customize the endpoint: * *

{@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
 * CaseServiceSettings caseServiceSettings =
 *     CaseServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 * CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
 * }
* *

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

{@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
 * CaseServiceSettings caseServiceSettings = CaseServiceSettings.newHttpJsonBuilder().build();
 * CaseServiceClient caseServiceClient = CaseServiceClient.create(caseServiceSettings);
 * }
* *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") public class CaseServiceClient implements BackgroundResource { private final CaseServiceSettings settings; private final CaseServiceStub stub; /** Constructs an instance of CaseServiceClient with default settings. */ public static final CaseServiceClient create() throws IOException { return create(CaseServiceSettings.newBuilder().build()); } /** * Constructs an instance of CaseServiceClient, using the given settings. The channels are created * based on the settings passed in, or defaults for any settings that are not set. */ public static final CaseServiceClient create(CaseServiceSettings settings) throws IOException { return new CaseServiceClient(settings); } /** * Constructs an instance of CaseServiceClient, using the given stub for making calls. This is for * advanced usage - prefer using create(CaseServiceSettings). */ public static final CaseServiceClient create(CaseServiceStub stub) { return new CaseServiceClient(stub); } /** * Constructs an instance of CaseServiceClient, 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. */ protected CaseServiceClient(CaseServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((CaseServiceStubSettings) settings.getStubSettings()).createStub(); } protected CaseServiceClient(CaseServiceStub stub) { this.settings = null; this.stub = stub; } public final CaseServiceSettings getSettings() { return settings; } public CaseServiceStub getStub() { return stub; } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   CaseName name = CaseName.ofProjectCaseName("[PROJECT]", "[CASE]");
   *   Case response = caseServiceClient.getCase(name);
   * }
   * }
* * @param name Required. The fully qualified name of a case to be retrieved. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case getCase(CaseName name) { GetCaseRequest request = GetCaseRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   String name = CaseName.ofOrganizationCaseName("[ORGANIZATION]", "[CASE]").toString();
   *   Case response = caseServiceClient.getCase(name);
   * }
   * }
* * @param name Required. The fully qualified name of a case to be retrieved. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case getCase(String name) { GetCaseRequest request = GetCaseRequest.newBuilder().setName(name).build(); return getCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   GetCaseRequest request =
   *       GetCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .build();
   *   Case response = caseServiceClient.getCase(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case getCase(GetCaseRequest request) { return getCaseCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   GetCaseRequest request =
   *       GetCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .build();
   *   ApiFuture future = caseServiceClient.getCaseCallable().futureCall(request);
   *   // Do something.
   *   Case response = future.get();
   * }
   * }
*/ public final UnaryCallable getCaseCallable() { return stub.getCaseCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   *   for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The fully qualified name of parent resource to list cases under. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCasesPagedResponse listCases(OrganizationName parent) { ListCasesRequest request = ListCasesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listCases(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   ProjectName parent = ProjectName.of("[PROJECT]");
   *   for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The fully qualified name of parent resource to list cases under. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCasesPagedResponse listCases(ProjectName parent) { ListCasesRequest request = ListCasesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); return listCases(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   *   for (Case element : caseServiceClient.listCases(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param parent Required. The fully qualified name of parent resource to list cases under. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCasesPagedResponse listCases(String parent) { ListCasesRequest request = ListCasesRequest.newBuilder().setParent(parent).build(); return listCases(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   ListCasesRequest request =
   *       ListCasesRequest.newBuilder()
   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (Case element : caseServiceClient.listCases(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListCasesPagedResponse listCases(ListCasesRequest request) { return listCasesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   ListCasesRequest request =
   *       ListCasesRequest.newBuilder()
   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future = caseServiceClient.listCasesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Case element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable listCasesPagedCallable() { return stub.listCasesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve all cases under the specified parent. * *

Note: Listing cases under an Organization returns only the cases directly parented by that * organization. To retrieve all cases under an organization, including cases parented by projects * under that organization, use `cases.search`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   ListCasesRequest request =
   *       ListCasesRequest.newBuilder()
   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
   *           .setFilter("filter-1274492040")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     ListCasesResponse response = caseServiceClient.listCasesCallable().call(request);
   *     for (Case element : response.getCasesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable listCasesCallable() { return stub.listCasesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search cases using the specified query. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCasesRequest request =
   *       SearchCasesRequest.newBuilder()
   *           .setParent("parent-995424086")
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (Case element : caseServiceClient.searchCases(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchCasesPagedResponse searchCases(SearchCasesRequest request) { return searchCasesPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search cases using the specified query. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCasesRequest request =
   *       SearchCasesRequest.newBuilder()
   *           .setParent("parent-995424086")
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future = caseServiceClient.searchCasesPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Case element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable searchCasesPagedCallable() { return stub.searchCasesPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Search cases using the specified query. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCasesRequest request =
   *       SearchCasesRequest.newBuilder()
   *           .setParent("parent-995424086")
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     SearchCasesResponse response = caseServiceClient.searchCasesCallable().call(request);
   *     for (Case element : response.getCasesList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable searchCasesCallable() { return stub.searchCasesCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a new case and associate it with the given Google Cloud Resource. The case object must * have the following fields set: `display_name`, `description`, `classification`, and `priority`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
   *   Case case_ = Case.newBuilder().build();
   *   Case response = caseServiceClient.createCase(parent, case_);
   * }
   * }
* * @param parent Required. The name of the Google Cloud Resource under which the case should be * created. * @param case_ Required. The case to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case createCase(OrganizationName parent, Case case_) { CreateCaseRequest request = CreateCaseRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCase(case_) .build(); return createCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a new case and associate it with the given Google Cloud Resource. The case object must * have the following fields set: `display_name`, `description`, `classification`, and `priority`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   ProjectName parent = ProjectName.of("[PROJECT]");
   *   Case case_ = Case.newBuilder().build();
   *   Case response = caseServiceClient.createCase(parent, case_);
   * }
   * }
* * @param parent Required. The name of the Google Cloud Resource under which the case should be * created. * @param case_ Required. The case to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case createCase(ProjectName parent, Case case_) { CreateCaseRequest request = CreateCaseRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setCase(case_) .build(); return createCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a new case and associate it with the given Google Cloud Resource. The case object must * have the following fields set: `display_name`, `description`, `classification`, and `priority`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   String parent = OrganizationName.of("[ORGANIZATION]").toString();
   *   Case case_ = Case.newBuilder().build();
   *   Case response = caseServiceClient.createCase(parent, case_);
   * }
   * }
* * @param parent Required. The name of the Google Cloud Resource under which the case should be * created. * @param case_ Required. The case to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case createCase(String parent, Case case_) { CreateCaseRequest request = CreateCaseRequest.newBuilder().setParent(parent).setCase(case_).build(); return createCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a new case and associate it with the given Google Cloud Resource. The case object must * have the following fields set: `display_name`, `description`, `classification`, and `priority`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   CreateCaseRequest request =
   *       CreateCaseRequest.newBuilder()
   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
   *           .setCase(Case.newBuilder().build())
   *           .build();
   *   Case response = caseServiceClient.createCase(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case createCase(CreateCaseRequest request) { return createCaseCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Create a new case and associate it with the given Google Cloud Resource. The case object must * have the following fields set: `display_name`, `description`, `classification`, and `priority`. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   CreateCaseRequest request =
   *       CreateCaseRequest.newBuilder()
   *           .setParent(OrganizationName.of("[ORGANIZATION]").toString())
   *           .setCase(Case.newBuilder().build())
   *           .build();
   *   ApiFuture future = caseServiceClient.createCaseCallable().futureCall(request);
   *   // Do something.
   *   Case response = future.get();
   * }
   * }
*/ public final UnaryCallable createCaseCallable() { return stub.createCaseCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update the specified case. Only a subset of fields can be updated. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   Case case_ = Case.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Case response = caseServiceClient.updateCase(case_, updateMask);
   * }
   * }
* * @param case_ Required. The case object to update. * @param updateMask A list of attributes of the case object that should be updated as part of * this request. Supported values are `priority`, `display_name`, and * `subscriber_email_addresses`. If no fields are specified, all supported fields are updated. *

WARNING: If you do not provide a field mask, then you might accidentally clear some * fields. For example, if you leave the field mask empty and do not provide a value for * `subscriber_email_addresses`, then `subscriber_email_addresses` is updated to empty. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case updateCase(Case case_, FieldMask updateMask) { UpdateCaseRequest request = UpdateCaseRequest.newBuilder().setCase(case_).setUpdateMask(updateMask).build(); return updateCase(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update the specified case. Only a subset of fields can be updated. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   UpdateCaseRequest request =
   *       UpdateCaseRequest.newBuilder()
   *           .setCase(Case.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   Case response = caseServiceClient.updateCase(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case updateCase(UpdateCaseRequest request) { return updateCaseCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Update the specified case. Only a subset of fields can be updated. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   UpdateCaseRequest request =
   *       UpdateCaseRequest.newBuilder()
   *           .setCase(Case.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   ApiFuture future = caseServiceClient.updateCaseCallable().futureCall(request);
   *   // Do something.
   *   Case response = future.get();
   * }
   * }
*/ public final UnaryCallable updateCaseCallable() { return stub.updateCaseCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management * process. * *

This operation is only available to certain Customer Care tiers. Go to * https://cloud.google.com/support and look for 'Technical support escalations' in the feature * list to find out which tiers are able to perform escalations. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   EscalateCaseRequest request =
   *       EscalateCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .setEscalation(Escalation.newBuilder().build())
   *           .build();
   *   Case response = caseServiceClient.escalateCase(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case escalateCase(EscalateCaseRequest request) { return escalateCaseCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management * process. * *

This operation is only available to certain Customer Care tiers. Go to * https://cloud.google.com/support and look for 'Technical support escalations' in the feature * list to find out which tiers are able to perform escalations. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   EscalateCaseRequest request =
   *       EscalateCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .setEscalation(Escalation.newBuilder().build())
   *           .build();
   *   ApiFuture future = caseServiceClient.escalateCaseCallable().futureCall(request);
   *   // Do something.
   *   Case response = future.get();
   * }
   * }
*/ public final UnaryCallable escalateCaseCallable() { return stub.escalateCaseCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Close the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   CloseCaseRequest request =
   *       CloseCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .build();
   *   Case response = caseServiceClient.closeCase(request);
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Case closeCase(CloseCaseRequest request) { return closeCaseCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Close the specified case. * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   CloseCaseRequest request =
   *       CloseCaseRequest.newBuilder()
   *           .setName(CaseName.ofProjectCaseName("[PROJECT]", "[CASE]").toString())
   *           .build();
   *   ApiFuture future = caseServiceClient.closeCaseCallable().futureCall(request);
   *   // Do something.
   *   Case response = future.get();
   * }
   * }
*/ public final UnaryCallable closeCaseCallable() { return stub.closeCaseCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve valid classifications to be used when creating a support case. The classications are * hierarchical, with each classification containing all levels of the hierarchy, separated by " * > ". For example "Technical Issue > Compute > Compute Engine". * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCaseClassificationsRequest request =
   *       SearchCaseClassificationsRequest.newBuilder()
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   for (CaseClassification element :
   *       caseServiceClient.searchCaseClassifications(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
* * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchCaseClassificationsPagedResponse searchCaseClassifications( SearchCaseClassificationsRequest request) { return searchCaseClassificationsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve valid classifications to be used when creating a support case. The classications are * hierarchical, with each classification containing all levels of the hierarchy, separated by " * > ". For example "Technical Issue > Compute > Compute Engine". * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCaseClassificationsRequest request =
   *       SearchCaseClassificationsRequest.newBuilder()
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   ApiFuture future =
   *       caseServiceClient.searchCaseClassificationsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (CaseClassification element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }
*/ public final UnaryCallable< SearchCaseClassificationsRequest, SearchCaseClassificationsPagedResponse> searchCaseClassificationsPagedCallable() { return stub.searchCaseClassificationsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Retrieve valid classifications to be used when creating a support case. The classications are * hierarchical, with each classification containing all levels of the hierarchy, separated by " * > ". For example "Technical Issue > Compute > Compute Engine". * *

Sample code: * *

{@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 (CaseServiceClient caseServiceClient = CaseServiceClient.create()) {
   *   SearchCaseClassificationsRequest request =
   *       SearchCaseClassificationsRequest.newBuilder()
   *           .setQuery("query107944136")
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .build();
   *   while (true) {
   *     SearchCaseClassificationsResponse response =
   *         caseServiceClient.searchCaseClassificationsCallable().call(request);
   *     for (CaseClassification element : response.getCaseClassificationsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }
*/ public final UnaryCallable searchCaseClassificationsCallable() { return stub.searchCaseClassificationsCallable(); } @Override public final void close() { stub.close(); } @Override public void shutdown() { stub.shutdown(); } @Override public boolean isShutdown() { return stub.isShutdown(); } @Override public boolean isTerminated() { return stub.isTerminated(); } @Override public void shutdownNow() { stub.shutdownNow(); } @Override public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { return stub.awaitTermination(duration, unit); } public static class ListCasesPagedResponse extends AbstractPagedListResponse< ListCasesRequest, ListCasesResponse, Case, ListCasesPage, ListCasesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = ListCasesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new ListCasesPagedResponse(input), MoreExecutors.directExecutor()); } private ListCasesPagedResponse(ListCasesPage page) { super(page, ListCasesFixedSizeCollection.createEmptyCollection()); } } public static class ListCasesPage extends AbstractPage { private ListCasesPage( PageContext context, ListCasesResponse response) { super(context, response); } private static ListCasesPage createEmptyPage() { return new ListCasesPage(null, null); } @Override protected ListCasesPage createPage( PageContext context, ListCasesResponse response) { return new ListCasesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class ListCasesFixedSizeCollection extends AbstractFixedSizeCollection< ListCasesRequest, ListCasesResponse, Case, ListCasesPage, ListCasesFixedSizeCollection> { private ListCasesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static ListCasesFixedSizeCollection createEmptyCollection() { return new ListCasesFixedSizeCollection(null, 0); } @Override protected ListCasesFixedSizeCollection createCollection( List pages, int collectionSize) { return new ListCasesFixedSizeCollection(pages, collectionSize); } } public static class SearchCasesPagedResponse extends AbstractPagedListResponse< SearchCasesRequest, SearchCasesResponse, Case, SearchCasesPage, SearchCasesFixedSizeCollection> { public static ApiFuture createAsync( PageContext context, ApiFuture futureResponse) { ApiFuture futurePage = SearchCasesPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new SearchCasesPagedResponse(input), MoreExecutors.directExecutor()); } private SearchCasesPagedResponse(SearchCasesPage page) { super(page, SearchCasesFixedSizeCollection.createEmptyCollection()); } } public static class SearchCasesPage extends AbstractPage { private SearchCasesPage( PageContext context, SearchCasesResponse response) { super(context, response); } private static SearchCasesPage createEmptyPage() { return new SearchCasesPage(null, null); } @Override protected SearchCasesPage createPage( PageContext context, SearchCasesResponse response) { return new SearchCasesPage(context, response); } @Override public ApiFuture createPageAsync( PageContext context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class SearchCasesFixedSizeCollection extends AbstractFixedSizeCollection< SearchCasesRequest, SearchCasesResponse, Case, SearchCasesPage, SearchCasesFixedSizeCollection> { private SearchCasesFixedSizeCollection(List pages, int collectionSize) { super(pages, collectionSize); } private static SearchCasesFixedSizeCollection createEmptyCollection() { return new SearchCasesFixedSizeCollection(null, 0); } @Override protected SearchCasesFixedSizeCollection createCollection( List pages, int collectionSize) { return new SearchCasesFixedSizeCollection(pages, collectionSize); } } public static class SearchCaseClassificationsPagedResponse extends AbstractPagedListResponse< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification, SearchCaseClassificationsPage, SearchCaseClassificationsFixedSizeCollection> { public static ApiFuture createAsync( PageContext< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification> context, ApiFuture futureResponse) { ApiFuture futurePage = SearchCaseClassificationsPage.createEmptyPage().createPageAsync(context, futureResponse); return ApiFutures.transform( futurePage, input -> new SearchCaseClassificationsPagedResponse(input), MoreExecutors.directExecutor()); } private SearchCaseClassificationsPagedResponse(SearchCaseClassificationsPage page) { super(page, SearchCaseClassificationsFixedSizeCollection.createEmptyCollection()); } } public static class SearchCaseClassificationsPage extends AbstractPage< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification, SearchCaseClassificationsPage> { private SearchCaseClassificationsPage( PageContext< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification> context, SearchCaseClassificationsResponse response) { super(context, response); } private static SearchCaseClassificationsPage createEmptyPage() { return new SearchCaseClassificationsPage(null, null); } @Override protected SearchCaseClassificationsPage createPage( PageContext< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification> context, SearchCaseClassificationsResponse response) { return new SearchCaseClassificationsPage(context, response); } @Override public ApiFuture createPageAsync( PageContext< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification> context, ApiFuture futureResponse) { return super.createPageAsync(context, futureResponse); } } public static class SearchCaseClassificationsFixedSizeCollection extends AbstractFixedSizeCollection< SearchCaseClassificationsRequest, SearchCaseClassificationsResponse, CaseClassification, SearchCaseClassificationsPage, SearchCaseClassificationsFixedSizeCollection> { private SearchCaseClassificationsFixedSizeCollection( List pages, int collectionSize) { super(pages, collectionSize); } private static SearchCaseClassificationsFixedSizeCollection createEmptyCollection() { return new SearchCaseClassificationsFixedSizeCollection(null, 0); } @Override protected SearchCaseClassificationsFixedSizeCollection createCollection( List pages, int collectionSize) { return new SearchCaseClassificationsFixedSizeCollection(pages, collectionSize); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy